Vault network upgrade

Post-quantum addresses

After the vault upgrade, a Ycash address can be controlled by a post-quantum signature key instead of a secp256k1 (ECDSA) key. This works today on the public fast testnet. Mainnet has no activation height yet.

Testnet only, beta software. The vault upgrade is active on the fast testnet (testnet-yb-fast) from height 510,400, and on regtest at a height you choose. No mainnet activation height is set. The vault upgrade and Ycash Yellowback (YED) are proposals and have not been adopted by the Ycash Foundation. They have had internal reviews only. No third-party audit has been done yet (reviews).

What it is

Today every transparent Ycash coin is locked to an elliptic-curve key on secp256k1, the curve Bitcoin uses. A large enough quantum computer running Shor's algorithm could compute the private key from the public key. Such a machine does not exist today, but anything published on the chain stays there. A public key that is already visible could be attacked once one does: the key of every address that has spent coins, and of every address that has been reused.

The vault upgrade adds a new kind of transparent output whose key is a post-quantum signature key. The output stores only a 32-byte hash of the key, so the public key appears on the chain when the coins are spent, not before. Two signature schemes are available, and each address shows which one it uses:

  • Plain YEC. Any wallet on the upgraded node can receive YEC at a post-quantum address and spend it from there, alongside its ECC (s1…) and Sapling (ys1…) addresses.
  • Vault owners. Every vault's owner key is post-quantum. This includes YED vaults and bridge vaults, and the key used for owner recovery. The vault templates have no secp256k1 owner slot. The wallet's default owner scheme is SLH-DSA.
  • YED holders. From the first block of the upgrade, every output that receives YED must be held by an FN-DSA-512 key. A transfer that would assign YED to any other kind of output is invalid. This means no ECDSA-held YED can ever exist on a network running the upgrade.

What stays classical

  • Existing transparent addresses (s1… on mainnet) keep their secp256k1 keys. Coins are protected only once they are moved to a post-quantum address.
  • The Sapling shielded pool is unchanged. Its spend authority and proof system are not post-quantum, and its privacy depends on the address staying secret. The upgrade plan leaves the shielded pool to separate future work: Ycash would adopt Zcash's post-quantum pool on the 6.x node line once Zcash ships one.
  • Attestor sets and bridge guardians still sign with secp256k1. If those keys were ever broken, the vault owner's post-quantum recovery path is the backstop.
  • The server side of a hybrid YED payment channel (client post-quantum, server ECDSA) is only as strong as secp256k1. Servers are told to settle channels promptly.

Two signature schemes

Both schemes are at NIST security category 1 (comparable to AES-128). The larger category-5 variants were rejected because of their size: Falcon-1024 does not fit the standard scriptSig limit, and an SLH-DSA-256s signature is 29.8 KB. Ycash uses two schemes because each covers the other's weakness. FN-DSA-512 is small and fast, so it suits keys that sign often. SLH-DSA relies only on hash functions and has a final standard, so it suits keys that sign rarely but guard the most value.

FN-DSA-512 (Falcon)SLH-DSA-SHA2-128s (SPHINCS+)
Scheme id · address letter0x02 · f0x01 · s
Hardness assumptionNTRU latticesHash functions only (SHA-256)
Public key897 bytes32 bytes
Signature666 bytes7,856 bytes
Spending scriptSig1,577 bytes7,938 bytes
Verification, measured≈21–27 µs (ECDSA ≈20 µs)≈250 µs
Used forYED holders; default for plain YEC (getnewaddress pq)Vault owners (default); plain YEC on request (getnewaddress pqslh)
NIST statusSelected in 2022; FIPS 206 not yet publishedFIPS 205, final (13 August 2024)

The verification times come from the developers' denial-of-service measurement of October 2026. Each figure is one signature check. They are a guide, not a benchmark.

FN-DSA-512 (Falcon)

Falcon is a lattice signature built on NTRU lattices. Its signatures and keys are the smallest of the NIST post-quantum signatures, which keeps everyday YED transfers affordable. NIST selected Falcon for standardization on 5 July 2022, and its standard is to be FIPS 206 (FN-DSA). FIPS 206 has not been published. As of 14 November 2026, NIST's FIPS list has no FIPS 206 entry, either final or draft, and the NIST PQC project page describes Falcon's standardization as "underway".

What the node runs. The node calls scheme 2 "FN-DSA-512", but it implements Falcon-512 as submitted in NIST's third round, in the padded signature format, from PQClean's falcon-padded-512/clean at commit 0586a824. Only one encoding is accepted: a fixed 666-byte signature (header 0x39, nonce, compressed signature, zero padding). The shorter "compact" form is rejected. Verification uses integer arithmetic only, with no floating point and no heap allocation. The one local change to the vendored code removes a heap allocation in SHAKE256.

