Post-Quantum Solana GitHubDevnet
Live on Solana devnet

SOL behind keys
made only of hashes.

PQS locks SOL to a one-time Winternitz key. To move it, you sign with hash chains, and the program checks every link with SHA-256 on-chain. No curve, nothing for a quantum computer to break.

SHA-256Only primitive
624 BSignature
1,065 BSpend transaction
~430kCompute per spend
Three pieces

A vault, a one-time key, and a rule that keys never sign twice.

Every Solana wallet today is an Ed25519 key. Shor's algorithm breaks those. PQS moves the authority over your SOL off the curve entirely.

01 / VAULT

An address from a hash

Your vault is a program address derived from the hash of a one-time public key. Anyone can send SOL to it like any other address.

Seeds
"vault", H(pk)
Owner
System program
Deposit
Plain transfer
02 / SIGNATURE

Winternitz, w = 256

26 hash chains of 255 steps. You reveal a point on each chain picked by the message; the program walks the rest of the way to the top.

Chain value
24 bytes
Chains
24 message + 2 checksum
Size
624 bytes
03 / ONE TIME

Spend, split, rotate

A signature commits to amount, destination and the next key. Change moves to the next vault, and a spent marker burns the old key for good.

Reuse
Rejected on-chain
Change
To next key's vault
Front-run
Message is bound
Why Solana makes this simple

Bitcoin has to solve a puzzle. Solana can just read the message.

Espresso's PQSB works around the fact that Bitcoin Script never sees the transaction it unlocks, so signers grind a puzzle to tie their one-time signature to it. A Solana program sees its instruction data directly. It can hash the spend message itself and check a plain Winternitz signature, so signing takes milliseconds in your browser instead of seconds on a GPU.

STEP 1

Make a key

Your browser derives key n from one 32-byte secret and shows its vault address.

STEP 2

Deposit

Send devnet SOL to the vault from any wallet.

STEP 3

Sign

Hash chains sign amount, destination and the next key.

STEP 4

Verify

The program walks 26 chains with SHA-256, pays out, and burns the key.

Honest about the edges

What is hash-only, and what still isn't.

The fee payer that submits a spend is still an ordinary Ed25519 wallet, because every Solana transaction needs one. It pays fees and nothing else. It cannot move vault funds, and anyone who grabs your signed spend can only submit exactly what you signed. Program upgrades are held by a normal key on devnet.

SOL vaults on devnet

Deposit, split, sweep, reuse rejected

Shipped
Browser signing

Keys derived and signed client-side

Shipped
SPL token vaults

Same key, token accounts owned by the vault

Next
Frozen program

Drop the upgrade key before any mainnet use

Next
Independent audit

Not audited. Devnet only until it is

Research
Devnet app

Your hash-key vaults.

Everything is signed in this tab. Your secret lives in this browser's storage; back it up before you deposit. Devnet SOL only.

Fee payer

Any Solana wallet on devnet, or a throwaway key kept in this browser.

Hash-key secret

One 32-byte secret derives every one-time key.

No secret yet
Keys
Create a secret to see your first vault.

Deposit

Sends SOL from the fee payer to your current vault. You can also send to the address from any devnet wallet.

—

Spend with a hash signature

Whatever you don't send moves to your next key's vault, and this key is burned.

Ready.
Read straight from devnet

Every hash-signed spend, as it lands.

This panel reads the program's recent transactions from a public devnet RPC. Nothing here is cached or made up.

Program
Spends seen—
SOL moved—
Avg compute—
Latest slot—
TransactionSentChangeStatus
Loading…

Counts cover the most recent 100 program transactions the RPC returns. Failed rows are spends the program rejected, such as reused keys or bad signatures.

Keys

A key is 26 secret 24-byte values and a 16-byte public seed, all derived from one 32-byte master secret and a key index. Each secret is hashed 255 times to get the top of its chain. The public key hash is SHA256("PQS-v1-key" ‖ seed ‖ top₀ … top₂₅), and the vault is the program address with seeds ["vault", keyHash].

step(i, j, x) = SHA256(seed ‖ i ‖ j ‖ x)[0..24]
top_i        = step(i,254, … step(i,1, step(i,0, sk_i)))

Message

The signed digest is the first 24 bytes of SHA256("PQS-v1-spend" ‖ programId ‖ vault ‖ amount ‖ destination ‖ nextKeyHash ‖ nonce). Each byte picks how far up its chain to reveal. Two checksum bytes, Σ(255 − dᵢ), stop anyone from pushing a revealed value further up to forge a different message.

The signer tries nonces until the total verification work is at most 3,000 hashes. That keeps every spend inside one transaction's compute budget. It is the one echo of PQSB's signer-side search, and it takes a few milliseconds.

Verification

The program recomputes the digest from the accounts it was given, walks each revealed value the remaining 255 − dᵢ steps with the sol_sha256 syscall, hashes the tops, and checks that the result derives the vault address. The key hash is never sent, so the vault address is the whole check.

Instruction

spend (tag 0)
  data:     amount u64 | nextKeyHash [32] | nonce u64 | seed [16] | sig [26×24]
  accounts: payer (signer) · vault · spent marker · destination · next vault · system
program:  

The spend marker is a program-owned account at ["spent", keyHash]. Creating it is part of every spend, so a second spend from the same key fails. Never deposit to a vault after it has been spent: those funds cannot move again.

Security

  • Chain values are 192-bit truncated SHA-256: about 192-bit classical and 96-bit quantum preimage resistance under Grover.
  • One signature reveals one point per chain. The checksum means no other message can be signed from them.
  • The destination, amount and next key are inside the signed message, so a validator or watcher who sees the transaction cannot redirect it.
  • The Ed25519 fee payer only pays fees. The upgrade authority on devnet is a normal key. The program is not audited.

Run it

# build the program and run the end-to-end test on a local validator
cargo-build-sbf
solana-test-validator --bpf-program <PROGRAM_ID> target/deploy/pqs_vault.so
PAYER=~/.config/solana/id.json node test/e2e.mjs
ok   forged signature rejected
ok   redirected destination rejected
ok   destination got 0.01
ok   change moved to vault1
ok   second signature from key 0 rejected
ALL PASS
Credit

Built on PQSB, by Espresso Systems.

"You can do practical post-quantum, post-AI transactions in Bitcoin: today."

Benedikt Bünz and the Espresso team showed how to spend bitcoin with hash-based one-time signatures inside a standard SegWit transaction, using an introspection signature: a puzzle that ties the one-time signature to a transaction Script can't read. PQS is an independent Solana take on the same goal. It is not affiliated with or endorsed by Espresso.

PQSB ON BITCOIN
Verifier sees tx
No, via ECDSA puzzle
Signing
Grind on GPU or laptop
Forgery target
80 to 140 bits by level
Network
Bitcoin mainnet today
PQS ON SOLANA
Verifier sees tx
Yes, reads instruction
Signing
Milliseconds in browser
Preimage security
192-bit chains
Network
Devnet only