KemAlgorithm enum
Key-encapsulation mechanisms usable for encryption keys.
The id is the IANA HPKE KEM identifier (RFC 9180 registry, values from draft-ietf-hpke-pq), and is what appears on the wire.
Values
- mlKem512 → const KemAlgorithm
-
ML-KEM-512 (FIPS 203), NIST security category 1.
const KemAlgorithm(0x0040, 'ML-KEM-512', 1, 800, 768, 64, false) - mlKem768 → const KemAlgorithm
-
ML-KEM-768 (FIPS 203), NIST security category 3. The default.
const KemAlgorithm(0x0041, 'ML-KEM-768', 3, 1184, 1088, 64, false) - mlKem1024 → const KemAlgorithm
-
ML-KEM-1024 (FIPS 203), NIST security category 5.
const KemAlgorithm(0x0042, 'ML-KEM-1024', 5, 1568, 1568, 64, false) - xWing → const KemAlgorithm
-
X-Wing: ML-KEM-768 combined with X25519 (draft-connolly-cfrg-xwing-kem). Secure if either component is secure. Category 3 post-quantum.
const KemAlgorithm(0x647a, 'X-Wing', 3, 1216, 1120, 32, true)
Properties
- ciphertextLength → int
-
Encapsulation ciphertext length in bytes.
final
- encapsulationRandomLength → int
-
Randomness consumed by one encapsulation.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
Wire identifier (HPKE KEM id).
final
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- isHybrid → bool
-
Whether the KEM combines a classical and a post-quantum component.
final
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - publicKeyLength → int
-
Encapsulation (public) key length in bytes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- securityCategory → int
-
NIST post-quantum security category.
final
- seedLength → int
-
Length of the private key seed in bytes (the canonical private form).
final
-
Shared-secret length in bytes (32 for every supported KEM).
no setter
- standardName → String
-
Standard name.
final
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
-
fromId(
int id) → KemAlgorithm
Constants
-
values
→ const List<
KemAlgorithm> - A constant List of the values in this enum, in order of their declaration.