iwd.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 6/9] handshake: remove hardcoded kek_len for FTE decode
Date: Mon, 10 Apr 2023 15:01:32 -0700	[thread overview]
Message-ID: <20230410220135.373872-7-prestwoj@gmail.com> (raw)
In-Reply-To: <20230410220135.373872-1-prestwoj@gmail.com>

The KEK length should be obtained with the getter to ensure the
AKM is taken into account
---
 src/handshake.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/handshake.c b/src/handshake.c
index 362ff58a..70aeda37 100644
--- a/src/handshake.c
+++ b/src/handshake.c
@@ -1035,7 +1035,7 @@ bool handshake_decode_fte_key(struct handshake_state *s, const uint8_t *wrapped,
 				size_t key_len, uint8_t *key_out)
 {
 	const uint8_t *kek;
-	size_t kek_len = 16;
+	size_t kek_len = handshake_state_get_kek_len(s);
 	size_t padded_len = key_len < 16 ? 16 : align_len(key_len, 8);
 
 	if (s->akm_suite & (IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 |
-- 
2.25.1


  parent reply	other threads:[~2023-04-10 22:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10 22:01 [PATCH 0/9] Support FT-8021X-SHA384 James Prestwood
2023-04-10 22:01 ` [PATCH 1/9] crypto: modify crypto_derive_pmkid to take the hash/key length James Prestwood
2023-04-16 18:01   ` Denis Kenzior
2023-04-10 22:01 ` [PATCH 2/9] handshake: include additional sha256 AKMs for PMKID generation James Prestwood
2023-04-10 22:01 ` [PATCH 3/9] crypto: add hmac_sha384 support for PMKID derivation James Prestwood
2023-04-10 22:01 ` [PATCH 4/9] eapol: add support for FT-8021X-SHA384 James Prestwood
2023-04-10 22:01 ` [PATCH 5/9] handshake: support FT-8021X-SHA384 James Prestwood
2023-04-10 22:01 ` James Prestwood [this message]
2023-04-16 18:01   ` [PATCH 6/9] handshake: remove hardcoded kek_len for FTE decode Denis Kenzior
2023-04-10 22:01 ` [PATCH 7/9] common: add FT-8021X-SHA384 to AKM_IS_8021X James Prestwood
2023-04-16 18:01   ` Denis Kenzior
2023-04-10 22:01 ` [PATCH 8/9] wiphy: add FT-8021X-SHA384 to supported AKMs James Prestwood
2023-04-10 22:01 ` [PATCH 9/9] auto-t: update testFT-8021x-roam with SHA384 test James Prestwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230410220135.373872-7-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).