aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto/sha256.h
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-01-01 12:00:40 (GMT)
committerJouni Malinen <j@w1.fi>2013-01-12 15:51:53 (GMT)
commitcd9c2714e795a0eb2d9cdad3edb9146b27ff261c (patch)
tree05fb522959eda3bb75ffeff26485d8da9234d07d /src/crypto/sha256.h
parentbf14657b9ffd8f46a46879708619b91a160f9967 (diff)
downloadhostap-cd9c2714e795a0eb2d9cdad3edb9146b27ff261c.zip
hostap-cd9c2714e795a0eb2d9cdad3edb9146b27ff261c.tar.gz
hostap-cd9c2714e795a0eb2d9cdad3edb9146b27ff261c.tar.bz2
SAE: Add support for ECC group 21 (521-bit random ECP group)
In addition to the trivial change in adding the new group ientifier, this required changes to KDF and random number generation to support cases where the length of the prime in bits is not a multiple of eight. The binary presentation of the value needs to be shifted so that the unused most significant bits are the zero padding rather than the extra bits in the end of the array. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/crypto/sha256.h')
-rw-r--r--src/crypto/sha256.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/crypto/sha256.h b/src/crypto/sha256.h
index fcac800..7596a52 100644
--- a/src/crypto/sha256.h
+++ b/src/crypto/sha256.h
@@ -1,6 +1,6 @@
/*
* SHA256 hash implementation and interface functions
- * Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2003-2013, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
@@ -17,6 +17,9 @@ int hmac_sha256(const u8 *key, size_t key_len, const u8 *data,
size_t data_len, u8 *mac);
void sha256_prf(const u8 *key, size_t key_len, const char *label,
const u8 *data, size_t data_len, u8 *buf, size_t buf_len);
+void sha256_prf_bits(const u8 *key, size_t key_len, const char *label,
+ const u8 *data, size_t data_len, u8 *buf,
+ size_t buf_len_bits);
void tls_prf_sha256(const u8 *secret, size_t secret_len,
const char *label, const u8 *seed, size_t seed_len,
u8 *out, size_t outlen);