LitVMSwap research

How the PQ Account works

LitVMSwap is researching how to protect funds on LitVM against future quantum computers. The PQ Account is the first result: a smart account that will not move your funds without a post-quantum signature. It is live as an experiment, and we will keep making it better.

The idea in one minute

Your wallet
Sends every transaction, as usual. It signs with ECDSA, like every wallet today.
Your guardian key
Made in your browser. Signs the exact action with SLH-DSA, which quantum computers cannot forge.
The account contract
Checks both on chain. Funds move only when the wallet and the guardian agree.

Why quantum computers are a risk for wallets

Every wallet today signs with ECDSA. Its security rests on a math problem that normal computers cannot solve, but a large quantum computer running Shor's algorithm could. With it, an attacker could work out a private key from its public key.

Your public key becomes visible on chain the first time your wallet sends a transaction, so every active wallet would be exposed. Nobody knows when such a computer will exist. In 2024 NIST, the US standards body, published post-quantum signature standards so that systems can move early, and moving early is far easier than moving in a hurry.

Is LitVM quantum safe?

Not yet, and neither is any EVM chain today. Transactions are signed with ECDSA, and the networks behind LitVM use classical cryptography as well. Making a whole blockchain quantum safe needs upgrades at the protocol level, which the wider Ethereum community is researching.

We did not want to wait for that. The PQ Account uses what LitVM already offers, smart contracts and the built-in SHA-256 function, to check a post-quantum signature on chain before any funds move. That adds a quantum-resistant layer on top of today's chain.

Protected by the PQ Account
Funds inside the account, even if your wallet key is stolen or broken by a quantum computer
Changes to the guardian keys and to the owner wallet
A lost or broken wallet: both guardian keys move the account to a new one after 7 days
Every outgoing action, bound to the exact asset, amount, recipient, a counter and a deadline
Not covered yet
Funds kept in your normal wallet
The chain’s own consensus, sequencer and bridges
Tokens whose own contracts can be changed by an admin key
A fake website or malware that steals your guardian file

What system is used

Post-quantum signature
SLH-DSA-SHA2-128f, the NIST standard FIPS 205 (the standardized form of SPHINCS+), security category 1.
Why it resists quantum computers
It is built only from the SHA-256 hash function. Its security does not rest on the number theory that quantum computers can break.
On-chain verifier
A LitVMSwap Solidity contract that runs the FIPS 205 verification steps, using the SHA-256 function LitVM already has built in.
Smart account
A LitVMSwap contract that holds your funds and checks your wallet plus a guardian signature for every action that moves them.
Recovery
Both guardian keys together can move the account to a new wallet, without the old one. The move waits 7 days, and the owner can cancel it in that time with one guardian key.
Security level
NIST security category 1 (SLH-DSA-128), the level NIST rates as secure against quantum attacks. Categories 3 and 5 need SHA-512, which the EVM does not provide, so their on-chain check would cost several times more gas and need a hand-written SHA-512.
Keys
Made in your browser with its secure random generator and the open-source noble-post-quantum library. Only the public part goes on chain. Backup files are encrypted with your password (AES-256-GCM, PBKDF2-SHA256).
Server
None. Reads come straight from the LitVM network and your wallet sends every transaction.
Testing
Official NIST test vectors, a tamper test on every part of a signature, and cross-checks against an independent implementation.

Contracts on LitVM: account factory, SLH-DSA verifier.

Step by step

  1. 1
    Create two guardian keys
    A primary and a backup key, made in your browser.
  2. 2
    Save both backup files
    Protect them with a password, download them, then load them again to prove they work.
  3. 3
    Create your account
    One account per wallet, owned by that wallet.
  4. 4
    Deposit
    zkLTC or any LitVM token. Deposits need only your wallet.
  5. 5
    Send or withdraw
    Choose a guardian file and type its password. It signs the exact action once, and your wallet sends it.
  6. 6
    Recover
    Lost the primary file? The backup key replaces it. Lost the wallet? Both files move the account to a new wallet after 7 days.

