]> git.codecow.com Git - Monocypher.git/commitdiff
removed useless check
authorLoup Vaillant <loup@loup-vaillant.fr>
Sat, 6 Jan 2018 12:46:05 +0000 (13:46 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sat, 6 Jan 2018 12:46:05 +0000 (13:46 +0100)
If the public key is not in the curve, the verification will simply
fail.  There is little point verifying the validity of a signing public
key, since you have to trust its origin in the first place.

src/monocypher.c
src/monocypher.h

index b4828f118c74c074b0d10a93cb0a5e8f7715212d..334b0cd40b938c70953cc81e88fb36004ac1faab 100644 (file)
@@ -1602,12 +1602,6 @@ void crypto_sign(u8        signature[64],
     crypto_sign_final           (&ctx, signature);
 }
 
-int crypto_check_public_key(const u8 public_key[32])
-{
-    ge A; // wasted result.
-    return ge_frombytes_neg(&A, public_key);
-}
-
 void crypto_check_init(crypto_check_ctx *ctx,
                       const u8 signature[64],
                       const u8 public_key[32])
index 4014b506285924c1d5e2bb6b71c273cef13115eb..9e2b035106b6095831d75171f5c06d594c567aa6 100644 (file)
@@ -180,8 +180,6 @@ void crypto_sign(uint8_t        signature [64],
                  const uint8_t  public_key[32], // optional, may be 0
                  const uint8_t *message, size_t message_size);
 
-int crypto_check_public_key(const uint8_t public_key[32]);
-
 // EdDSA check context.  Do not rely on its contents or its size, they
 // may change without notice.
 typedef struct {