Expand description
Scalar arithmetic modulo the Ed25519 group order.
ScalarEngine accepts wide and 256-bit reductions, modular multiply-add,
and canonicality commands through one fixed-latency state machine.
Structs§
- Scalar29
- Nine-limb radix-
2^29scalar representation used by Dalek-style reduction. - Scalar
Engine - Area-oriented scalar reduction, multiply-add, and canonicality engine.
- Scalar
Engine In - Command for
ScalarEngine. - Scalar
Engine Out - Response from
ScalarEngine. - Scalar
ModEngine - Four-word modular add-and-conditional-subtract engine.
- Scalar
ModIn - One modular add/subtract request for
ScalarModEngine. - Scalar
ModOut - Response from
ScalarModEngine. - Scalar
ModRegs - Registered datapath state for
ScalarModEngine. - Scalar
Radix16 - Balanced radix-16 scalar digits used by point multiplication.
- Scalar
Regs - Registered datapath state for
ScalarEngine. - Scalar
Words - Canonical-or-loose scalar stored as four little-endian 64-bit words.
Enums§
- Scalar
ModState - Internal state of
ScalarModEngine. - Scalar
State - High-level states of
ScalarEngine.
Constants§
- SCALAR_
OP_ CANONICAL - Report whether a 256-bit scalar is strictly less than
l. - SCALAR_
OP_ MUL_ ADD - Compute
c + a*b mod l. - SCALAR_
OP_ REDUCE_ 256 - Reduce a 256-bit value modulo
l. - SCALAR_
OP_ REDUCE_ WIDE - Reduce a 512-bit SHA-512 digest modulo
l.
Functions§
- scalar_
add_ kernel - Add four-word scalars with propagated carry.
- scalar_
add_ mod_ l_ kernel - Add two inputs known to require at most one subtraction of
l. - scalar_
engine_ kernel - Next-state/output kernel for
ScalarEngine. - scalar_
from_ bytes_ kernel - Parse 32 little-endian bytes into four scalar words without reduction.
- scalar_
ge_ kernel - Unsigned comparison
a >= bover four little-endian words. - scalar_
l - Return the Ed25519 group order
l. - scalar_
l_ kernel - Synthesizable group-order constructor.
- scalar_
mod_ engine_ kernel - Next-state/output kernel for
ScalarModEngine. - scalar_
radix16_ kernel - Recode a 256-bit little-endian scalar into 64 balanced radix-16 digits.
- scalar_
shift_ in_ kernel - Shift a scalar left and insert one low bit.
- scalar_
sub_ kernel - Subtract four-word scalars with propagated borrow.
- scalar_
to_ bytes_ kernel - Serialize four scalar words as 32 little-endian bytes.
- scalar_
zero - Return scalar zero.
- scalar_
zero_ kernel - Synthesizable scalar-zero constructor.