Quantum-Sign π
The Digital Notary Stamp That Even Quantum Computers Can't Forge
Simple Answer: Quantum-Sign is a command-line tool that digitally signs software using quantum-resistant cryptography to prove the software is authentic and hasn't been tampered with.
Technical Details: A production-ready, pure-Rust implementation of post-quantum code signing with NIST-approved algorithms. Quantum-Sign provides quantum-resistant digital signatures using ML-DSA-87 (Module-Lattice Digital Signature Algorithm) with support for multi-party quorum signing, offline verification, and comprehensive policy enforcement.
π Key Features
- π‘οΈ Quantum-Resistant: Built on FIPS 204 ML-DSA-87, secure against both classical and quantum computers
- π Pure Rust: Zero unsafe code, memory-safe implementation with
#![forbid(unsafe_code)] - π¦ Supply Chain Security: Strictly crates.io-only dependencies, no FFI or C libraries
- β Standards Compliant: Full compliance with NIST FIPS 204/205, SP 800-90A/B/C, SP 800-53
- π₯ Quorum Signing: M-of-N threshold signatures for critical operations
- π Offline Verification: Complete verification without network access
- π Policy Engine: Comprehensive policy enforcement with FIPS-only defaults
- π Defense in Depth: Multiple security layers including domain separation, canonical encoding, and zeroization
π Table of Contents
- Installation
- Quick Start
- Architecture
- Usage Guide
- Verification
- Trust Management
- OneβShot Packaging
- CLI Reference
- Security
- Documentation
- License
π Installation
As a CLI Tool
As a Library
Add to your Cargo.toml:
[]
= "0.1.0"
= "0.1.0"
= "0.1.0"
= "0.1.0"
Build from Source
# Clone from crates.io source
# Or download source archive from crates.io
β‘ Quick Start
Generate a Signing Key Pair
Sign a File
Verify a Signature
ποΈ Architecture
Single crate: quantum-sign (library + CLI). Internally it exposes modules for
crypto, drbg, format, policy, verify, transparency, and tsp.
Cryptographic Flow
File β SHA-512/256 Digest β Policy Binding β ML-DSA-87 Sign β CBOR Encode β .qsig File
π Usage Guide
Basic Signing
Create a policy file policy.json:
Sign with policy enforcement:
# Generate keys
# Import public key to trust store
# Sign artifact
Quorum Signing (M-of-N)
For critical operations requiring multiple approvals:
# Initialize quorum signing
# Each signer creates a fragment
# Seal into final signature (requires 2 valid signatures)
Verification
Standard verification:
JSON output for automation:
Output format:
Trust Management
Import and list trusted public keys:
# Import a public key (PEM or DER format)
# Output: imported abc123def456... -> ./trust/abc123def456.spki
# List all trusted keys
## π OneβShot Packaging
)
)
)
)
Verify for recipients (one command):
Expected JSON fields:
status: "ok",alg: "mldsa-87",digest_alg: "sha512"kids_verified: 1,m=1,n=1canonical: truepolicy_hash_hexmatches yourpolicy.jsonfile_digest_hexmatches your artifact
Tip: Embed human owner info in policy.json (e.g., comments: "Owner: <name>"); the policyβs canonical hash is cryptographically bound into the signature claims.
Output:
abc123def456 ./trust/abc123def456.spki
789abcdef012 ./trust/789abcdef012.spki
## π Security
### Threat Model
Quantum-Sign defends against:
- **Quantum computer attacks** on signatures
- **Supply chain attacks** via dependency control
- **Downgrade attacks** via policy enforcement
- **Key compromise** via quorum signing
- **Tampering** via canonical encoding
- **Memory disclosure** via zeroization
### Security Features
1. **Cryptographic Security**
- ML-DSA-87 (NIST Level 5 security)
- HMAC-DRBG with continuous health tests
- Constant-time operations
- Automatic key material zeroization
2. **Implementation Security**
- Pure Rust, zero unsafe code
- Memory-safe by construction
- No FFI or external dependencies
- Strict input validation
3. **Operational Security**
- Offline-first verification
- Policy-bound signatures
- Audit logging support
- Reproducible builds
### Compliance
- **FIPS 204**: ML-DSA specification
- **FIPS 205**: SLH-DSA specification
- **SP 800-90A/B/C**: DRBG requirements
- **SP 800-53 Rev.5**: Security controls
- **SP 800-131A**: Algorithm transitions
## π Documentation
### Core Documentation
- Security Requirements - Comprehensive security analysis
- QSig Format Specification - Detached signature format
- [API Documentation](https://docs.rs/quantum-sign) - Rust API reference
### Examples
Example usage patterns:
**Basic Signing**
```rust
use qs_crypto::{keypair_mldsa87, sign_mldsa87, HmacSha512Drbg};
use qs_policy::Policy;
let mut drbg = HmacSha512Drbg::from_os(Some(b"app-context"))?;
let keypair = keypair_mldsa87(&mut drbg)?;
// Sign with policy binding...
Custom Policy
use ;
let policy = Policy ;
Performance
On Apple M1/M2:
- Key generation: ~2ms
- Signing (SHA-512): ~3ms
- Verification: ~2ms
- Quorum seal (3 signatures): ~7ms
π€ Development
# Run tests
# Format code
# Lint
# Security audit
# Build documentation
π License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.
π Acknowledgments
- NIST PQC team for ML-DSA specification
- Rust Crypto community for foundational libraries
- Security researchers and contributors
β οΈ Security Warning
This is cryptographic software. While we've taken extensive precautions:
- Always use the latest version
- Review security advisories on crates.io
- Test thoroughly in your environment
- Consider professional security audit for critical uses
π Contact
- Author: Sicarii
- Email: sic.tau@pm.me
- Crates.io: quantum-sign
For security issues, please email sic.tau@pm.me with subject line "[SECURITY] Quantum-Sign".
Building quantum-resistant security for the classical world π