From e735cff1d63145b89c4c48b9d73f037d3a4305f4 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Thu, 4 Apr 2024 21:24:05 +0200 Subject: harmonize variable names across packages --- commitment/commitment.go | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'commitment/commitment.go') diff --git a/commitment/commitment.go b/commitment/commitment.go index 31de03a..c958987 100644 --- a/commitment/commitment.go +++ b/commitment/commitment.go @@ -3,6 +3,8 @@ package commitment import ( + "fmt" + "kesim.org/seal/curve" ) @@ -21,30 +23,37 @@ type Bidder struct { 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 { - id *Scalar - v bool - x *Scalar - r *Scalar - e *BitCommitment + set bool + a *Scalar + b *Scalar + com *BitCommitment } type BitCommitment struct { - Id *Point - XRV *Point - X *Point - R *Point + Gab *Point + A *Point + B *Point Proofs struct { - X *Proof - R *Proof + A *Proof + B *Proof } } type Proof struct { - PV *Point `json:"V"` - Sr *Scalar `json:"r"` + 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