Documentation ¶
Index ¶
- Variables
- func IntervalL(rand io.Reader) *safenum.Int
- func IntervalLEps(rand io.Reader) *safenum.Int
- func IntervalLEpsN(rand io.Reader) *safenum.Int
- func IntervalLN(rand io.Reader) *safenum.Int
- func IntervalLPrime(rand io.Reader) *safenum.Int
- func IntervalLPrimeEps(rand io.Reader) *safenum.Int
- func IntervalScalar(rand io.Reader, group curve.Curve) *safenum.Int
- func ModN(rand io.Reader, n *safenum.Modulus) *safenum.Nat
- func Paillier(rand io.Reader, pl *pool.Pool) (p, q *safenum.Nat)
- func Pedersen(rand io.Reader, phi *safenum.Nat, n *safenum.Modulus) (s, t, lambda *safenum.Nat)
- func QNR(rand io.Reader, n *safenum.Modulus) *safenum.Nat
- func Scalar(rand io.Reader, group curve.Curve) curve.Scalar
- func ScalarPointPair(rand io.Reader, group curve.Curve) (curve.Scalar, curve.Point)
- func ScalarUnit(rand io.Reader, group curve.Curve) curve.Scalar
- func UnitModN(rand io.Reader, n *safenum.Modulus) *safenum.Nat
Constants ¶
This section is empty.
Variables ¶
var ErrMaxIterations = fmt.Errorf("sample: failed to generate after %d iterations", maxIterations)
Functions ¶
func IntervalLEps ¶
IntervalLEps returns an integer in the range ± 2ˡ⁺ᵉ, but with constant-time properties.
func IntervalLEpsN ¶
IntervalLEpsN returns an integer in the range ± 2ˡ⁺ᵉ•N, where N is the size of a Paillier modulus.
func IntervalLN ¶
IntervalLN returns an integer in the range ± 2ˡ•N, where N is the size of a Paillier modulus.
func IntervalLPrime ¶
IntervalLPrime returns an integer in the range ± 2ˡ', but with constant-time properties.
func IntervalLPrimeEps ¶
IntervalLPrimeEps returns an integer in the range ± 2ˡ'⁺ᵉ, but with constant-time properties.
func IntervalScalar ¶
IntervalScalar returns an integer in the range ±q, with q the size of a Scalar.
func Paillier ¶
Paillier generate the necessary integers for a Paillier key pair. p, q are safe primes ((p - 1) / 2 is also prime), and Blum primes (p = 3 mod 4) n = pq.
func ScalarPointPair ¶
ScalarPointPair returns a new *curve.Scalar/*curve.Point tuple (x,X) by reading bytes from rand. The tuple satisfies X = x⋅G where G is the base point of the curve.
func ScalarUnit ¶
ScalarUnit returns a new *curve.Scalar by reading bytes from rand.
Types ¶
This section is empty.