Docs
How Codicil works
An owner writes one letter, names one heir and three guardians, and picks a quiet time. The letter is sealed in the owner's browser. Only ciphertext goes on chain.
CK = HKDF-SHA3-256( K_heir || K_release , info = "codicil/v1|" + estateId + "|" + epoch ) letterCT = AES-256-GCM( CK, letter, aad = estateId|epoch ) K_heir sealed to the heir (QoreSeal: ML-KEM-1024 + X25519) K_release split 2-of-3 (Shamir), each share sealed to one guardian owner copy of both secrets sealed to the owner at release: a guardian opens their share in their browser and re-seals it to the heir, then signs it with ML-DSA-87. The heir opens K_heir and any two released shares, rebuilds K_release, derives CK, reads the letter.
Who can open what
| Party | Holds | Can open the letter? |
|---|---|---|
| Heir | K_heir | No, needs K_release |
| Any one guardian | one sealed share | No |
| All three guardians together | K_release | No, needs K_heir |
| Relayer, server, public | ciphertext only | No |
| Quantum attacker who breaks X25519 | ciphertext | No, the ML-KEM-1024 half holds |
| Owner | everything (owner copy) | Yes, it is theirs |
The contract
- No owner, no admin, no proxy, no upgrade, no
ecrecover. Every state change is an ML-DSA-87 signature checked bypqcVerifyagainst a key read withpqcKeyStatus. - The contract rebuilds the signed text itself (
"qorechain-msg-v1|" + chainId + "|" + text), including the estate, contract address, epoch, nonce and expiry. - Heir and guardian keys are pinned at seal time. An account with no proven ML-DSA-87 key cannot be named.
- Time is
block.timestamp. Quiet time plus grace, extended by at most one grace period per guardian Hold. - A malformed answer from either precompile reverts. Nothing reads silence as success.
Questions
What stops someone from keeping the owner from checking in?
This is the known objection to inactivity switches. Codicil answers it four ways: the quiet time is long (30, 90 or 180 days in real use), a check-in is one signature from any device that holds the owner's key, each guardian can press Hold once to give more time, and a check-in at any point before release cancels it. A forged "I'm here" or a forced silence both need the owner's ML-DSA-87 key to matter.
What if my heir loses their phone?
If the heir's signing key is rotated after sealing, two of the three guardians can co-sign a re-pin of that same heir account. The bequest address cannot change. Reading the letter needs the heir's sealing key, so the owner should keep their own copy and amend the estate if a sealing key is lost.
Why a demo pace?
A 90-day silence cannot be shown live. Demo estates use a few minutes and are labelled on chain and in the app. The recorded run shows the full lifecycle.
What can the relayer do?
It can refuse to relay. It cannot forge, read or redirect anything: it forwards signed calls, simulates them first, and pays gas.
Is this a legal will?
No. It is a sealed message and a bequest held by a contract on a test network. Do not put real funds or real secrets here.