Développement

Kaspa déprécie le vérificateur STARK RISC Zero natif après un avis de sécurité, sans hard fork

Les développeurs de Kaspa ont marqué le vérificateur STARK RISC Zero natif (0x21) comme non sûr et l'ont déprécié après un avis de sécurité de RISC Zero, et ont livré des correctifs SDK pour les covenants Groth16 sans hard fork ni mise à jour des nœuds.

Rédigé avec l'aide de l'IA. Les sources sont en lien dans le texte. Validé par une personne avant publication. Politique éditoriale

Kaspa developers have marked the native RISC Zero STARK verifier, opcode 0x21, as unsound and deprecated. The move follows a critical security advisory from RISC Zero, GHSA-g6qg-9j8p-7j87. The developers say the response needs no hard fork and no node upgrade. RISC Zero Groth16 covenants are being fixed in the developer tooling instead of in consensus.

What happened

On Monday, developer @asaefstroem posted a public service announcement for builders who use Kaspa's ZK opcodes. It sets out four points:

  • There will be no hard fork or node upgrade.
  • KAS, all non-ZK transactions and covenants, and Kaspa's generic ZK Groth16 verifier (0x20) are unaffected.
  • The "native R0 STARK verifier (0x21) is unsound and deprecated (removed from the zk sdk and will be repaired in the next hf)".
  • "R0 Groth16 covenants are fixed above consensus via kaspa-txscript-zk-sdk 2.2.0 + R0 3.1.0 (silverscript and argent updates to follow)".

The same day, developer Michael Sutton posted an announcement on the Kaspa Core R&D Telegram bulletin board. It links the full set of materials:

The project account IzioDev reposted the same text in the Kaspa Discord announcements channel.

Sutton's post says the Medium article covers the impact of the advisory on Kaspa's ZK covenants and "the immediate measures taken (no hard fork or node release required)". It also offers early ideas for the longer term. Those cover app-level Groth16 upgradability and more flexible native STARK verification.

Background: two verifiers, one affected

Kaspa's ZK opcodes include two verification paths. The PSA names the generic Groth16 verifier as 0x20 and the native RISC Zero STARK verifier as 0x21. RISC Zero's advisory hits only the second one.

The X account @hus_qy described the flaw as "a critical soundness vulnerability in their zkVM that allows malicious provers to produce valid-looking proofs for false statements". According to that post, Kaspa hard-codes RISC Zero's STARK verification circuit into its node. That is why the native STARK path inherits the flaw and should be treated as unsound for now.

The generic Groth16 verifier is a different case. KASPAglobal wrote that it does not use RISC Zero and is not affected. BSCNews reported that RISC Zero issued its warning on November 11. The advisory itself is linked above, but its full contents are not part of the material reviewed for this story.

Why there is no hard fork

Repairing the native STARK verifier means changing consensus, and that takes a hard fork. The developers chose not to make that change now. Instead they removed 0x21 from the ZK SDK and plan to repair it in the next hard fork.

KASPAglobal describes pull request 1176 as updating the RISC Zero SDK for the advisory. According to that account, the change "keeps the native STARK opcode behaving exactly as before, so consensus doesn't change." In other words, the deprecation happens in the developer tooling, not in the rules that nodes enforce.

@hus_qy gives the reasoning behind the timing: "We checked Kaspa's on-chain transaction history and found no uses of native STARK verification on mainnet." The post says that, because direct STARK verification is unused on mainnet, "we've decided not to rush a consensus change."

The finding about mainnet usage is a claim made in that post. The evidence does not include the underlying data.

What changes for builders

The changes fall mainly on developers who build with Kaspa's ZK opcodes.

Covenants that verify RISC Zero proofs through Groth16. According to the PSA, these are fixed above consensus by moving to kaspa-txscript-zk-sdk 2.2.0 together with RISC Zero 3.1.0. @hus_qy adds that this route means using a patched RISC Zero version (3.1.0 or later) and the matching verification keys. The post suggests most applications probably take this route already, because it is cheaper for on-chain settlement. That is the author's view, not a measured figure.

Projects that need the native STARK path. The native verifier is no longer available through the SDK. @hus_qy says this matters most for builders who need the larger proof format, for example for post-quantum security, and calls it a temporary limitation. For applications that do not need post-quantum proof verification, the post recommends compressing STARK proofs into Groth16 proofs and settling them through the generic Groth16 verifier.

Higher-level tools. The PSA says updates to silverscript and argent are still to follow. No dates are given.

What does not change for users and miners

The PSA says KAS and all non-ZK transactions and covenants are unaffected, and that no node upgrade is required. For node operators and miners, nothing in the evidence asks for any action. For ordinary users, @hus_qy says the flaw has no impact on existing mainnet applications or ordinary users. That claim rests on the same mainnet check described above.

Longer-term plans

The developers have also described where they want to go next. These are plans, not shipped work.

Sutton's announcement says the Medium post includes initial ideas for app-level Groth16 upgradability and flexible native STARK verification. @hus_qy describes the goal as a modular approach to STARK verification, similar to how Kaspa already handles Groth16 proofs. Under that approach, developers could choose their own verification circuits and update them separately from the base layer. A patch to an upstream implementation would then no longer require a hard fork.

The same post draws a broader lesson: "we should be very careful about embedding third-party cryptographic implementations directly into the base layer, regardless of how established or thoroughly reviewed they may seem."

Coverage and reactions

Several X accounts summarized the PSA. BSCNews reported that Kaspa merged the update on Monday, that Sutton wrote the change, and that the older proof checker still works but is no longer recommended for new projects. kaspadotnews described the bug as the first real stress test for Kaspa's zero-knowledge covenants.

In a quote post, @Daniel_Kaspa_KR listed "Affected existing covenants require migration." That point does not appear in the developer posts in the evidence. It is not clear which covenants it refers to or what a migration would involve.

What is still open

Several questions are not answered by the evidence:

  • When the repair arrives. The PSA says 0x21 will be repaired in the next hard fork, but no date or schedule for that hard fork is given.
  • What the repair looks like. It is not settled whether the repaired verifier will be a patched version of the current RISC Zero circuit or the more modular design the developers describe.
  • Silverscript and argent. The PSA says updates are to follow, with no timing.
  • Migration. Whether any existing Groth16 covenants need to migrate, and how, is not spelled out in the developer posts in the evidence.
  • The legacy repository. The announcement links kaspa-r0-recursion-legacy but does not explain its role.
  • The merge itself. Sutton's post links pull request 1176. BSCNews and KASPAglobal describe the change as merged on Monday, but the merge record is not part of the evidence.