From 923b86a67b7d56462242c7f45c01839c84c390fb Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Tue, 12 Apr 2022 14:35:37 +0200 Subject: [PATCH] fix isOnCurve check this needs to be changed as well when switching between G1 and G2 Signed-off-by: Csaba Kiraly --- dagger/storageproofs/backends/backend_constantine.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dagger/storageproofs/backends/backend_constantine.nim b/dagger/storageproofs/backends/backend_constantine.nim index 5eb693ba..e868b56b 100644 --- a/dagger/storageproofs/backends/backend_constantine.nim +++ b/dagger/storageproofs/backends/backend_constantine.nim @@ -106,7 +106,7 @@ func ec_fr_mul*(res: var Fr[C], a, b: Fr[C]) = func ec_p1_on_curve*(p: ec_p1) : bool = var aff : ec_p1_affine aff.affine(p) - (bool) isOnCurve(aff.x, aff.y, G1) + (bool) isOnCurve(aff.x, aff.y, G2) func ec_keygen*(ikm: array[32, byte], pk: var PublicKey, sk: var SecretKey) : bool = # TODO: HKDF key generation as in spec (https://tools.ietf.org/html/draft-irtf-cfrg-bls-signature#section-2.3)