From 5d01446c77c7ef4e20189c59a4d0f9db2c71a4e9 Mon Sep 17 00:00:00 2001 From: ycen <44356973+yycen@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:18:00 +0800 Subject: [PATCH] Update range proof (#289) --- 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 {