From 56d74437b03004e54ed86d99f30ce5f2c335cda8 Mon Sep 17 00:00:00 2001 From: Jonathan LEI Date: Sun, 29 Oct 2023 08:55:54 +0000 Subject: [PATCH] fix: incorrect upper bound for `s` --- starknet-crypto/src/ecdsa.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starknet-crypto/src/ecdsa.rs b/starknet-crypto/src/ecdsa.rs index 9debb689..35980601 100644 --- a/starknet-crypto/src/ecdsa.rs +++ b/starknet-crypto/src/ecdsa.rs @@ -138,7 +138,7 @@ pub fn verify( if r == &FieldElement::ZERO || r >= &ELEMENT_UPPER_BOUND { return Err(VerifyError::InvalidR); } - if s == &FieldElement::ZERO || s >= &EC_ORDER { + if s == &FieldElement::ZERO || s >= &ELEMENT_UPPER_BOUND { return Err(VerifyError::InvalidS); }