ffr_crypto 0.0.5
ffr_crypto: ^0.0.5 copied to clipboard
A Flutter-first, Rust-powered cryptography package with native RSA, AEAD, hashing, KDF, ECC, compatibility primitives, and typed workflows.
0.0.5 #
- Add isolated
ffr_crypto_primitives.dartandffr_crypto_flow.dartentrypoints without changing existing imports or APIs. - Add validated RSA PKCS#1 v1.5 block-type-1 public recovery for compatibility protocols.
- Add strict hexadecimal, canonical standard Base64, and Rust-backed constant-time byte comparison utilities.
- Add immutable typed single-use flows, built-in recovery/hash/encoding/comparison steps, explicit custom callbacks, cooperative cancellation, and contextual flow errors.
- Add fixed Node and OpenSSL RSA interoperability fixtures with reproducible generators.
- Document explicit package layers, compatibility constraints, flow lifecycle, cancellation, error context, and resource ownership.
0.0.4 #
- Fix leftover class name references (
CryptoRandom,CryptoHash,CryptoHasher) in the README.md usage examples.
0.0.3 #
- Fix class reference renames (
CryptoRandomandCryptoHash) in the example application (example/lib/main.dart).
0.0.2 #
Breaking Changes #
Randomrenamed toCryptoRandomto avoid shadowingdart:math'sRandomclass.Hashrenamed toCryptoHashto prevent conflicts with user-defined or third-partyHashsymbols.Hasherrenamed toCryptoHasherfor consistency with the above rename.
Migration: find-and-replace Random. → CryptoRandom., Hash. → CryptoHash., Hasher → CryptoHasher.
0.0.1 #
Initial release of ffr_crypto — a Flutter-first, Rust-powered native cryptography package built on Dart FFI and Flutter Native Assets.
Features #
- Secure Random — CSPRNG-backed
Random.secureBytes()for cryptographically secure byte generation. - RSA Asymmetric Cryptography
- RSA-OAEP encryption and decryption (2048, 3072, 4096-bit key sizes).
- RSA-PSS digital signatures (signing and verification).
- Symmetric Ciphers
- AES-GCM with 128-bit and 256-bit keys; supports additional authenticated data (AAD).
- ChaCha20-Poly1305 with AAD support.
- Hashing
- One-shot hashing via
Hash.hash(): SHA-256, SHA-512, SHA3-256, SHA3-512, BLAKE3. - Stateful streaming hasher via
Hasherwithupdate()/finalize(). - Stream adapter
Hash.hashStream()for hashing DartStream<List<int>>inputs.
- One-shot hashing via
- Key Derivation Functions (KDFs)
- PBKDF2-HMAC-SHA-256.
- HKDF-SHA-256 (extract-and-expand).
- Argon2 (Argon2id, Argon2i, Argon2d) with configurable memory, iterations, and parallelism.
- Elliptic Curve Cryptography
- Ed25519 key pair generation, signing, and verification.
- X25519 Diffie-Hellman key exchange.
- Hybrid Encryption (ECIES)
HybridEncryption.encrypt()/HybridEncryption.decrypt()composing X25519 key agreement, HKDF-SHA-256 key derivation, and ChaCha20-Poly1305 authenticated encryption.
Platform Support #
Supports macOS, iOS, Android, Linux, and Windows via per-platform Rust cross-compilation targets. Web is not supported (dart:ffi is unavailable on the Web platform).
Performance #
- Expensive operations (RSA, KDFs, ECC, Hybrid Encryption) run on background Dart
Isolates to keep the UI thread free. - Rust library is compiled automatically at build time via
hook/build.dartusing Flutter Native Assets.