aboutsummaryrefslogtreecommitdiff
path: root/nizk/stage2_test.go
blob: 7edcf8004537b5f644d8d669dca6747220188217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package nizk

import (
	"testing"

	. "kesim.org/seal/common"
)

func TestStage2Simple(t *testing.T) {
	id := Curve.RandomScalar()
	b1 := NewBit(id, false)
	b2 := NewBit(id, false)
	s1, c1, _ := b1.CommitStage1()
	curr, _ := b2.Commit()

	_, c2, p2 := b2.CommitStage2(true, s1)
	if !curr.VerifyStage2(c1, c2, p2) {
		t.Fatal("Could not verify stage2")
	}

}

func TestStage2FromScalar(t *testing.T) {

}