aboutsummaryrefslogtreecommitdiff
path: root/nizk/nizk.go
diff options
context:
space:
mode:
Diffstat (limited to 'nizk/nizk.go')
-rw-r--r--nizk/nizk.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/nizk/nizk.go b/nizk/nizk.go
deleted file mode 100644
index a8bdaae..0000000
--- a/nizk/nizk.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package nizk
-
-import (
- "crypto/sha512"
-
- "kesim.org/seal/curve"
-)
-
-// Common functions for the various proofs
-
-type Scalar = curve.Curve25519Scalar
-type Point = curve.Curve25519Point
-
-var Curve = curve.Curve25519
-var G = Curve.Generator()
-var One = Curve.ScalarOne()
-
-type Bytes interface {
- Bytes() []byte
-}
-
-type Bites []byte
-
-func (b Bites) Bytes() []byte { return b }
-
-func Challenge(bs ...Bytes) *Scalar {
- h512 := sha512.New()
- for _, p := range bs {
- h512.Write(p.Bytes())
- }
- ch, e := Curve.ScalarFromBytes(h512.Sum(nil))
- if e != nil {
- panic(e)
- }
- return ch
-}