aboutsummaryrefslogtreecommitdiff
path: root/nizk/commit_test.go
diff options
context:
space:
mode:
authorÖzgür Kesim <oec@codeblau.de>2024-11-14 20:16:07 +0100
committerÖzgür Kesim <oec@codeblau.de>2024-11-14 20:16:07 +0100
commitaf8cde07213596f1064628833ada0a105b6b5461 (patch)
tree39a83e6533eefa28c98fe2af62b252fffb086cc4 /nizk/commit_test.go
parent04c4b67fcaa85c9b4d8bc379b6938a169866e093 (diff)
simplify api even more, make it also more robust
Diffstat (limited to 'nizk/commit_test.go')
-rw-r--r--nizk/commit_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/nizk/commit_test.go b/nizk/commit_test.go
index 3d65aa4..a09ae70 100644
--- a/nizk/commit_test.go
+++ b/nizk/commit_test.go
@@ -9,9 +9,9 @@ import (
func TestStatement(t *testing.T) {
id := Curve.RandomScalar()
- st1, st2 := NewBit(id, true), NewBit(id, false)
- c1, p1 := st1.Commit()
- c2, p2 := st2.Commit()
+ _, c1, p1 := NewBit(id, true)
+ _, c2, p2 := NewBit(id, false)
+
if !c1.Verify(id, p1) {
t.Fatal("Could not verify st1 with c1, plus=true case")
}
@@ -34,9 +34,9 @@ func TestStatement(t *testing.T) {
func TestStatementFromScalar(t *testing.T) {
var α, β, id = Curve.RandomScalar(), Curve.RandomScalar(), Curve.RandomScalar()
- st1, st2 := NewBitFromScalars(id, true, α, β), NewBitFromScalars(id, false, α, β)
- c1, p1 := st1.Commit()
- c2, p2 := st2.Commit()
+ _, c1, p1 := NewBitFromScalars(id, true, α, β)
+ _, c2, p2 := NewBitFromScalars(id, false, α, β)
+
if !c1.Verify(id, p1) {
t.Fatal("Could not verify st1 with c1, plus=true case")
}