aboutsummaryrefslogtreecommitdiff
path: root/commitment/commitment.go
diff options
context:
space:
mode:
Diffstat (limited to 'commitment/commitment.go')
-rw-r--r--commitment/commitment.go59
1 files changed, 0 insertions, 59 deletions
diff --git a/commitment/commitment.go b/commitment/commitment.go
deleted file mode 100644
index c958987..0000000
--- a/commitment/commitment.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Implements the data structures and methods for
-// creating a commitment for the SEAL protocol
-package commitment
-
-import (
- "fmt"
-
- "kesim.org/seal/curve"
-)
-
-type Scalar = curve.Curve25519Scalar
-type Point = curve.Curve25519Point
-
-var Curve = curve.Curve25519
-
-type Bidder struct {
- private struct {
- id *Scalar
- }
- Id *Point
-}
-
-type Bid struct {
- Bidder *Point
- zbid uint64 // bigendian encoding of the bid
- n uint8 // number of bits encoded in zbid.
- bits []Bit // derived from zbid
-}
-
-type Bit struct {
- set bool
- a *Scalar
- b *Scalar
- com *BitCommitment
-}
-
-type BitCommitment struct {
- Gab *Point
- A *Point
- B *Point
-
- Proofs struct {
- A *Proof
- B *Proof
- }
-}
-
-type Proof struct {
- V *Point `json:"V"`
- R *Scalar `json:"r"`
-}
-
-func NewBid(price uint64, bitlength uint8) (*Bidder, error) {
- if bitlength > 63 {
- return nil, fmt.Errorf("bitlength too large, maximum is 63")
- }
-
- return nil, fmt.Errorf("NewBid not implemented")
-} \ No newline at end of file