From 6348a8b189ccd10c7b4751b0524b388e699fc26e Mon Sep 17 00:00:00 2001 From: ycen Date: Fri, 9 Feb 2024 09:30:53 +0800 Subject: [PATCH] Update range proof --- crypto/mta/range_proof.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crypto/mta/range_proof.go b/crypto/mta/range_proof.go index 1c5b3a0e..dfd43257 100644 --- a/crypto/mta/range_proof.go +++ b/crypto/mta/range_proof.go @@ -141,6 +141,15 @@ func (pf *RangeProofAlice) Verify(ec elliptic.Curve, pk *paillier.PublicKey, NTi if pf.S2.Cmp(q) == -1 { return false } + if pf.S.Cmp(one) == 0 { + return false + } + if pf.Z.Cmp(one) == 0 { + return false + } + if pf.S1.Cmp(pf.S2) == 0 { + return false + } // 3. if pf.S1.Cmp(q3) == 1 {