]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PASN: Support SHA512 in Auth1 hash calculation
authorAiny Kumari <ainy.kumari@oss.qualcomm.com>
Thu, 27 Nov 2025 00:16:16 +0000 (05:46 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 18 Dec 2025 10:08:24 +0000 (12:08 +0200)
This is needed for SAE-EXT-KEY AKM using group 21.

Signed-off-by: Sai Pratyusha Magam <smagam@qti.qualcomm.com>
Signed-off-by: Ainy Kumari <ainy.kumari@oss.qualcomm.com>
src/common/wpa_common.c

index a5db87e0966b2a7e13a4f12de1e8cb9ff89fba09..2059193b2ae37dafe3997e4f0b14b9086e1f03ed 100644 (file)
@@ -1830,16 +1830,23 @@ err:
  * @data: Pointer to the Authentication frame body
  * @len: Length of the Authentication frame body
  * @hash: On return would hold the computed hash. Should be big enough to handle
- *     SHA384.
+ *     SHA512.
  * Returns: 0 on success, -1 on failure
  */
 int pasn_auth_frame_hash(enum rsn_hash_alg alg, const u8 *data, size_t len,
                         u8 *hash)
 {
        switch (alg) {
+#ifdef CONFIG_SHA512
+       case RSN_HASH_SHA512:
+               wpa_printf(MSG_DEBUG, "PASN: Frame hash using SHA-512");
+               return sha512_vector(1, &data, &len, hash);
+#endif /* CONFIG_SHA512 */
+#ifdef CONFIG_SHA384
        case RSN_HASH_SHA384:
                wpa_printf(MSG_DEBUG, "PASN: Frame hash using SHA-384");
                return sha384_vector(1, &data, &len, hash);
+#endif /* CONFIG_SHA384 */
        case RSN_HASH_SHA256:
                wpa_printf(MSG_DEBUG, "PASN: Frame hash using SHA-256");
                return sha256_vector(1, &data, &len, hash);