mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
crypto: Remove unused crypto_bignum_sqrtmod()
This wrapper function is not used anymore, so drop it instead of trying to figure out good way of implementing it in constant time with various crypto libraries. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
9b292a48f7
commit
de580bf6c4
@ -656,17 +656,6 @@ int crypto_bignum_sqrmod(const struct crypto_bignum *a,
|
||||
const struct crypto_bignum *b,
|
||||
struct crypto_bignum *c);
|
||||
|
||||
/**
|
||||
* crypto_bignum_sqrtmod - returns sqrt(a) (mod b)
|
||||
* @a: Bignum
|
||||
* @b: Bignum
|
||||
* @c: Bignum; used to store the result
|
||||
* Returns: 0 on success, -1 on failure
|
||||
*/
|
||||
int crypto_bignum_sqrtmod(const struct crypto_bignum *a,
|
||||
const struct crypto_bignum *b,
|
||||
struct crypto_bignum *c);
|
||||
|
||||
/**
|
||||
* crypto_bignum_rshift - r = a >> n
|
||||
* @a: Bignum
|
||||
|
@ -1533,27 +1533,6 @@ int crypto_bignum_sqrmod(const struct crypto_bignum *a,
|
||||
}
|
||||
|
||||
|
||||
int crypto_bignum_sqrtmod(const struct crypto_bignum *a,
|
||||
const struct crypto_bignum *b,
|
||||
struct crypto_bignum *c)
|
||||
{
|
||||
BN_CTX *bnctx;
|
||||
BIGNUM *res;
|
||||
|
||||
if (TEST_FAIL())
|
||||
return -1;
|
||||
|
||||
bnctx = BN_CTX_new();
|
||||
if (!bnctx)
|
||||
return -1;
|
||||
res = BN_mod_sqrt((BIGNUM *) c, (const BIGNUM *) a, (const BIGNUM *) b,
|
||||
bnctx);
|
||||
BN_CTX_free(bnctx);
|
||||
|
||||
return res ? 0 : -1;
|
||||
}
|
||||
|
||||
|
||||
int crypto_bignum_rshift(const struct crypto_bignum *a, int n,
|
||||
struct crypto_bignum *r)
|
||||
{
|
||||
|
@ -1226,15 +1226,6 @@ int crypto_bignum_sqrmod(const struct crypto_bignum *a,
|
||||
}
|
||||
|
||||
|
||||
int crypto_bignum_sqrtmod(const struct crypto_bignum *a,
|
||||
const struct crypto_bignum *b,
|
||||
struct crypto_bignum *c)
|
||||
{
|
||||
/* TODO */
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int crypto_bignum_rshift(const struct crypto_bignum *a, int n,
|
||||
struct crypto_bignum *r)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user