Security model
What Liro trusts, what it checks, and what it leaves to you. Liro invents no primitive; every guarantee below comes from a standard construction used as documented.
What is trusted
| Anchor | Why it is needed | How it is pinned |
|---|---|---|
| The room contract | It is the only source of the uploader, the manifest hash and the epoch for a document. | Its runtime code hash is checked first; nothing else is read from a contract that fails the pin. |
| The owner’s ML-DSA-87 key | It signs every manifest. | Its fingerprint is pinned beside the code hash, so a gateway that serves a matching forged key and record is caught. |
| The chain’s key registry | The ML-DSA and ML-KEM keys of every member. | Read from the chain; a recipient card binds the X25519 key to the registered ML-KEM key. |
| One HTTPS gateway | It answers every read. | Not independent: a compromised gateway could still lie within the pins. See limits. |
What each check defends against
- A member forging a document (a “co-recipient forgery”): the signature is checked under the uploader’s on-chain key, and the uploader must be the account the contract recorded. A member cannot sign as the owner.
- Swapping a member’s key wrap (set malleability): the member set is hashed into the manifest and into every key wrap, and the manifest hash must equal the contract’s anchor.
- Context confusion: chain, app, purpose, document id, epoch and uploader are bound into every wrap and the body. A wrong context fails with the field named, not a generic decryption error.
- Replay of an old document: the epoch and the manifest hash must match the contract’s current record.
- A downgrade to ML-KEM only: every member entry must be a hybrid ML-KEM-1024 + X25519 envelope; anything else is refused when it is encoded, decoded, opened or verified.
- Key equivocation: a hash of the data key is in the signed manifest and is compared in constant time after unwrapping.
- A look-alike room or file: a contract with different code is refused before it is read, and a verifier that cannot read the code hash says so instead of guessing.
Where the secrets are
The mnemonic, the signing key and the seal keys exist only in the local signer process, derived from the QORE_MNEMONIC environment variable. This site holds no key and cannot decrypt anything; it can only prove who signed what for which members. It makes no request that carries your files: you drop them and the checks run in the page.
Cryptography in one paragraph
Key establishment is ML-KEM-1024 hybridised with X25519 (via QoreSeal), signatures are ML-DSA-87, hashes are SHAKE256 with a separate domain for every use, and the body is AES-256-GCM. The post-quantum claims apply only where those primitives do. The body cipher is not a fully committing AEAD; Liro compensates with the signed key commitment and the pinned ciphertext hash.
Reporting a problem
If you find a way to make a forged document verify as authentic, that is the bug this project exists to prevent. Open an issue on the repository with the envelope and the command you ran.