SAE: Use more generic random bignum generation
Move the bignum comparison part into the bignum library to allow a single implementation of rand generation for both ECC and FCC based groups. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
629c56d70a
commit
b1677c393b
3 changed files with 45 additions and 27 deletions
|
@ -987,6 +987,19 @@ int crypto_bignum_mulmod(const struct crypto_bignum *a,
|
|||
}
|
||||
|
||||
|
||||
int crypto_bignum_cmp(const struct crypto_bignum *a,
|
||||
const struct crypto_bignum *b)
|
||||
{
|
||||
return BN_cmp((const BIGNUM *) a, (const BIGNUM *) b);
|
||||
}
|
||||
|
||||
|
||||
int crypto_bignum_bits(const struct crypto_bignum *a)
|
||||
{
|
||||
return BN_num_bits((const BIGNUM *) a);
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_ECC
|
||||
|
||||
struct crypto_ec {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue