From f0e3d92d00c45f98a7e7e225528ae1522a249dec Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Sun, 11 Jul 2021 23:26:21 -0500 Subject: [PATCH] sae: Fix sae_cn endianness issue send_confirm was always passed in using host byte-order, but the hash should be ran over send_confirm in LE order. --- src/sae.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sae.c b/src/sae.c index 5065c803..b47b753d 100644 --- a/src/sae.c +++ b/src/sae.c @@ -164,6 +164,8 @@ static bool sae_cn(const uint8_t *kck, uint16_t send_confirm, if (!hmac) return false; + send_confirm = L_CPU_TO_LE16(send_confirm); + iov[0].iov_base = &send_confirm; iov[0].iov_len = 2; iov[1].iov_base = (void *) s1;