MLDSAEncoding class
Bit-packing/unpacking of ML-DSA keys, signatures, and polynomials (FIPS 204 Algorithms 16-25).
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
bitPack(
Poly p, int a, int b, {int? bits}) → List< int> -
BitPack for coefficients in
-a, b. -
bitUnpack(
List< int> bytes, int a, int b, {int? bits}) → Poly -
decompose(
int r, int gamma2) → (int, int) - Decompose(r) with respect to α = 2·γ2 → (r1, r0).
-
highBits(
int r, int gamma2) → int -
lowBits(
int r, int gamma2) → int -
makeHint(
int z, int r, int gamma2) → int - MakeHint – optimised form used by the reference implementation / noble / KATs. This is the version that appears after the sign-side transformation r0 += ct0.
-
pkDecode(
List< int> pk, int k) → (List<int> , PolyVec) -
pkEncode(
List< int> rho, PolyVec t1) → BuBytes - pkEncode(ρ, t1) – public key encoding.
-
power2Round(
int r) → (int, int) -
sigEncode(
List< int> cTilde, PolyVec z, List<List< h, int gamma1, int omega, int k) → BuBytesint> > - sigEncode(c̃, z, h)
-
simpleBitPack(
Poly p, int b) → List< int> -
Pack polynomial coefficients that lie in
0, 2^b - 1into bytes. -
simpleBitUnpack(
List< int> bytes, int b) → Poly -
Unpack into coefficients in
0, 2^b - 1. -
skEncode(
List< int> rho, List<int> K, List<int> tr, PolyVec s1, PolyVec s2, PolyVec t0, int eta) → BuBytes - skEncode – expanded secret key.
-
useHint(
int h, int r, int gamma2) → int - UseHint(h, r) – recovers high bits using the hint.