]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
crypto: Remove unused crypto_ec_point_solve_y_coord()
authorJouni Malinen <j@w1.fi>
Fri, 7 Jan 2022 17:44:10 +0000 (19:44 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 11 Jan 2022 18:15:36 +0000 (20:15 +0200)
This wrapper function is not used anymore, so remove it.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/crypto.h
src/crypto/crypto_openssl.c
src/crypto/crypto_wolfssl.c

index eb600699d3d08fd3d4ec5a116d3f09960414588e..e6150b0cf16ee1dee6d3f8bf430c9d620f4690b4 100644 (file)
@@ -882,18 +882,6 @@ int crypto_ec_point_mul(struct crypto_ec *e, const struct crypto_ec_point *p,
  */
 int crypto_ec_point_invert(struct crypto_ec *e, struct crypto_ec_point *p);
 
-/**
- * crypto_ec_point_solve_y_coord - Solve y coordinate for an x coordinate
- * @e: EC context from crypto_ec_init()
- * @p: EC point to use for the returning the result
- * @x: x coordinate
- * @y_bit: y-bit (0 or 1) for selecting the y value to use
- * Returns: 0 on success, -1 on failure
- */
-int crypto_ec_point_solve_y_coord(struct crypto_ec *e,
-                                 struct crypto_ec_point *p,
-                                 const struct crypto_bignum *x, int y_bit);
-
 /**
  * crypto_ec_point_compute_y_sqr - Compute y^2 = x^3 + ax + b
  * @e: EC context from crypto_ec_init()
index b178553e67ac1592a0ddccf4c42b7b77ea9d53dc..82c85762d84f04852ef9715a2a708f630f92d858 100644 (file)
@@ -1951,21 +1951,6 @@ int crypto_ec_point_invert(struct crypto_ec *e, struct crypto_ec_point *p)
 }
 
 
-int crypto_ec_point_solve_y_coord(struct crypto_ec *e,
-                                 struct crypto_ec_point *p,
-                                 const struct crypto_bignum *x, int y_bit)
-{
-       if (TEST_FAIL())
-               return -1;
-       if (!EC_POINT_set_compressed_coordinates_GFp(e->group, (EC_POINT *) p,
-                                                    (const BIGNUM *) x, y_bit,
-                                                    e->bnctx) ||
-           !EC_POINT_is_on_curve(e->group, (EC_POINT *) p, e->bnctx))
-               return -1;
-       return 0;
-}
-
-
 struct crypto_bignum *
 crypto_ec_point_compute_y_sqr(struct crypto_ec *e,
                              const struct crypto_bignum *x)
index 6f116eb62f531e0c46611aaad460969075ea69c4..00ecf61352a18e858216292c0bf8e5dc2a97bb76 100644 (file)
@@ -1630,30 +1630,6 @@ int crypto_ec_point_invert(struct crypto_ec *e, struct crypto_ec_point *p)
 }
 
 
-int crypto_ec_point_solve_y_coord(struct crypto_ec *e,
-                                 struct crypto_ec_point *p,
-                                 const struct crypto_bignum *x, int y_bit)
-{
-       byte buf[1 + 2 * MAX_ECC_BYTES];
-       int ret;
-       int prime_len = crypto_ec_prime_len(e);
-
-       if (TEST_FAIL())
-               return -1;
-
-       buf[0] = y_bit ? ECC_POINT_COMP_ODD : ECC_POINT_COMP_EVEN;
-       ret = crypto_bignum_to_bin(x, buf + 1, prime_len, prime_len);
-       if (ret <= 0)
-               return -1;
-       ret = wc_ecc_import_point_der(buf, 1 + 2 * ret, e->key.idx,
-                                     (ecc_point *) p);
-       if (ret != 0)
-               return -1;
-
-       return 0;
-}
-
-
 struct crypto_bignum *
 crypto_ec_point_compute_y_sqr(struct crypto_ec *e,
                              const struct crypto_bignum *x)