SAE: Replace comparison to one with crypto_bignum wrapper

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-01-06 18:38:17 +02:00
parent 3b0ffebcda
commit 75870c933f
3 changed files with 23 additions and 47 deletions

View file

@ -612,6 +612,13 @@ int crypto_bignum_bits(const struct crypto_bignum *a);
*/
int crypto_bignum_is_zero(const struct crypto_bignum *a);
/**
* crypto_bignum_is_one - Is the given bignum one
* @a: Bignum
* Returns: 1 if @a is one or 0 if not
*/
int crypto_bignum_is_one(const struct crypto_bignum *a);
/**
* struct crypto_ec - Elliptic curve context
*

View file

@ -1006,6 +1006,12 @@ int crypto_bignum_is_zero(const struct crypto_bignum *a)
}
int crypto_bignum_is_one(const struct crypto_bignum *a)
{
return BN_is_one((const BIGNUM *) a);
}
#ifdef CONFIG_ECC
struct crypto_ec {