Questions and answers

What is a PQ Account?+

A smart account on LitVM that holds your funds and only lets them leave when your wallet and a post-quantum guardian key both approve the exact same action.

Why do I need two keys?+

Your wallet proves the transaction comes from you. The guardian key adds a signature that stays secure even against quantum computers. A thief needs both, and today most thefts only get one of them.

What happens if someone steals my wallet key?+

They cannot move anything out of the PQ Account without a guardian file and its password. Move the account to a new wallet in the Security tab, or, if you cannot use the wallet any more, recover it to a new wallet with both guardian files.

How can I see the protection working?+

Open your account on /pqaccount and press "Check the protection". It tries a withdrawal with your wallet only, as a free simulation, and shows the account contract refusing it. Every real send and withdrawal carries a 17,088-byte guardian signature that the contract checks.

Why do I load my guardian file every time?+

So the second key never sits unlocked in your browser. Each send, withdrawal or key change asks for your guardian file and its password; the key signs that one action and is wiped from memory right away. Your wallet alone cannot send or withdraw, and nothing is ever approved for you in the background.

Why do the backup files have a password?+

A copied file is useless without it, whether it was taken by malware, a synced folder or someone with access to your computer. The seed inside is encrypted with AES-256-GCM under a key derived from your password (PBKDF2-SHA256, 600,000 rounds). Nobody can reset the password, so keep it written down somewhere safe and separate from the files.

What if I lose a guardian file?+

Use the other one. The backup key can replace a lost primary key in the Security tab. If both files are lost, nobody can recover the account, not even LitVMSwap.

What if I lose my wallet?+

Open the PQ Account page from a new wallet and choose "Recover your account". With both guardian files and their password, the account moves to the new wallet after a 7-day wait. Accounts created before recovery existed (version 1) can only be moved by their owner wallet.

Does LitVMSwap hold my keys or my funds?+

No. Guardian keys are made in your browser and never sent anywhere. The contracts have no admin: nobody, including LitVMSwap, can freeze, upgrade or move your account.

Why does a send cost more gas than a normal transfer?+

A post-quantum signature is 17,088 bytes and checking it on chain takes about 2.8 million gas, so a send uses about 3 million gas. The zkLTC cost follows the LitVM gas price: about 0.00003 zkLTC at 0.01 gwei, and more when the network is busy.

Could someone with my guardian files take my account?+

Not quietly. With both files and the password they could start a recovery, but it waits 7 days, the account shows it, and you can cancel it with your wallet and one guardian file. Then replace your guardian keys. With only one file they cannot start a recovery at all.

Which assets can I keep in it?+

zkLTC and any LitVM token. NFTs can be received too.

Is it fully quantum safe?+

It protects what it controls: nothing leaves the account without a post-quantum signature, and both guardian keys can move the account away from a wallet that was stolen or broken. The chain underneath, your normal wallet and the admin keys of some token contracts still use classical cryptography today, as explained above.

Has it been audited?+

Not yet. The PQ Account is a research release. It passes the official NIST test vectors and thousands of tampered-signature tests, but please keep only amounts you can afford to lose.

Why SLH-DSA and not another post-quantum scheme?+

SLH-DSA relies only on hash functions, some of the best understood building blocks in cryptography, and it needs nothing from the chain except SHA-256, which LitVM already has. Lattice schemes such as ML-DSA have smaller signatures, and we are studying them for future versions.

Why the "128f" version?+

It signs in a fraction of a second in the browser. The compact "128s" version takes several seconds per signature, longer on phones, which made every send feel slow.

What comes next?+

This is the first step of our research. We plan to work on lower gas costs, swaps from the account, recovery options and support for the post-quantum upgrades of LitVM and Ethereum as they arrive.

Ready to try it?

The PQ Account is experimental and not audited. Start with a small amount.

Open your PQ Account