Zcash Developers Plan Quantum-Safe Fix to Protect Private Swaps

Zcash developers are working on a new privacy measure designed to protect users against the potential threat of quantum computers. The proposed change would prevent attackers from linking private ZEC transactions through addresses exposed during swaps on NEAR Intents, a cross-chain trading service.

Zakura, an updated implementation of the software powering the Zcash network, outlined the proposal in a recent engineering post. The plan would assign a separate viewing key to every ZEC swap made through NEAR Intents, limiting how much transaction information could be exposed if quantum computers eventually break the cryptography protecting current addresses.

NEAR Intents allows users to exchange tokens across different blockchains. When someone swaps shielded ZEC for USDC, the service publishes a private Zcash address on NEAR's public blockchain so it can return any unused funds if a transaction requires a refund.

The address is published once the deposit arrives and remains visible even when the swap completes successfully and no refund is necessary. Although the address does not reveal the user's transaction history to conventional computers, it could create a potential weakness if quantum computing advances enough to break the underlying cryptography.

Zcash addresses rely on public-key cryptography built around elliptic-curve mathematics. This system makes it practically impossible for conventional computers to derive secret information from publicly available keys. However, a sufficiently powerful quantum computer running Shor's algorithm could theoretically reverse this process and recover the associated cryptographic key.

The prospect of such an attack has become a growing concern across the cryptocurrency industry. Bitcoin and other blockchain networks face similar risks because certain public keys are permanently exposed onchain. Recent progress in quantum computing has renewed attention on the need to prepare existing cryptocurrencies for future advances, although machines capable of breaking these cryptographic systems have not yet been demonstrated.

Zcash faces an additional privacy concern because multiple addresses within a wallet can share the same viewing key. If an attacker recovered that key from an exposed address, they could potentially identify other incoming transactions associated with the wallet, including payment amounts and private memos.

The viewing key does not provide the ability to spend the funds directly. Zcash uses a separate spending key to authorize transactions, meaning the proposed attack would threaten transaction privacy rather than automatically give an attacker control over the user's assets.

Zakura's proposal aims to reduce this risk by creating an independent viewing key for each NEAR Intents swap while keeping the spending key under the user's control. If a quantum attacker eventually compromised one of the publicly exposed refund addresses, the recovered information would be limited to the transactions associated with that particular swap instead of potentially revealing the wallet's broader payment history.

However, using a separate key for every swap introduces a practical challenge. Someone who has completed hundreds of swaps could end up managing hundreds of viewing keys. Restoring a wallet from a backup would also require checking the Zcash blockchain with each key to locate relevant transactions.

To address this problem, Zakura proposes using a database that supports private information retrieval, a technique that allows a wallet to request specific information without revealing which records it wants to access. The system would help users recover refund-related transactions without exposing the addresses they are searching for.

The proposed protection is not yet a response to a demonstrated quantum attack. No quantum computer has been shown to recover the relevant cryptographic keys, and the timeline for such a capability remains uncertain. Nevertheless, developers are preparing safeguards before the technology potentially becomes powerful enough to threaten existing systems.

According to Zakura, wallets built with its open-source libraries, including Vizor, could introduce the feature in the coming weeks. Hardware wallet support would follow once compatible firmware becomes available.

The proposal also aligns with a broader effort among Zcash developers to prepare for quantum-resistant payments, with January set as a target for advancing that work. If implemented, the change would add another layer of protection to Zcash's privacy model while helping users prepare for a potential future threat to blockchain cryptography.