Skip to content
pubscout

pqcrypto

0.4.4, released 3 weeks ago by yardenah.com

Pure Dart post-quantum cryptography package implementing ML-KEM, ML-DSA, and SLH-DSA.

WASM-ready
$ flutter pub add pqcrypto
Source repository

What it does

Implements post-quantum cryptography algorithms (ML-KEM, ML-DSA, and SLH-DSA) in pure Dart with zero external dependencies. It provides NIST-aligned cryptographic primitives with checked-in known-answer vector evidence.

AI-written summary of version 0.4.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need post-quantum cryptography algorithms like ML-KEM, ML-DSA, or SLH-DSA in a pure Dart or Flutter application.
  • You require cross-platform cryptographic operations including Web support without native dependency headaches.

Skip it when

  • You need official FIPS 140 or CMVP module validation (the package does not claim module validation).
  • You require traditional classical-only algorithms and do not need post-quantum resistance.

Strengths

  • Zero third-party dependencies with 100% pure Dart implementation.
  • Comprehensive support for ML-KEM, ML-DSA, and SLH-DSA across all parameter sets.
  • Byte-exact validation against official NIST ACVP and KAT corpora.

Weaknesses

  • No official CMVP or FIPS 140 module validation claimed.
  • Some parameter sets (like SLH-DSA slow variants) can be CPU-intensive in pure Dart.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

Add the package to pubspec.yaml; no native configuration, permissions, or build_runner required.

final params = DilithiumParams.mlDsa65;
final (pk, sk) = MlDsa.generateKeyPair(params);
final sig = MlDsa.sign(sk, message, params);
final ok = MlDsa.verify(pk, message, sig, params);

Alternatives

Packages that do the same job and could replace pqcrypto.

  • webcrypto

    Cross-platform implementation of Web Cryptography APIs for Dart.

  • oqs

    Dart FFI bindings for liboqs enabling post-quantum cryptography primitives like ML-KEM and ML-DSA.

  • cipherlib

    Pure-Dart symmetric ciphers, authenticated encryption, and post-quantum key encapsulation.

  • brotli

    Pure Dart Brotli decoder

Works with

Packages commonly used together with pqcrypto: ones it builds on, ones built on it, and its own family.