Resources
BetterSign uses multicodec-labeled keys, signatures, hashes, KEMs and proof material, so identities can evolve without hard-coding one cryptographic era into the trust model.
Resources › Cryptography
The protocol. This page describes the BetterSign protocol and its open-source core. For what the BetterSign app and products do today, see Products.
BetterSign separates stable identity from active cryptographic material. The VLAD anchors the identity. The provenance log records the current keys, algorithms, lock scripts, unlock scripts and proofs.
Keys and signatures are stored as typed multikey and multisig values. A verifier does not trust a label alone. It parses the encoded object, checks the codec, verifies the signature or proof, and accepts a state transition only if the previous log policy authorized it.
This model lets a BetterSign identity use Ed25519 today, rotate to a post-quantum signature later, or keep several subsystem keys under different plog paths, all without changing the stable VLAD.
BetterSign supports classical signatures for operational compatibility, and post-quantum signatures for future-facing identity policy.
Ed25519 is the default day-to-day signing key in many workflows because it is compact, fast and widely supported by SSH. Ed448 offers a higher-security Edwards curve, secp256k1 is available for ecosystems that already use it, and BLS12-381 supports aggregate and threshold-style workflows.
The codebase also includes ML-DSA, FN-DSA, SLH-DSA, MAYO, hybrid Ed25519/BLS post-quantum codecs, and two hash-based families: XMSS (stateful) and Lamport (one-time, with threshold shares). BetterSign can carry all of these in identity state, while individual protocol integrations may accept only the algorithms their surrounding ecosystem can encode.
Subsystems can restrict this list when a protocol requires a narrower key format.
| Ed25519 / Ed448 | Compact Edwards-curve EdDSA. Ed25519 is the SSH-compatible default; Ed448 is the higher-security option. |
| ECDSA (NIST) | NIST P-256, P-384 and P-521 curves |
| secp256k1 | ECDSA for Bitcoin and Ethereum-adjacent signing environments |
| RSA-PSS | RSA-PSS/SHA-256 with 2048, 3072 and 4096-bit keys |
| BLS12-381 | G1/G2 aggregate signatures (Basic, Message-Augmentation, Proof-of-Possession) and threshold key shares |
| ML-DSA | NIST FIPS 204 lattice post-quantum signatures (65, 87) |
| FN-DSA | Falcon-family lattice post-quantum signatures (512, 1024) |
| SLH-DSA | NIST FIPS 205 stateless hash-based signatures (all 12 SHA2/SHAKE, 128/192/256, fast/small) |
| MAYO | Multivariate post-quantum signatures (MAYO-1/2/3/5) |
| XMSS | Stateful hash-based signatures (SHA2_10/16/20_256). Each signature consumes a leaf index that must never be reused. |
| Lamport | One-time hash-based signatures over five hash families (SHA3-256/384/512, SHA2-256/384/512, BLAKE2b-512, BLAKE2s-256, BLAKE3-256, and SHAKE128/SHAKE256), each with t-of-n threshold signature shares |
| Hybrids | Ed25519-MAYO2, Ed25519-ML-DSA-65, Ed25519-FN-DSA-512, and BLS12-381-G1 + {ML-DSA-65, FN-DSA-512, MAYO-1, MAYO-2} |
The /keys/encrypt path carries an identity’s current public encryption material. Other peers resolve and verify the recipient’s plog before sealing messages or command envelopes to that key.
X25519 is the compact classical KEM used by default identity creation. BetterSign also supports post-quantum KEM families including ML-KEM, FrodoKEM, SNTRUP and Classic McEliece, plus hybrid X25519/post-quantum KEM codecs for migration paths.
WireGuard PSK rotation and BetterSign message exchange can use this plog-resolved encryption material, so peers rotate secrets through verified identity state instead of manually copying shared files.
/keys/encrypt is resolved from verified plog state before use.
| X25519 / X448 | Classical elliptic-curve key agreement. X25519 is the default; X448 is the higher-security option. |
| ECDH (NIST/secp256k1) | P-256, P-384, P-521 and secp256k1 key agreement |
| RSA-OAEP | RSA-OAEP/SHA-256 public-key encryption with 2048, 3072 and 4096-bit keys |
| BLS12-381 TimeCrypt | BLS pairing-based encapsulation |
| ML-KEM-768/1024 | NIST-standard lattice post-quantum KEM sizes |
| HQC | HQC-128/192/256 code-based post-quantum KEM (NIST-selected) |
| SNTRUP | sntrup761, sntrup857, sntrup953, sntrup1013 and sntrup1277 |
| FrodoKEM | AES and SHAKE parameter sets for conservative lattice KEM deployments |
| Classic McEliece | Code-based KEM support for long-horizon post-quantum experiments |
| Hybrid KEMs | X25519-ML-KEM-768 and X25519-SNTRUP761 combine classical and post-quantum material |
BetterSign can carry post-quantum KEM public keys in verified identity state, and use them for encrypted envelopes, key-agreement workflows and subsystem-specific control-plane exchanges.
The supported post-quantum KEM list includes FrodoKEM, SNTRUP and Classic McEliece as well as ML-KEM. These are encoded as typed multikey values, so followers know which algorithm family and parameter set they are verifying before they use the key material.
Hybrid KEMs are also supported, for deployments that want classical X25519 security and post-quantum KEM security in the same key agreement.
Protocol integrations may expose only the parameter sets they can safely use.
| ML-KEM | ML-KEM-768 and ML-KEM-1024 |
| HQC | HQC-128, HQC-192 and HQC-256 |
| FrodoKEM | FrodoKEM-640-AES, FrodoKEM-976-AES, FrodoKEM-1344-AES, FrodoKEM-640-SHAKE, FrodoKEM-976-SHAKE and FrodoKEM-1344-SHAKE |
| SNTRUP | sntrup761, sntrup857, sntrup953, sntrup1013 and sntrup1277 |
| Classic McEliece | All 16 ISO parameter-set variants |
| Hybrid KEMs | X25519-ML-KEM-768 and X25519-SNTRUP761 |
Two hash-based families need careful key-state handling. XMSS is stateful: every signature consumes a leaf index, and reusing an index can expose the key, so the advanced private key must be saved before another signature is issued. Lamport is one-time: a key may sign at most one message before its secret is exposed.
BetterSign enforces these properties where it matters most: at verification. Provenance-log verification rejects an XMSS signature that reuses or rolls back a leaf index, and rejects a second signature by the same Lamport public key, both within a single verification pass.
Enforced during provenance-log verification.
| XMSS | Stateful. The leaf index must strictly increase per key; reuse and rollback are rejected. |
| Lamport | One-time. A public key may authorize at most one entry. |
| SLH-DSA | Stateless hash-based. No per-signature state to manage. |
| Lamport threshold | t-of-n GF(256) shares each sign once. A combined signature still consumes the key’s single use. |
BetterSign supports two distinct threshold behaviors, and the difference matters. In threshold signing, participants each hold a share and jointly produce one ordinary signature, without any party ever reconstructing the private key. Static key splitting for recovery divides a whole private key into shares that are later reassembled. That is backup, not threshold signing, and it does briefly reconstruct the key.
Threshold signing is available through FROST across Ed25519, P-256, P-384, secp256k1 and Ed448, plus a separate BLS12-381 path for BLS signature shares. Distributed key generation, which creates the shared key so the full secret never exists in one place, is implemented for those curves, including BLS12-381. Lamport one-time keys can also be split into t-of-n shares whose partial signatures combine into a full signature, though each combined signature still consumes the key’s single use.
Static splitting and recovery is broader. Implemented private-key material, including RSA, classical elliptic curves, post-quantum signatures and KEMs, and hybrid keys, can be split into t-of-n shares and later reconstructed. Curve scalar keys use verifiable Feldman sharing where applicable. Opaque post-quantum, RSA and hybrid secret bytes use GF(256) sharing.
Only the first four rows are threshold signing. Static splitting is recovery backup.
| FROST threshold signing | Ed25519, P-256, P-384, secp256k1, Ed448. Shares sign jointly; the key is never reconstructed. |
| BLS threshold path | BLS12-381 signature shares, via a separate BLS-specific route |
| Distributed key generation | The shared key is created with no trusted dealer; the full secret never exists in one place. |
| Lamport t-of-n | One-time shares combine into a full signature; the combined signature still spends the single use. |
| Static split for recovery | RSA, classical curves, post-quantum and hybrid keys are split into shares and later reassembled. Backup, not threshold signing. |
One tradeoff is easy to feel once you see it: classical signatures are tiny, while post-quantum and hash-based signatures pay for their quantum resistance in size. That size shows up in every signed commit, certificate and log entry, so it matters for storage and bandwidth.
Smaller is better for storage and bandwidth. Values are approximate, for a representative parameter set of each family.
| Algorithm | Family | Signature size |
|---|---|---|
| Ed25519 | Classical | 64 B |
| ECDSA P-256 | Classical | 72 B |
| RSA-3072 | Classical | 384 B |
| MAYO-1 | Post-quantum (multivariate) | 321 B |
| FN-DSA-512 | Post-quantum (lattice) | 666 B |
| ML-DSA-65 | Post-quantum (lattice) | 3,293 B |
| SLH-DSA-128s | Hash-based | 7,856 B |
Signature size is only half the story. Public key size matters too, and the ranking is different. Notably, hash-based SLH-DSA has tiny public keys even though its signatures are large, while the lattice schemes carry bigger keys.
Smaller is better for distribution and storage. Approximate, for a representative parameter set of each family.
| Algorithm | Family | Public key size |
|---|---|---|
| Ed25519 | Classical | 32 B |
| ECDSA P-256 | Classical | 33 B |
| SLH-DSA-128s | Hash-based | 32 B |
| RSA-3072 | Classical | 384 B |
| FN-DSA-512 | Post-quantum (lattice) | 897 B |
| MAYO-1 | Post-quantum (multivariate) | 1,168 B |
| ML-DSA-65 | Post-quantum (lattice) | 1,952 B |
No single algorithm is best for every path. Classical curves are small and fast but not post-quantum. Lattice post-quantum schemes are well-rounded but larger. Code-based schemes have large keys but conservative assumptions. Hash-based schemes rest only on a hash function, but trade away size or reusability. For deeper background on the stateful and one-time hash-based options, see SKIPSH.
Because BetterSign stores typed keys per plog path, one identity can use different algorithms for different jobs: a compact Ed25519 key for SSH, a lattice or hash-based key for long-horizon signing, and a separate KEM for encryption. Any of them can rotate without changing the VLAD.
| Family | Algorithms | Strengths | Costs |
|---|---|---|---|
| Compact & fast (classical) | Ed25519, Ed448, secp256k1 | Small keys and signatures, high speed. Broad ecosystem and SSH support. | Not post-quantum |
| Lattice post-quantum | ML-DSA, FN-DSA | Good speed, moderate sizes. NIST-standardized. | Relatively new assumptions |
| Hash-based post-quantum | SLH-DSA (stateless), XMSS (stateful), Lamport (one-time) | Security rests only on the hash function. Lamport adds t-of-n threshold shares. | Large signatures or strict state discipline |
Provenance log entries are content-addressed. If an entry changes, its CID changes, which breaks the chain unless the altered bytes are reintroduced as a newly authorized entry.
Hashes are multihash-labeled, so a verifier knows which function produced a digest. The supported generation set includes SHA-2 (256/384/512), SHA-3 (224/256/384/512/512-256), Keccak, BLAKE2b, BLAKE2s, BLAKE3, RIPEMD-160 and MD5. SHA-1-labeled legacy multihashes can still be decoded for interoperability, but BetterSign no longer generates SHA-1 digests.
Plog proof data is a map of named byte strings. A standard identity entry may carry primary and recovery signatures, while another workflow can carry hash preimages, threshold signature shares or application-specific proofs.
Lock and unlock scripts decide which proof names matter. That keeps the log format stable while letting the identity itself introduce new authorization policies.
Proof names are defined by policy, not fixed globally.
| CID | Hash-derived content identifier for the serialized entry |
| prev | Hash link to the previous accepted entry |
| proofs.primary | Ordinary signing proof for normal updates |
| proofs.recovery | Higher-precedence recovery proof, when policy allows it |
| proofs.custom | Threshold shares, hash preimages, attestations or app-specific evidence |
A BetterSign plog can hold more cryptography than every downstream protocol can consume. SSH authorized_keys needs OpenSSH-encodable public keys. X.509 and rustls-backed TLS have their own algorithm limits. WireGuard identities have fixed key formats and use BetterSign mainly for verified metadata and PSK coordination.
BetterSign handles that by separating identity policy from integration policy. The plog can keep rich state, while each integration reads only the paths and algorithms it knows how to apply safely.
| Plog identity | Stores typed keys and proofs. Can rotate algorithms over time. Can carry classical, post-quantum and hybrid material. |
| Protocol integration | Reads selected plog paths. Converts only supported key formats. Rejects or ignores material the target protocol cannot represent. |