Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
sqisign-rs
Rust bindings for the SQIsign post-quantum signature scheme.
SQIsign (Short Quaternion and Isogeny Signature) is a post-quantum digital signature scheme based on isogenies between supersingular elliptic curves. It was submitted to NIST's Post-Quantum Cryptography Standardization Process and features the most compact signatures among all candidates.
Crates
This workspace provides separate crates for each security level:
| Crate | Security Level | Public Key | Secret Key | Signature |
|---|---|---|---|---|
sqisign-lvl1 |
NIST Level 1 (AES-128) | 65 bytes | 353 bytes | 148 bytes |
sqisign-lvl3 |
NIST Level 3 (AES-192) | 97 bytes | 529 bytes | 224 bytes |
sqisign-lvl5 |
NIST Level 5 (AES-256) | 129 bytes | 701 bytes | 292 bytes |
The sqisign-core crate provides shared types and traits for writing generic code.
Features
- Post-quantum security: Resistant to attacks by quantum computers
- Compact signatures: Smallest signatures among NIST PQC candidates
- Multiple security levels: Choose the level appropriate for your use case
- Safe Rust API: Memory-safe wrappers around the C implementation
- Automatic stack management: Handles large stack requirements transparently
- Clean ergonomics: No type parameters needed for single-level usage
Performance
Benchmarks on Apple M4 Mini Pro (Level 1):
| Operation | Time |
|---|---|
| Keygen | 10.97 ms |
| Sign | 24.56 ms |
| Verify | 1.65 ms |
Run benchmarks yourself: cargo bench -p sqisign-lvl1
Installation
Add the crate for your desired security level to your Cargo.toml:
[]
# Choose one:
= "0.1" # NIST Level 1 (fastest, smallest)
= "0.1" # NIST Level 3 (medium)
= "0.1" # NIST Level 5 (highest security)
Minimum Rust version: 1.88+
System Requirements
Building these crates requires several system dependencies. The build script will automatically fetch and compile the SQIsign C library, but you need:
Linux (Debian/Ubuntu)
Linux (Fedora/RHEL/CentOS)
macOS
Windows
Windows is not currently supported. Consider using WSL2.
Usage
Basic Example
use KeyPair;
Serialization
use ;
Constants
Each crate exports size constants:
use ;
let buffer = vec!;
Generic Code Across Levels
Use sqisign-core to write code that works with any security level:
use ;
// Usage:
// use sqisign_lvl1::Level1;
// let (kp, sig) = sign_message::<Level1>(b"test");
Build from Source
# Build all crates
# Run all tests
# Test a specific level
Troubleshooting
CMake not found
# Install: apt install cmake (Linux) or brew install cmake (macOS)
GMP library not found
# Debian/Ubuntu
# macOS
How It Works
Each level crate's build process:
- Fetch: Downloads SQIsign C library from GitHub (pinned commit)
- Configure: Uses CMake to configure for your system
- Compile: Builds a monolithic static library for that level
- Link: Links the static library and GMP into your Rust binary
License
This project is dual-licensed under MIT and Apache-2.0.
The underlying SQIsign C library has its own license - see the SQIsign repository.
References
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Signed with SQIsign
This README is signed using SQIsign Level 1:
Public Key (65 bytes):
42ef6c6eaea747bd7da163d2ee62a2f438de80a2873caa8bc21d894a28b3d901
c290f39cb88b3805be62cd2633391cf6c2c10601abf8935a80eb4a251558bd02
02
Signature (148 bytes):
1ade5aca6e6523ebcf3837231ced10ef5e74dcec146f823d9bd221926d113500
9012aa2c7dcb885a4c6990f59e53ca269a757efd8e72a2ff751d38ae5c90b004
00001967c1a5731fe6ad67782f9e014666037ad5b260a2629c4e915d7559c0fb
0d3640f860c25435d11d2b56590b6ea65bb6f583fbdee32409f58c0cbe1641bc
e0c1e06de9d8186ff277daefa869c3b47a012104
Verify with: cargo run --example verify_readme -p sqisign-lvl1