update dleq library (#142)

This commit is contained in:
noot
2022-08-01 21:54:32 -04:00
committed by GitHub
parent e9f437b7bb
commit 1d0482a7fc
10 changed files with 118 additions and 18 deletions

1
dleq/cgo-dleq Submodule

Submodule dleq/cgo-dleq added at d0716fb556

View File

@@ -32,6 +32,15 @@ func TestCGODLEq(t *testing.T) {
require.Equal(t, res.ed25519Pub[:], ed25519Pub)
}
func TestCGODLEq_Invalid(t *testing.T) {
proof, err := (&CGODLEq{}).Prove()
require.NoError(t, err)
proof.proof[0] = 0
_, err = (&CGODLEq{}).Verify(proof)
require.Error(t, err)
}
func TestProofSecretComputesVerifyPubKeys(t *testing.T) {
// It would be nice to increase the number of iterations, but it's pretty slow even at 128. We
// previously had an issue when X or Y needed at least one high order padding byte. The chance