Skip to content

feat(disclosure)!: migrate to ECDH on-circuit encryption (circuits v08.0)#13

Merged
nol4lej merged 1 commit into
mainfrom
feat/disclosure-ecdh-on-circuit
May 12, 2026
Merged

feat(disclosure)!: migrate to ECDH on-circuit encryption (circuits v08.0)#13
nol4lej merged 1 commit into
mainfrom
feat/disclosure-ecdh-on-circuit

Conversation

@nol4lej
Copy link
Copy Markdown
Member

@nol4lej nol4lej commented May 12, 2026

The disclosure.circom circuit now encrypts selected note fields inside the proof using ECDH over Baby Jubjub instead of revealing them as plaintext public signals. Only the registered auditor (holding sk_A) can decrypt:

shared = sk_A · epk
plaintext_i = enc_i - Poseidon(shared.x, shared.y, i) mod BN254_P

BREAKING CHANGES:

  • generateDisclosureProof() requires three new parameters: auditorPkX: bigint, auditorPkY: bigint, r: bigint (ephemeral scalar)
  • DisclosureProofOutput.revealedData removed; replaced by encryptedData: { epkX, epkY, encValue, encAssetId, encOwnerHash, commitment }
  • Public signal count: 4 → 8 [epk_x, epk_y, enc_value, enc_asset_id, enc_owner_hash, commitment, auditor_pk_x, auditor_pk_y]
  • circomlibjs (off-circuit Poseidon owner hash) removed from proof gen

Bump @orbinum/circuits 0.7.0 → 0.8.0.

….8.0)

The disclosure.circom circuit now encrypts selected note fields inside the
proof using ECDH over Baby Jubjub instead of revealing them as plaintext
public signals. Only the registered auditor (holding sk_A) can decrypt:

  shared       = sk_A · epk
  plaintext_i  = enc_i - Poseidon(shared.x, shared.y, i)  mod BN254_P

BREAKING CHANGES:
- generateDisclosureProof() requires three new parameters:
    auditorPkX: bigint, auditorPkY: bigint, r: bigint (ephemeral scalar)
- DisclosureProofOutput.revealedData removed; replaced by encryptedData:
    { epkX, epkY, encValue, encAssetId, encOwnerHash, commitment }
- Public signal count: 4 → 8
    [epk_x, epk_y, enc_value, enc_asset_id, enc_owner_hash,
     commitment, auditor_pk_x, auditor_pk_y]
- circomlibjs (off-circuit Poseidon owner hash) removed from proof gen

Bump @orbinum/circuits 0.7.0 → 0.8.0.
@nol4lej nol4lej merged commit 463e732 into main May 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant