aboutsummaryrefslogtreecommitdiff
path: root/nizk/schnorr/schnorr_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'nizk/schnorr/schnorr_test.go')
-rw-r--r--nizk/schnorr/schnorr_test.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/nizk/schnorr/schnorr_test.go b/nizk/schnorr/schnorr_test.go
deleted file mode 100644
index 2adec8e..0000000
--- a/nizk/schnorr/schnorr_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package schnorr
-
-import (
- "testing"
-
- . "kesim.org/seal/common"
-)
-
-func TestSchnorr(t *testing.T) {
- a, e := Curve.ScalarFromReader(nil)
- if e != nil {
- t.Fatal(e)
- }
- A := G.Exp(a)
-
- id, e := Curve.ScalarFromReader(nil)
- if e != nil {
- t.Fatal(e)
- }
- ID := G.Exp(id)
-
- s := (*Statement)(a)
- c := (*Commitment)(A)
-
- pr := s.Proof(ID)
-
- if !c.Verify(pr, ID) {
- t.Fatalf("Verification failed!")
- }
-
- if c.Verify(pr, ID.Exp(a)) {
- t.Fatal("Verification didn't fail!")
- }
-}