Documentation ¶
Overview ¶
Package qndleq provides zero-knowledge proofs of Discrete-Logarithm Equivalence (DLEQ) on Qn.
This package implements proofs on the group Qn (the subgroup of squares in (Z/nZ)*).
Notation ¶
Z/nZ is the ring of integers modulo N. (Z/nZ)* is the multiplicative group of Z/nZ, a.k.a. the units of Z/nZ, the elements with inverse mod N. Qn is the subgroup of squares in (Z/nZ)*.
A number x belongs to Qn if
gcd(x, N) = 1, and exists y such that x = y^2 mod N.
References ¶
[DLEQ Proof] "Wallet databases with observers" by Chaum-Pedersen. https://doi.org/10.1007/3-540-48071-4_7
[Qn] "Practical Threshold Signatures" by Shoup. https://www.iacr.org/archive/eurocrypt2000/1807/18070209-new.pdf
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Proof ¶
func Prove ¶
Prove creates a DLEQ Proof that attests that the pairs (g,gx) and (h,hx) have the same discrete logarithm equal to x.
Given g, h in Qn (the subgroup of squares in (Z/nZ)*), it holds
gx = g^x mod N hx = h^x mod N x = Log_g(g^x) = Log_h(h^x)
Note: this function does not run in constant time because it uses big.Int arithmetic.