]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
crypto: Remove unused crypto_bignum_sqrtmod()
authorJouni Malinen <jouni@codeaurora.org>
Fri, 25 Oct 2019 11:34:44 +0000 (14:34 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 25 Oct 2019 16:29:53 +0000 (19:29 +0300)
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>
src/crypto/crypto.h
src/crypto/crypto_openssl.c
src/crypto/crypto_wolfssl.c

index 68476dbce96cbccabad2b9e21f87732dbdb5a0fa..440da0302967d469ba626d329e72ae168f260c5f 100644 (file)
@@ -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
index ed463105e8f1816d263dfa27e3bc6dc2e28e98f4..783b293e9b776d928f0226a12c23502a883ab8a4 100644 (file)
@@ -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)
 {
index 3069b4a7a7f10461c755fd290ce85aaa6f05f8dc..85ce565bdf5680ed9ba9d2bf8a0904bd63c3c67e 100644 (file)
@@ -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)
 {