KemPure class

Pure Dart development KEM implementation for protocol testing.

WARNING: This is NOT a cryptographically secure KEM. It is a deterministic simulation that enables correct protocol-level testing without requiring native ML-KEM (Kyber) bindings.

Construction:

Encap and decap produce identical shared secrets because both use the same pk-derived HMAC key and the same ephemeral value.

Implemented types

Constructors

KemPure(SecurityLevel level)
Creates a KemPure for the given level.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
level SecurityLevel
The security level that determines parameter sizes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decap(Uint8List secretKey, Uint8List ciphertext) Uint8List
Decapsulates a shared secret from ciphertext using secretKey.
override
encap(Uint8List publicKey) KemEncapsulation
Encapsulates a shared secret under the given publicKey.
override
keyGen() KemKeyPair
Generates a fresh KEM key pair.
override
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