DeviceFips class final
Approved operations routed through the validated module of the platform
the app runs on: Apple corecrypto (CryptoKit) on iOS and macOS, the
Android platform providers (Conscrypt, BoringCrypto) on Android, and the
OpenSSL FIPS Provider (CMVP #4985) when the engine is the fips profile.
Every call may throw a FipsException; module says what served it.
Constructors
- DeviceFips.platform({FipsBackend? backend, CipherBird? engine})
-
The module for this platform.
backendoverrides it, for tests.factory
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
-
aesGcmDecrypt(
Uint8List key, Uint8List wire, {Uint8List? aad}) → Future< Uint8List> -
AES-256-GCM open; any failure is
authentication_failed. -
aesGcmEncrypt(
Uint8List key, Uint8List plaintext, {Uint8List? aad}) → Future< Uint8List> - AES-256-GCM: nonce(12) | ciphertext | tag(16), nonce from the module.
-
digest(
FipsHash hash, Uint8List data) → Future< Uint8List> -
Digest of
data. -
hkdf(
FipsHash hash, Uint8List ikm, {required int count, Uint8List? salt, Uint8List? info}) → Future< Uint8List> -
HKDF extract-and-expand to
countbytes. -
hmac(
FipsHash hash, Uint8List key, Uint8List data) → Future< Uint8List> -
HMAC of
dataunderkey(at least 14 bytes). -
module(
) → Future< FipsModuleInfo> - What performs the operations.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
p256Ecdh(
Uint8List privateKey, Uint8List peerPublic) → Future< Uint8List> - ECDH shared secret (32 bytes).
-
p256Keygen(
) → Future< KeyPairResult> - A fresh P-256 key pair: 65-byte public point, 32-byte scalar.
-
p256Sign(
Uint8List privateKey, Uint8List message) → Future< Uint8List> - ECDSA with SHA-256, DER signature.
-
p256Verify(
Uint8List publicKey, Uint8List message, Uint8List signature) → Future< bool> - ECDSA verification.
-
pbkdf2(
FipsHash hash, Uint8List password, Uint8List salt, {int iterations = 600000, int count = 32}) → Future< Uint8List> -
PBKDF2:
saltat least 16 bytes,iterationsat least 1000. -
random(
int count) → Future< Uint8List> -
countbytes from the module's DRBG. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited