aboutsummaryrefslogtreecommitdiff
path: root/nizk/stage2.go
diff options
context:
space:
mode:
authorÖzgür Kesim <oec@codeblau.de>2024-11-12 18:48:08 +0100
committerÖzgür Kesim <oec@codeblau.de>2024-11-12 18:48:08 +0100
commit79a53aa896b5fe0532f28dad2823e276433c31d0 (patch)
tree312bf9b46228fabd62408de243881476f900c1e2 /nizk/stage2.go
parente71b7a107b5441e7fa05366bf866cf223c649e7a (diff)
refactor bit and stages: common stages type for both statges
Diffstat (limited to 'nizk/stage2.go')
-rw-r--r--nizk/stage2.go27
1 files changed, 15 insertions, 12 deletions
diff --git a/nizk/stage2.go b/nizk/stage2.go
index be3d21f..d791ef8 100644
--- a/nizk/stage2.go
+++ b/nizk/stage2.go
@@ -26,15 +26,18 @@ type Stage2 struct {
a *Scalar
b *Scalar
- // Stage1
+ // Private data from previous stage1 or stage2
+ x_ *Scalar
+ y_ *Scalar
+ r_ *Scalar
+
+ // New stage2 private data
r *Scalar
x *Scalar
y *Scalar
- // Stage2
- r_ *Scalar
- x_ *Scalar
- y_ *Scalar
+ com *Stage2Commitment
+ prf *Stage2Proof
}
type Stage2Commitment struct {
@@ -43,17 +46,17 @@ type Stage2Commitment struct {
B *Point
C *Point
- // Stage1Commitment
- R *Point
- X *Point
- Y *Point
- Z *Point
-
- // New
+ // Previous Commitment
R_ *Point
X_ *Point
Y_ *Point
Z_ *Point
+
+ // Stage2Commitment
+ R *Point
+ X *Point
+ Y *Point
+ Z *Point
}
func NewStage2(typ Type) *Stage2 {