mirror of
https://github.com/SwingbyProtocol/tss-lib.git
synced 2026-01-09 13:57:58 -05:00
Merge remote-tracking branch 'binance/master'
This commit is contained in:
@@ -81,7 +81,7 @@ func TestSchnorrVProofVerifyBadPartialV(t *testing.T) {
|
||||
proof, _ := NewZKVProof(V, R, s, l)
|
||||
res := proof.Verify(V, R)
|
||||
|
||||
assert.False(t, res, "verify result must be true")
|
||||
assert.False(t, res, "verify result must be false")
|
||||
}
|
||||
|
||||
func TestSchnorrVProofVerifyBadS(t *testing.T) {
|
||||
@@ -98,5 +98,5 @@ func TestSchnorrVProofVerifyBadS(t *testing.T) {
|
||||
proof, _ := NewZKVProof(V, R, s2, l)
|
||||
res := proof.Verify(V, R)
|
||||
|
||||
assert.False(t, res, "verify result must be true")
|
||||
assert.False(t, res, "verify result must be false")
|
||||
}
|
||||
|
||||
@@ -37,11 +37,12 @@ func (round *finalization) Start() *tss.Error {
|
||||
edwards25519.ScMulAdd(&tmpSumS, sumS, bigIntToEncodedBytes(big.NewInt(1)), sjBytes)
|
||||
sumS = &tmpSumS
|
||||
}
|
||||
s := encodedBytesToBigInt(sumS)
|
||||
|
||||
// save the signature for final output
|
||||
round.data.Signature = append(bigIntToEncodedBytes(round.temp.r)[:], sumS[:]...)
|
||||
round.data.R = round.temp.r.Bytes()
|
||||
round.data.S = sumS[:]
|
||||
round.data.S = s.Bytes()
|
||||
round.data.M = round.temp.m.Bytes()
|
||||
|
||||
pk := edwards.PublicKey{
|
||||
@@ -49,7 +50,6 @@ func (round *finalization) Start() *tss.Error {
|
||||
X: round.key.EDDSAPub.X(),
|
||||
Y: round.key.EDDSAPub.Y(),
|
||||
}
|
||||
s := encodedBytesToBigInt(sumS)
|
||||
|
||||
ok := edwards.Verify(&pk, round.temp.m.Bytes(), round.temp.r, s)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user