Expand description
Edwards-point arithmetic, scalar multiplication, and point encoding.
This module re-exports the point controller, balanced-radix-16 scalar multiplier, strict compression/decompression controller, and the constant-time 32-byte equality kernel used by verification.
Modules§
- parallel_
point - Level-scheduled Edwards formulas over four field engines.
Structs§
- Edwards
Point - Extended Edwards point
(X:Y:Z:T)overFieldElement2625. - Parallel
Point OpController - Four-lane level scheduler for extended Edwards formulas.
- Parallel
Point OpController In - Point request plus four shared field-lane responses.
- Parallel
Point OpController Out - Point response plus commands for four shared field lanes.
- Parallel
Point OpRegs - Registered operation, formula-level, lane-mask, and identity state.
- Point
Codec Controller - Point-codec controller using field exponentiation, canonical codec, and a shared field-multiplier response.
- Point
Codec Controller In - External point-codec command plus shared field-multiplier response.
- Point
Codec Controller Out - External point-codec response plus shared field-multiplier command.
- Point
Codec Engine - Self-contained point codec with a private parallel field multiplier.
- Point
Codec In - Point-codec command.
- Point
Codec Out - Point-codec response.
- Point
Control Regs - Registered control state for
PointOpController. - Point
Micro Instruction - Decoded 16-bit point-formula microinstruction.
- Point
OpController - Serial microcoded point-operation controller using a shared field engine.
- Point
OpController In - External command and shared field-multiplier response.
- Point
OpController Out - External response and shared field-multiplier command.
- Point
OpEngine - Self-contained point engine using the four-lane parallel controller/bank.
- Point
OpIn - Point operation or one-word Niels-table load request.
- Point
OpOut - Point-operation response and retained point views.
- Projective
Niels Point - Cached Projective Niels representation used by mixed addition.
- Scalar
MulController - Controller with eight identically addressed local Niels-table BRAM banks.
- Scalar
MulController In - Scalar command plus response from the shared point controller.
- Scalar
MulController Out - Scalar response plus command for the shared point controller.
- Scalar
MulEngine - Self-contained scalar multiplier using a private point-operation engine.
- Scalar
MulIn - Scalar-multiplication request.
- Scalar
MulOut - Scalar-multiplication response and constant-pattern instrumentation.
- Scalar
MulRegs - Registered recoding, table address, digit, and instrumentation state.
Enums§
- Parallel
Point OpState - Formula launch, wait, and completion states.
- Point
OpState - Fetch, launch, wait, and completion states of
PointOpController. - Scalar
MulState - Table-generation, recoding, fixed scan, point-operation, and completion states.
Constants§
- CODEC_
COMPRESS_ INV - Invert projective
Zduring compression. - CODEC_
COMPRESS_ X - Multiply
XbyZ^-1. - CODEC_
COMPRESS_ X_ ENCODE - Encode affine
xto obtain its parity bit. - CODEC_
COMPRESS_ Y - Multiply
YbyZ^-1. - CODEC_
COMPRESS_ Y_ ENCODE - Encode affine
yand attach thexparity bit. - CODEC_
DECOMPRESS_ ADJUST - Adjust the root by
sqrt(-1)when required. - CODEC_
DECOMPRESS_ CANDIDATE_ ENCODE - Encode the candidate to determine sign and zero properties.
- CODEC_
DECOMPRESS_ CANONICAL - Decode
yand begin canonicality validation. - CODEC_
DECOMPRESS_ CANONICAL_ COMPARE - Re-encode decoded
yfor canonical comparison. - CODEC_
DECOMPRESS_ CHECK - Check the candidate against the curve equation.
- CODEC_
DECOMPRESS_ CHECK_ COMPARE - Compare canonical root-check encodings.
- CODEC_
DECOMPRESS_ CHECK_ ENCODE_ LEFT - Encode the left side of the root check.
- CODEC_
DECOMPRESS_ CHECK_ ENCODE_ RIGHT - Encode the right side of the root check.
- CODEC_
DECOMPRESS_ DY2 - Compute
d*y^2. - CODEC_
DECOMPRESS_ NEGATE - Negate
xto match the encoded sign bit. - CODEC_
DECOMPRESS_ SQRT - Compute a fixed-chain square-root candidate.
- CODEC_
DECOMPRESS_ T - Compute extended coordinate
T = X*YwithZ = 1. - CODEC_
DECOMPRESS_ U - Compute numerator
u = y^2 - 1. - CODEC_
DECOMPRESS_ V - Compute denominator
v = d*y^2 + 1. - CODEC_
DECOMPRESS_ V_ INV - Invert
v. - CODEC_
DECOMPRESS_ X2 - Compute
x^2 = u/v. - CODEC_
DECOMPRESS_ Y2 - Compute
y^2. - CODEC_
DONE - Present a completed codec result.
- CODEC_
IDLE - Waiting for a compression/decompression command.
- POINT_
CODEC_ COMPRESS - Compress an extended point to 32-byte Edwards-Y form.
- POINT_
CODEC_ DECOMPRESS - Strictly decompress a 32-byte Edwards-Y encoding.
- POINT_
OP_ ADD_ NIELS - Add a Projective Niels point to an extended Edwards point.
- POINT_
OP_ DOUBLE - Double an extended Edwards point.
- POINT_
OP_ IS_ IDENTITY - Test whether an extended point represents the identity.
- POINT_
OP_ TO_ NIELS - Convert an extended point into Projective Niels form.
Functions§
- bytes32_
equal_ kernel - Compare all bytes of two 32-byte arrays with a fixed boolean structure.
- ed25519_
basepoint - Return the canonical Ed25519 base point in extended coordinates.
- ed25519_
basepoint_ kernel - Synthesizable Ed25519 base-point constructor.
- edwards_
d2_ kernel - Return Edwards25519 curve constant
2*d. - edwards_
d_ kernel - Return Edwards25519 curve constant
d. - edwards_
identity - Return the extended identity
(0:1:1:0). - edwards_
identity_ kernel - Synthesizable extended-identity constructor.
- get_
field_ limb_ kernel - Read one limb from a field element using a digital limb index.
- negate_
niels_ kernel - Negate a Projective Niels point without inversion.
- negate_
point_ kernel - Negate an extended Edwards point.
- niels_
identity - Return the Projective Niels identity.
- niels_
identity_ kernel - Synthesizable Projective Niels identity constructor.
- niels_
word_ kernel - Read one of the forty 32-bit words in a Projective Niels point.
- parallel_
point_ op_ controller_ kernel - Next-state/output kernel for
ParallelPointOpController. - point_
codec_ controller_ kernel - Next-state/output kernel for
PointCodecController. - point_
codec_ engine_ kernel - Wires
PointCodecControllerto its private field multiplier. - point_
codec_ initial_ regs - Return the idle point-codec register tuple.
- point_
decode_ instruction_ kernel - Decode one packed point microinstruction.
- point_
identity_ registers - Return the nine retained microcode registers initialized to point identities.
- point_
instruction_ address_ kernel - Map a point operation and step to the microcode ROM address.
- point_
load_ registers_ kernel - Load point/Niels operands into the microcode register file.
- point_
op_ controller_ kernel - Next-state/output kernel for
PointOpController. - point_
op_ engine_ kernel - Wires
ParallelPointOpControllertoParallelFieldMulBank4. - point_
select_ register_ kernel - Select a field operand from the point register file or constant sources.
- point_
write_ register_ kernel - Write one field result to the selected point register.
- scalar_
mul_ controller_ kernel - Next-state/output kernel for
ScalarMulController. - scalar_
mul_ engine_ kernel - Wires
ScalarMulControllerto its private point-operation engine. - set_
field_ limb_ kernel - Replace one limb in a field element using a digital limb index.
- set_
niels_ word_ kernel - Replace one of the forty 32-bit words in a Projective Niels point.
- sqrt_
m1_ kernel - Return the field square root of
-1used by point decompression.
Type Aliases§
- Point
Codec Action - Mutable register/child-command action returned by a transition sub-kernel.
- Point
Codec Context - Read-only context supplied to each codec transition sub-kernel.
- Point
Codec Regs - Compact retained codec state: state, three field temporaries, and flags.
- Point
Codec State - Five-bit point-codec state encoding.