liro

liro

Confidential rooms that still hold after Q-Day. Seal once, and anyone can check who signed it and for whom.

Run the exploit-to-fix demo on your machine (offline)

pnpm run demo

Needs Node 22.13 or newer and pnpm. CLI quickstart

Keyless verification

verify-envelope checks a published Liro document against the live contract and the on-chain key registry. It needs no mnemonic and no funded account, and it decrypts nothing.

node packages/signer/dist/cli.js verify-envelope 
  demo-room/doc-83321acf2317eb48-epoch1.envelope 
  --doc 0x83321acf2317eb48c0277a1bfa38537ccf629c37a2007ba34ad400c127429e16 
  --body demo-room/doc-83321acf2317eb48-epoch1.body 
  --cards cards --max-age-days 365

On the committed demo room this prints one PASS line per check and ends with AUTHENTIC.

What is checked

CheckWhat it proves
document idthe manifest is for the document you asked about
canonical formthe file parses in its one wire form; every member entry is a hybrid QoreSeal envelope
chain, app, purposethe document is bound to this room’s context
contractthe contract is the pinned LiroDataRoom (its runtime code hash), checked before anything else is read from it
recordthe contract has a record for this document
uploaderthe uploader named in the file is the account the contract recorded
signaturethe ML-DSA-87 signature verifies under that account’s key as registered on chain, never a key carried in the file
owner pinthe uploader is the pinned owner and its on-chain key has the pinned fingerprint
anchorthe manifest hash is the one the contract anchors
record matchthe contract’s body hash and location equal the signed manifest’s
member setthe member-set digest matches the contract
epochthe epoch is the contract’s current epoch
bodythe ciphertext matches the signed hash and the contract (if you pass --body)
membersevery member has keys registered on chain
cardseach member’s card binds their X25519 key to the manifest (if you pass --cards)

It does not show that your own entry unwraps; that needs your key and the open command.

Exit codes

CodeMeaning
0authentic: every required check passed. The body and cards checks may be skipped if you did not pass those files, and the verdict then says so.
1not verified: at least one check failed (the signature or the anchor, a stale epoch, the wrong contract, a tampered body, a --doc that does not match). It is also what you get if the network is unreachable: the check fails closed.
2usage or input error, nothing was verified: a mistyped flag, a missing argument, an unreadable file. Caught before any network call.
3partially verified, not authentic: nothing failed, but a required check could not be completed, for example the key registry kept failing while members were looked up. Never treat this as success.

In a script, [ $? -eq 0 ] means authentic; 1 and 3 mean “do not trust it”; 2 means “fix the command”.

Options

--doc (the id you expect), --body, --cards <dir>, --max-age-days <n> (card age limit, default 30, at most 365), --contract and --expect-codehash (for a contract other than the shipped one), --json.