sqisign-verify
SQIsign signature verification. no_std-compatible, heap-free, and independent of the quaternion algebra stack.
Usage
use ;
let pk = from_bytes.expect;
let sig = from_bytes.expect;
sig.verify?;
Auto-detect format from wire length:
use AnySignature;
let sig = from_bytes.expect;
sig.verify?;
Supported formats
| Format | L1 | L3 | L5 | Verify (L1) |
|---|---|---|---|---|
| Compressed | 129 B | 196 B | 257 B | 6.83 ms |
| Standard | 148 B | 224 B | 292 B | 4.65 ms |
| Expanded | 212 B | 316 B | 420 B | 3.82 ms |
Public keys are 65 B (L1), 97 B (L3), 129 B (L5).
Format detection is purely length-based (each format has a unique byte count per level).
Key types
PublicKey<L>: Montgomery curve coefficient + torsion hint byteSignature<L>: standard NIST v2.0 format (2x2 matrix + hints)ExpandedSignature<L>: pre-evaluated kernel points (fastest verify)CompressedSignature<L>: 3-of-4 matrix entries, 4th recovered via Weil pairingAnySignature<L>: auto-detecting wrapper over all three formatsScalar<L>: fixed-width multi-precision integer for matrix entries and challenge
Design constraints
This crate deliberately excludes sqisign-quaternion and num-bigint from its dependency tree. Verification uses only elliptic curve and field arithmetic, suitable for embedded targets (thumbv7em-none-eabihf tested).
For the full API with keygen and signing, use sqisign-core.