XWingFfiAlgo class final
X-Wing hybrid post-quantum/traditional KEM (draft-connolly-cfrg-xwing-kem-10) backed by OpenSSL 3 via Dart FFI.
X-Wing has no native OpenSSL primitive, so this composes MlKem768FfiAlgo
(ML-KEM-768) and X25519FfiAlgo (X25519). The seed expansion (SHAKE-256)
and the shared-secret combiner (SHA3-256) are pure-Dart (pointycastle) and
byte-identical to XWingPureDartAlgo, so public keys, ciphertexts and
shared secrets are fully interoperable between the FFI and pure-Dart
backends.
Unlike XWingPureDartAlgo, there is no derandomized encapsulation: OpenSSL's
ML-KEM encapsulation does not accept external randomness, so draft test
vectors are verified against the pure-Dart backend instead.
The caller loads libcrypto (e.g. via tryLoadLibCrypto) and passes the resulting DynamicLibrary in. at_chops does no auto-resolution.
- Implemented types
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
-
decapsulate(
Uint8List secretKey, Uint8List ciphertext) → Future< Uint8List> -
Recover the shared secret from
ciphertextusingsecretKey.override -
encapsulate(
Uint8List publicKey) → Future< ({Uint8List ciphertext, Uint8List sharedSecret})> -
Encapsulate a fresh shared secret against
publicKey.override -
generateKeyPair(
[Uint8List? seed]) → Future< ({Uint8List publicKey, Uint8List secretKey})> - Generate an X-Wing key pair.
-
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
Constants
- ciphertextLength → const int
- publicKeyLength → const int
- seedLength → const int