Where it may differ from the final standard. The FN-DSA drafts are expected to change how the message is hashed before signing (domain separation with a context string), so the final FIPS 206 may not verify round-3 signatures. The opcode accepts any registered scheme id, so a later upgrade can add the final FN-DSA as scheme 0x03 next to 0x02, and holders would move to it. Coins already paid to a scheme-2 key will remain spendable only with a round-3 Falcon signature. The Yellowback lead architect accepted this risk when choosing to activate Falcon from the first block. It is recorded in the audit (below). Vault owners use SLH-DSA, which is already final, and are not affected.

Signing. Falcon's signer has a known side channel on small embedded chips. For that reason the YED holder key is a software key on desktop and mobile only. No hardware wallet supports it.

SLH-DSA-SHA2-128s (SPHINCS+)

SLH-DSA is the NIST standard form of SPHINCS+. Its security rests only on the hash function, which is the most conservative assumption available. It is FIPS 205, published as a final standard on 13 August 2024. Its 7,856-byte signatures are large, so Ycash uses it where a key signs only a few times over its life: a vault owner redeeming or recovering.

What the node runs. The parameter set is SLH-DSA-SHA2-128s, chosen because Ycash already uses SHA-256 and because the faster 128f signature (17,088 bytes) exceeds the 10,000-byte script limit. The node uses FIPS 205's pure mode with an empty context string, not a pre-hash variant. The code is the PQ Code Package's slhdsa-c at commit 174c02e4, tested against NIST's ACVP vectors. PQClean's SPHINCS+ round-3.1 code was rejected because it is not FIPS 205: it lacks the domain separation. The one local patch wipes secret key material from memory after key generation and signing. The node wallet signs in hedged mode, adding 16 random bytes per FIPS 205 §9.2. Verification accepts both hedged and deterministic signatures.

How it works on Ycash

Addresses

A post-quantum address is a Base58Check encoding of a 3-byte version and the 32-byte key hash, 53 characters long. The third character names the scheme: f for FN-DSA-512, s for SLH-DSA-SHA2-128s.

NetworkYEC, FN-DSA-512YEC, SLH-DSAYED, FN-DSA-512YED, SLH-DSA
Mainnetsqf…sqs…ybf…ybs…
Testnettqf…tqs…ytf…yts…
Regtestrqf…rqs…yrf…yrs…

A YEC and a YED address of the same key pay to the same output script. The prefix only tells a wallet what it is sending. The ECC YED address (yb… on mainnet) is 35 characters, so length tells it apart from ybf…/ybs…. Addresses in the earlier form, without the scheme letter (written by builds before beta2), are refused.

The script and OP_CHECKPQSIG

A post-quantum output is 35 bytes, compared with 25 for a P2PKH output:

scriptPubKey · scriptSig
<keyHash:32> OP_1|OP_2 OP_CHECKPQSIG           # 20 <32 bytes> 51|52 c2
<sig_1> … <sig_s> <s> <pk_1> … <pk_p> <p>           # the spend: chunks of at most 520 bytes

OP_CHECKPQSIG is opcode 0xc2, allocated above OP_NOP10 next to the vault opcodes 0xc0 and 0xc1. Before the upgrade it is a bad opcode. It takes the scheme id and key hash from the output script. It then reassembles the public key and the signature from the scriptSig, which pushes them in canonical 520-byte chunks so the existing 520-byte element limit stays as it is. It checks the exact sizes and that SHA256(scheme ‖ pk) equals the key hash. Finally it verifies the signature over the same ZIP-243 signature hash OP_CHECKSIG uses; the last signature byte is the hash type. A wrong key or signature returns false, as OP_CHECKSIG does. A wrong size, bad chunking or an unknown scheme fails the script. The opcode applies to version-4 (Sapling) transactions only, and a script evaluation may execute it at most once.

Size, policy and fees

  • A post-quantum input may carry a scriptSig of up to 9,000 bytes under relay policy. Other inputs keep the 1,650-byte limit. The consensus bounds, a 10,000-byte script and a 2 MB block, do not change.
  • For relay and block templates each OP_CHECKPQSIG counts as 20 signature operations. Consensus counts none, so the sigop count of historical blocks does not change.
  • Wallets price transactions with a post-quantum input by size, not with the flat fee. In beta2 that comes to about 27,000 zat for one SLH-DSA input and 5,500 zat for one FN-DSA-512 input. With an attested price the target rate is $0.02 per KB for plain YEC and $0.05 per KB for vault and Yellowback transactions, with a floor of 5,000 zat per KB. All of this is wallet and relay policy: no fee rule is in consensus.
  • A wrapped (P2SH) post-quantum script is valid but not relayed.

