diff options
author | Özgür Kesim <oec@kesim.org> | 2024-03-22 14:13:24 +0100 |
---|---|---|
committer | Özgür Kesim <oec@kesim.org> | 2024-03-22 14:13:24 +0100 |
commit | 4490545ebf701ceecbe0f4f7c5cfbe374c476cb4 (patch) | |
tree | e33339c690c78061d68e6e0bb4667ff853699e60 /veto | |
parent | 3ba341e3c464e7a92bc99fd7d8bde65737c1aac9 (diff) |
no need for id in Proof
Diffstat (limited to 'veto')
-rw-r--r-- | veto/veto.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/veto/veto.go b/veto/veto.go index 2b164bc..99fe7f9 100644 --- a/veto/veto.go +++ b/veto/veto.go @@ -8,13 +8,13 @@ import ( "io" "slices" - . "kesim.org/seal/curve" + "kesim.org/seal/curve" ) -type Scalar = Curve25519Scalar -type Point = Curve25519Point +type Scalar = curve.Curve25519Scalar +type Point = curve.Curve25519Point -var Curve = Curve25519 +var Curve = curve.Curve25519 // Representation of a vote with veto (if set to true) type Vote struct { @@ -51,7 +51,6 @@ type Commitment struct { type Proof struct { PV *Point `json:"V"` Sr *Scalar `json:"r"` - Id *Point `json:"id"` } // Generates the proof, aka Schnorr signature, for given priv and i. @@ -62,7 +61,7 @@ type Proof struct { // // Verification of the signature is by comparing V =?= g^r * g^(x*h) func proof(x *Scalar, id *Point) (pr *Proof, e error) { - pr = &Proof{Id: id} + pr = &Proof{} // choose random v v, e := Curve.ScalarFromReader(nil) @@ -154,7 +153,7 @@ func newVoteWithRand(veto bool, rand io.Reader) (v *Vote, e error) { v.private.id, e1 = Curve.ScalarFromReader(rand) v.private.x, e2 = Curve.ScalarFromReader(rand) - v.private.r, e3 = Curve.ScalarFromReader(rand) + v.private.r, e3 = Curve.ScalarFromReader(rand) e = combineErr(e1, e2, e3) if e != nil { |