Quantum-resistant design explained in detail
Str4d explained in detail the design for hardening note commitments against quantum attacks.
Agenda summary 11
Zebra update
Zcash Foundation · Arya
- A problem where Zebra in a Docker environment tried to overwrite the configuration file mounted by the user was fixed.
- The tip height and copy state commands can now be run even while another Zebra instance is using the same DB directory.
- To align more closely with zcashd, getaddresstxids made start and end heights optional, getrawtransaction added missing fields, and getpeerinfo added inbound peer information.
- Unnecessary getblocktemplate RPC features were removed, and the v6 transaction variant was merged behind a feature flag.
- Work in progress includes removing duplicated shared logic between Zebra and the sinsemilla crate, restoring the internal miner, adding a received field to getaddressbalance, and adding value pool information to getblock.
ECC update: zcashd 6.2.0 and Zallet
ECC · Kris, Str4d
- zcashd 6.2.0 went up on all official distribution channels that day, and since 6.1.0 will EOS halt in 8 to 9 days, people must upgrade.
- Many features were merged into Zallet, bringing it close to a feature alpha, and the last remaining piece is ZIP 321 handling.
- Work is also in progress to read zcashd wallet.dat with Blockchain Commons' Zewif wallet exchange format tool and migrate it to Zallet, and the ECC core team is adjusting this format.
- The goal by the next call is to have zcashd wallet migration and basic sync and send functionality for the migrated Zallet wallet.
- Str4d updated the ZK cryptography crates to match the new rand crate release.
- createrawtransaction is only deprecated in 6.2.0, not removed, and the plan is to offer partial transaction creation and updating through PCZT.
API coordination between Zaino and ECC
ECC, Zingo Labs · Kris, Dan
- ECC is working closely with the Zaino team to resolve mismatches between what Zallet expects and Zaino's current implementation.
- There is progress toward a proper separation between Zaino and zebrad and a common API, and interaction among ecosystem organizations is active.
Zcash Shielded Assets (ZSA) update
QEDIT · Pablo
- The ZSA ZIPs are close to final completion; the last parts were discussed with ECC this week, and the reference implementation is also in its final touches.
- This week the team received reviews of the sinsemilla crate and the Halo 2 PR, and also ECC's initial review of the Orchard crate, which it answered today.
- The ZSA changes to Orchard are very large, so the team is concentrating on responding to review and later propagating the changes to librustzcash and Zebra.
- Atomic swaps are proceeding in the background; the team prepared an Orchard branch that combines multiple action groups into one bundle rather than one action group at a time.
- A librustzcash branch for swaps and a txtool were built, and a swap version for Zebra is also being prepared.
NSM update
Shielded Labs · Mark
- The NSM PR had many files because of the transaction v6 and NU7 variant changes, but once that part is merged as a separate PR, the NSM PR will be much smaller and easier to review.
- One of Mark's PRs was merged and the NU7 PR looks set to be merged soon, after which they move on to the NSM PR and the supporting librustzcash PR.
- All are behind flags, so reviewing them is safe.
Crosslink update: Malachite and visualization
Shielded Labs · Sam, Andrew, Mark
- This week the team paid down technical debt in the Malachite integration so BFT can carry arbitrary payloads, and Sam and Andrew each proposed a message and demonstrated it being finalized as a block.
- Because proposers take turns, rounds can increase and delay things when there is no proposal.
- A feature for nodes to branch was added to the visualization tool, so a force-directed layout can draw balanced trees and side chains.
- It was set up so data output by tests can be brought into the visualization tool to inspect the test model.
- Support for resyncing when a peer is turned off and on again was fixed, and NAT traversal is still in progress.
FROST project status
Zcash Foundation · Conrado, Str4d
- The last two audit recommendations are being addressed, and once review and merging are done the project will wrap up.
- The FROST implementation itself lives in frost-core and the ciphersuite crates and has been released since last year after audit, and the frost client and frostd tools were audited.
- There is no schedule yet for PCZT support but it could be added within about a month, and in the long term they want wallet integration but cannot do it themselves and help others.
- ZIP 312 is stuck without review and feedback from others, and they plan to update it and ask the ecosystem.
- Str4d said the remaining issues in ZIP 312 are key generation and randomization handling.
- No one has yet deployed FROST on Zcash, so there is still a chance to settle a quantum-safe key structure.
Open discussion: the ZSA fork and syncing with upstream
QEDIT · Pacu, Pablo
- Pacu, noting the ZSA team has worked in a separate repository for a long time, asked about the impact of upstream changes and how well it has caught up.
- Pablo answered that Orchard has fully caught up, including the introduction of PCZT, and that they merged their work on top of PCZT.
- librustzcash has seen a lot of upstream activity and is less caught up; they will check the update timing with Str4d this week and catch up soon.
- There is a cost to catching up with each upstream change, but most are changes specified for NU7, and the core pieces, the circuit and the Halo 2 and sinsemilla dependencies, have not changed for a long time and are stable.
Post-quantum preparation: note commitments and rcm derivation
ECC · Str4d
- Str4d introduced the idea of the ZIP draft Daira Emma is writing: the current Zcash protocol is not quantum-safe, so a quantum computer could forge a note by finding another note that satisfies the note commitment.
- The solution is to tie the input of the note commitment to rcm, derived from the Blake2b hash already in use, so the attack turns into hash grinding, which is hard even for quantum computers.
- This change only alters how wallets create new notes, and a slow post-quantum circuit that serves as a proof of knowledge of the hash input could be kept as a fallback if quantum computers appear.
- After the upgrade, wallets would need to move existing notes into new notes, and existing notes that are not moved could be lost when the vulnerable circuit is turned off.
Post-quantum preparation: viewing keys and the FROST key tree
ECC, Zcash Foundation · Str4d, Conrado, Kris
- The commit IVK has the same problem, so it is bound with a hash derived from SK; notes are one-time but key material is long-term state, so for Orchard only, a proof of knowledge of SK is used as the new spend authority proof.
- Sapling is more complicated because of ZIP 32 derivation details and was excluded from the proposal.
- For hardware wallets, keeping SK inside the wallet requires proving three hashes in the circuit, which is inefficient, and since FROST has not yet been deployed, the key tree can be designed more efficiently.
- Adding derivation of a quantum key QK to the FROST key tree makes threshold signing degrade gracefully to 1-of-n when a quantum attacker appears.
- Conrado asked whether FROST could not simply generate NK and RVK randomly, and Str4d answered that hash-based derivation is needed for quantum recovery.
- Kris said key migration is bad for users so it should be fixed now, before deployment, and Conrado said a quantum-resistant option could be added later without blocking FROST deployment.
Post-quantum preparation: shipping with NU7 and the schedule
ECC · Str4d, Conrado, Kris
- The reason they want to ship this change with NU7 is that no one has made ZSA notes yet, so every non-ZEC note after that can be assumed to be quantum recoverable.
- ZEC notes already include notes that cannot be recovered after a quantum attack, so protocol complexity remains, as with Sprout, where they cannot be told apart.
- The only consensus rule impact is the part where Orchard shielded coinbase verifies the rcm derivation, and if that is not allowed, shielded coinbase is not quantum recoverable.
- NU7 is not strictly required, the change to the NU7 schedule is minimal, and it can easily be dropped if blocked.
- Conrado said they are slightly uneasy about adding more to NU7 but it is worth considering, and a ZIP draft is due to be posted soon.
- Outlooks on the quantum threat range from as early as 3 years to 10 to 30 years at the latest, and NIST and others see 2030 to 2035 as the deadline for retiring elliptic curve cryptography.
This summary is based on the original meeting notes; check them for exact details.