From 8384d37643bc0285fd901aec33be3e185257f3ec Mon Sep 17 00:00:00 2001 From: tb <> Date: Thu, 9 Jan 2025 06:51:11 +0000 Subject: check_discriminant: make the assumptions on p, a, b more explicit requested by jsing --- src/lib/libcrypto/ec/ec_lib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index a50b1e5633..322662a1e6 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/lib/libcrypto/ec/ec_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_lib.c,v 1.103 2025/01/07 08:30:52 tb Exp $ */ +/* $OpenBSD: ec_lib.c,v 1.104 2025/01/09 06:51:11 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -623,7 +623,8 @@ EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx_in) goto err; /* - * Check that the discriminant 4a^3 + 27b^2 is non-zero modulo p. + * Check that the discriminant 4a^3 + 27b^2 is non-zero modulo p + * assuming that p > 3 is prime and that a and b are in [0, p). */ if (BN_is_zero(a) && BN_is_zero(b)) -- cgit v1.2.3-55-g6feb