Skip to content

fix: reject zero ephemeral keypairs#24718

Draft
AztecBot wants to merge 1 commit into
nextfrom
cb/kernels-audit-remediation-1048-ephemeral-key-infinity
Draft

fix: reject zero ephemeral keypairs#24718
AztecBot wants to merge 1 commit into
nextfrom
cb/kernels-audit-remediation-1048-ephemeral-key-infinity

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

Ephemeral keypair generation accepted a zero secret, which produces the point at infinity while still satisfying the positive-y check used by constrained note encryption. Rejecting infinity immediately after the fixed-base multiplication prevents constrained note delivery from emitting an undecryptable ephemeral public key.

Fix

  • Reject point-at-infinity ephemeral public keys in both ephemeral keypair helpers.
  • Add regressions that mock the random oracle to return zero and expect both helpers to fail.

Testing

  • ../../noir/noir-repo/target/debug/nargo test --package noir_aztec --exact keys::ephemeral::test::generate_positive_ephemeral_key_pair_rejects_zero_secret --silence-warnings --test-threads 1 failed before the fix with Test passed when it should have failed
  • ../../noir/noir-repo/target/debug/nargo test --package noir_aztec --exact keys::ephemeral::test::generate_positive_ephemeral_key_pair_rejects_zero_secret --silence-warnings --test-threads 1
  • ../../noir/noir-repo/target/debug/nargo test --package noir_aztec --exact keys::ephemeral::test::generate_ephemeral_key_pair_rejects_zero_secret --silence-warnings --test-threads 1
  • ../../noir/noir-repo/target/debug/nargo fmt --package noir_aztec
  • ../../noir/noir-repo/target/debug/nargo test --package noir_aztec --no-run --silence-warnings
  • git diff --check

Issues

  • Closes AztecProtocol/aztec-claude#1048 — generate_positive_ephemeral_key_pair accepts zero secrets

Created by claudebox · group: kernels-audit-remediation

@AztecBot AztecBot added ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR. labels Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant