diff options
author | Özgür Kesim <oec@codeblau.de> | 2024-04-05 18:06:35 +0200 |
---|---|---|
committer | Özgür Kesim <oec@codeblau.de> | 2024-04-05 18:06:35 +0200 |
commit | 5733f293044bfe0d3210e7c4688172d53d54a7e0 (patch) | |
tree | b8f3da57d83410a9b3f7efe0b856729ca48d804b /commitment/commitment.go | |
parent | e735cff1d63145b89c4c48b9d73f037d3a4305f4 (diff) |
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
Diffstat (limited to 'commitment/commitment.go')
-rw-r--r-- | commitment/commitment.go | 59 |
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 |