libsignal_protocol_dart
0.8.2, released 5 months ago by mixin.dev
Pure Dart implementation of the Signal Protocol for end‑to‑end encrypted messaging.
What it does
Provides Signal Protocol primitives such as identity key generation, pre‑key bundles, session building, and group messaging. Includes in‑memory stores and helpers to encrypt/decrypt messages across platforms.
AI-written summary of version 0.8.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need end‑to‑end encryption in a pure‑Dart/Flutter app without native dependencies
- Cross‑platform support (mobile, web, desktop) is required
- You want to implement custom key stores or session management
Skip it when
- A GPL‑3.0 license is unacceptable for your project
- You need a highly‑optimized native cryptography library
- You already use a different secure messaging protocol
Strengths
- Pure Dart, works on all Flutter platforms
- No native code or platform channels required
- Supports both one‑to‑one and group sessions
Weaknesses
- GPL‑3.0 license may limit commercial use
- Documentation is minimal
- No code‑generation or high‑level abstractions
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 11
Future<void> install() async {
final identityKeyPair = generateIdentityKeyPair();
final registrationId = generateRegistrationId(false);
final preKeys = generatePreKeys(0, 110);
final signedPreKey = generateSignedPreKey(identityKeyPair, 0);
final sessionStore = InMemorySessionStore();
final preKeyStore = InMemoryPreKeyStore();
final signedPreKeyStore = InMemorySignedPreKeyStore();
final identityStore = InMemoryIdentityKeyStore(identityKeyPair, registrationId);
for (var p in preKeys) {
await preKeyStore.storePreKey(p.id, p);
}
await signedPreKeyStore.storeSignedPreKey(signedPreKey.id, signedPreKey);
}Alternatives
Packages that do the same job and could replace libsignal_protocol_dart.
- webcrypto
Cross-platform implementation of Web Cryptography APIs for Dart.
89Compare - blockchain_utils
Comprehensive pure-Dart cryptography and blockchain toolkit with optional Rust backend.
72Compare - pqforge
Pure-Dart post-quantum cryptography for ML-KEM, ML-DSA, SLH-DSA, and HPKE.
71Compare - libsignal
Dart wrapper for libsignal providing Signal Protocol end-to-end encryption.
67Compare
Works with
Packages commonly used together with libsignal_protocol_dart: ones it builds on, ones built on it, and its own family.
- cryptolibsignal_protocol_dart depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- convertlibsignal_protocol_dart depends on itEncoders and decoders for converting between different data representations.
- fixnumlibsignal_protocol_dart depends on itProvides 32‑ and 64‑bit signed fixed‑width integer types for Dart.
- pointycastlelibsignal_protocol_dart depends on itA Dart library providing a wide range of cryptographic algorithms and primitives.
- protobuflibsignal_protocol_dart depends on itProvides runtime support for Dart protocol buffer messages generated by protoc_plugin.
- ed25519_edwardslibsignal_protocol_dart depends on itEd25519 signature implementation for Dart, compatible with RFC 8032 keys.
- optionallibsignal_protocol_dart depends on itAn implementation of the Optional type to help avoid null reference errors.