Documentation ¶
Index ¶
- Variables
- func IntervalEps(rand io.Reader) *saferith.Int
- func IntervalL(rand io.Reader) *saferith.Int
- func IntervalLEps(rand io.Reader) *saferith.Int
- func IntervalLEpsN(rand io.Reader) *saferith.Int
- func IntervalLEpsN2(rand io.Reader) *saferith.Int
- func IntervalLEpsRootN(rand io.Reader) *saferith.Int
- func IntervalLN(rand io.Reader) *saferith.Int
- func IntervalLN2(rand io.Reader) *saferith.Int
- func IntervalLPrime(rand io.Reader) *saferith.Int
- func IntervalLPrimeEps(rand io.Reader) *saferith.Int
- func IntervalScalar(rand io.Reader, group curve.Curve) *saferith.Int
- func ModN(rand io.Reader, n *saferith.Modulus) *saferith.Nat
- func Paillier(rand io.Reader, pl *pool.Pool) (p, q *saferith.Nat)
- func Pedersen(rand io.Reader, phi *saferith.Nat, n *saferith.Modulus) (s, t, lambda *saferith.Nat)
- func QNR(rand io.Reader, n *saferith.Modulus) *saferith.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 *saferith.Modulus) *saferith.Nat
Constants ¶
This section is empty.
Variables ¶
var ErrMaxIterations = fmt.Errorf("sample: failed to generate after %d iterations", maxIterations)
Functions ¶
func IntervalEps ¶
IntervalEps returns an integer in the range ± 2ᵉ, but with constant-time properties.
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 IntervalLEpsN2 ¶
IntervalLEpsN2 returns an integer in the range ± 2ˡ⁺ᵉ•N², where N is the size of a Paillier modulus.
func IntervalLEpsRootN ¶
IntervalLEpsRootN 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 IntervalLN2 ¶
IntervalLN2 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.