From 5733f293044bfe0d3210e7c4688172d53d54a7e0 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Fri, 5 Apr 2024 18:06:35 +0200 Subject: client: started work on API for client, wip - auction defines description of an auction - client creates auction object, given a description - commitment/* merged into client --- commitment/commitment.go | 59 ------------------------------------------------ 1 file changed, 59 deletions(-) delete mode 100644 commitment/commitment.go (limited to 'commitment/commitment.go') 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 -- cgit v1.2.3