diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h index 68476dbce..440da0302 100644 --- a/src/crypto/crypto.h +++ b/src/crypto/crypto.h @@ -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 diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c index ed463105e..783b293e9 100644 --- a/src/crypto/crypto_openssl.c +++ b/src/crypto/crypto_openssl.c @@ -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) { diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c index 3069b4a7a..85ce565bd 100644 --- a/src/crypto/crypto_wolfssl.c +++ b/src/crypto/crypto_wolfssl.c @@ -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) {