SAE: Store commit scalars as bignum instead of octet string
This avoids unnecessary bignum initialization steps during the SAE exchange. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
4df61ba5b9
commit
b0f6124c1c
4 changed files with 104 additions and 100 deletions
|
@ -605,6 +605,13 @@ int crypto_bignum_cmp(const struct crypto_bignum *a,
|
|||
*/
|
||||
int crypto_bignum_bits(const struct crypto_bignum *a);
|
||||
|
||||
/**
|
||||
* crypto_bignum_is_zero - Is the given bignum zero
|
||||
* @a: Bignum
|
||||
* Returns: 1 if @a is zero or 0 if not
|
||||
*/
|
||||
int crypto_bignum_is_zero(const struct crypto_bignum *a);
|
||||
|
||||
/**
|
||||
* struct crypto_ec - Elliptic curve context
|
||||
*
|
||||
|
|
|
@ -1000,6 +1000,12 @@ int crypto_bignum_bits(const struct crypto_bignum *a)
|
|||
}
|
||||
|
||||
|
||||
int crypto_bignum_is_zero(const struct crypto_bignum *a)
|
||||
{
|
||||
return BN_is_zero((const BIGNUM *) a);
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_ECC
|
||||
|
||||
struct crypto_ec {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue