Expand description
A collection of utilities used by our other libraries in this workspace.
- Pedersen commitment
- Elgamal encryption, including Hashed Elgamal
- finite field utilities like inner product, weighted inner product, hadamard product, etc.
- multiscalar multiplication (MSM) like Fixed Base MSM
- polynomial utilities like multiplying polynomials, creating polynomial from roots, etc.
- An efficient way to check several equality relations involving pairings by combining the relations in a random linear combination and doing a multi-pairing check. Relies on Schwartz–Zippel lemma.
- An efficient way to check several equality relations involving scalar multiplications by combining the relations in a random linear combination and doing a single multi-scalar multiplication check. Relies on Schwartz–Zippel lemma.
- hashing utilities like hashing arbitrary bytes to field element or group element.
- solving discrete log using Baby Step Giant Step algorithm
Modules§
- aliases
- commitment
- Pedersen commitment
- ecies
- Elliptic Curve Integrated Encryption Scheme (ECIES)
- elgamal
- Elgamal encryption and variations - plain Elgamal, hashed-Elgamal and batched hashed-Elgamal Elgamal encryption and some variations Implements:
- extend_
some - ff
- Finite field utilities like inner product, weighted inner product, hadamard product, etc
- hashing_
utils - Hashing utilities like hashing arbitrary bytes to field element or group element
- iter
- macros
- misc
- msm
- Multiscalar multiplication (MSM) like Fixed Base MSM
- owned_
pairs - pairs
- poly
- Polynomial utilities like multiplying polynomials, creating polynomial from roots, etc
- randomized_
mult_ checker - An efficient way to check several equality relations involving scalar multiplications by combining the relations in a random linear combination and doing a single multi-scalar multiplication. Relies on Schwartz–Zippel lemma.
- randomized_
pairing_ check - An efficient way to check several equality relations involving pairings by combining the relations in a random linear combination and doing a multi-pairing check. Relies on Schwartz–Zippel lemma.
- schnorr_
signature - serde_
utils - Serde serialization for
arkworks-rs
objects they themselves don’t implement serde - signature
- solve_
discrete_ log - Solving discrete log using Baby Step Giant Step
- transcript
- Merlin transcripts
- try_
iter
Macros§
- affine_
group_ element_ from_ byte_ slices - Concatenates provided byte slices and hashes result to a point on the curve. Returns as Affine coordinates.
- cfg_
iter_ sum - concat_
slices - Concatenates supplied slices into one continuous vector.
- expect_
equality - Return
$error
if$left
not equals$right
- impl_
deref - Implements
Deref
/DeferMut
traits for the supplied wrapper and type. - impl_
indexed_ iter impl DoubleEndedIterator + ExactSizeIterator
orimpl IndexedParallelIterator
depending on theparallel
feature.- impl_
into_ indexed_ iter impl IntoIterator
whereIntoIter: DoubleEndedIterator + ExactSizeIterator
orimpl IntoParallelIterator
whereIter: IndexedParallelIterator
depending on theparallel
feature.- impl_
into_ iter impl IntoIterator
orimpl IntoParallelIterator
depending on theparallel
feature.- impl_
iter impl Iterator
orimpl ParallelIterator
depending on theparallel
feature.- join
- Flattened
rayon::join(|| expr1, || rayon::join(|| expr2, || ...))
- multi_
pairing - Calculates the product of pairing for supplied pairs.
- owned_
pairs - Converts given vectors to
OwnedPairs
, panics in case of error. - pair_
g1_ g2 - Return pairing where
$pairing_func
is the pairing function,$g1
is/are group G1 elements and$g2
is/are group G2 elements - pair_
g2_ g1 - Return pairing where
$pairing_func
is the pairing function,$g1
is/are group G1 elements and$g2
is/are group G2 elements - pairs
- Builds
Pairs
from the given slices, panics in case of error. - randomized_
pairing_ checker_ g1_ g2 - randomized_
pairing_ checker_ g2_ g1 - try_
owned_ pairs - Attempts to build
OwnedPairs
from the given vectors, returning(left length, right length)
in case of error. - try_
pairs - Attempts to convert given slices to
Pairs
, returning(left length, right length)
in case of error. - unnest_
tuple (a, (b, c)) => (a, b, c)