Wallets and RPCs

  • getnewaddress pq gives an FN-DSA-512 address and getnewaddress pqslh an SLH-DSA one. vault_getnewowner gives an owner key, SLH-DSA by default. Post-quantum keys are derived from the wallet seed (HKDF-SHA256), so the usual seed backup covers them. They have no extended public key, so watch-only wallets import addresses.
  • z_sendmany sends from an ECC, Sapling or post-quantum address to any mix of the three. A post-quantum source spends only its own coins and gets its change back.
  • sendtoaddress, sendmany, sendfrom and fundrawtransaction spend ECC coins only. If the wallet's ECC coins do not cover a payment, these calls refuse it. Use z_sendmany from the post-quantum address instead.
  • z_gettotalbalance reports transparent_ecc, transparent_pq and pq_by_scheme. getwalletinfo adds balance_ecc, balance_pq and pq_by_scheme. z_validateaddress and validateaddress return the scheme and key hash.
  • RPC contract version 9 (yed_getinfo.rpcversion) is the version with scheme-visible addresses.

Software that supports it

SoftwareRoleForm
ycashd 6.22.0-beta2Validates, and its wallet creates, sends from and reports post-quantum addressesPre-release binaries
koganyd v1.8.0-ycash.beta2Validates the vault upgrade as ycashd 6.22.0-beta2 does, and answers validateaddress for post-quantum addresses. It has no wallet.Pre-release binaries
yewdThe wallet that runs beside koganyd: post-quantum sends and balances by typeSource only (yew fc56fba7)
YecWallet, YEWDesktop and mobile walletsSupport is in source on their development branches. No release yet.

Status

NetworkPost-quantum addresses
Fast testnet (testnet-yb-fast)Live since the vault activation at height 510,400. Plain YEC sends work. YED cannot be minted there yet, because no attestor set is configured.
Regtest, devnetActive at the height you choose (-nuparams=6d5b7a31:<h>). YED with -yellowbackattestorset.
Slow testnetNo height yet
MainnetNot scheduled No activation height is set. getnewaddress pq is refused on mainnet.

Reviews

  • Falcon-512 consensus audit, 2026-10-10 Internal. Scope: the Falcon and SLH-DSA verification path and the opcode integration on both C++ node lines. Findings: the vendored Falcon verifier matches PQClean byte for byte, apart from the documented SHAKE patch. It is deterministic across compilers and settings and produced no sanitizer findings over 34 million mutated verifications. It agreed with two independent verifiers on all 6,503 test inputs, including NIST's 100 round-3 test vectors. SLH-DSA got a lighter pass, with no finding. Outcome: no critical or high finding, and the code was judged shippable on small conditions. One of them, an exact-length check in the Falcon entry point, is in the code. The audit's main caveat is not about the code: once coins are paid to a scheme-2 key, the protocol is committed to a signature scheme whose standard is not yet published.
  • Follow-up internal review, 2026-10-12. It found that copies of secret keys stayed in memory after key generation and signing in both vendored libraries. These are now wiped, and SLH-DSA signing became hedged.
  • Consensus review gate. Every consensus change in the post-quantum work went through two independent internal reviews before merging.
  • Third-party audit: Planned, a gate before mainnet. None has been done.

All reviews are listed on the audits page.

Try it on the fast testnet

With ycashd 6.22.0-beta2 (release and verification steps), from the unpacked package directory:

ycashd 6.22.0-beta2 · fast testnet
mkdir -p ~/.ycash-fast
printf 'testnet=1\ntestnetprofile=fast\naddnode=fastnet-seed.ycash.team\n' > ~/.ycash-fast/ycash.conf
./ycashd -datadir=$HOME/.ycash-fast -daemon
# once synced past height 510,400:
./ycash-cli -datadir=$HOME/.ycash-fast getnewaddress pq          # tqf… (FN-DSA-512)
./ycash-cli -datadir=$HOME/.ycash-fast getnewaddress pqslh       # tqs… (SLH-DSA)
./ycash-cli -datadir=$HOME/.ycash-fast z_gettotalbalance         # transparent_ecc, transparent_pq, pq_by_scheme
./ycash-cli -datadir=$HOME/.ycash-fast z_sendmany <from> '[{"address": "<to>", "amount": 0.1}]' 1

The last argument of z_sendmany is minconf, which defaults to 10. Coins received fewer than 10 blocks ago need a lower value. To run Kogany instead, follow the vault page and pair it with yewd.

Sources