Skip to content

Commit a6e264c

Browse files
authored
zk/qndleq: document Qn membership precondition (#675)
1 parent 7c4a0a2 commit a6e264c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

zk/qndleq/qndleq.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ func Prove(random io.Reader, x, g, gx, h, hx, N *big.Int, secParam uint) (*Proof
118118
}
119119

120120
// Verify checks whether x = Log_g(g^x) = Log_h(h^x).
121+
//
122+
// The caller must ensure that g, gx, h, and hx are in Qn. Verify only checks
123+
// their bounds; Qn membership cannot be checked without additional information
124+
// about N and must be established separately for attacker-controlled inputs.
121125
func (p Proof) Verify(g, gx, h, hx, N *big.Int) bool {
122126
err := checkBounds(N, g, gx, h, hx)
123127
if err != nil {

0 commit comments

Comments
 (0)