Module curve25519_dalek::backend::vector::avx2::edwards [−][src]
simd_backend
and (target features avx2
or avx512ifma
) and target feature avx2
and non-target feature avx512ifma
only.Expand description
Parallel Edwards Arithmetic for Curve25519.
This module currently has two point types:
-
ExtendedPoint
: a point stored in vector-friendly format, with vectorized doubling and addition; -
CachedPoint
: used for readdition.
Details on the formulas can be found in the documentation for the
parent avx2
module.
This API is designed to be safe: vectorized points can only be created from serial points (which do validation on decompression), and operations on valid points return valid points, so invalid point states should be unrepresentable.
This design goal is met, with one exception: the Neg
implementation for the CachedPoint
performs a lazy negation, so
that subtraction can be efficiently implemented as a negation and
an addition. Repeatedly negating a CachedPoint
will cause its
coefficients to grow and eventually overflow. Repeatedly negating
a point should not be necessary anyways.
Structs
A cached point with some precomputed variables used for readdition.
A point on Curve25519, using parallel Edwards formulas for curve operations.