Skip to content

[zk-sdk] Add a check to terminate early on identity decrypt handle during zero-ciphertext proof verification#273

Merged
samkim-crypto merged 1 commit intosolana-program:mainfrom
samkim-crypto:terminate-early
Feb 11, 2026
Merged

[zk-sdk] Add a check to terminate early on identity decrypt handle during zero-ciphertext proof verification#273
samkim-crypto merged 1 commit intosolana-program:mainfrom
samkim-crypto:terminate-early

Conversation

@samkim-crypto
Copy link
Copy Markdown
Contributor

@samkim-crypto samkim-crypto commented Feb 11, 2026

Problem

Identity inputs to the verification function was added in #199. However, in the zero-ciphertext proof, we check for identity public keys and commitments, but not the decryption handle, while the rest of the proof types do check for identity decryption handle.

There is a conceptual justification for this inconsistency. However, to prevent confusion for developers and for early termination on invalid inputs sake, it would be good to add a check to handle the identity decryption handle.

Summary of Changes

Added a line to check for identity decryption handle in the zero-ciphertext proof.

This change does change the error code of the verification function. However, these error codes are not used in the actual zk-elgamal-proof (here), so it will not be a breaking change for the ZK ElGamal proof program. It will still be better to publish a new patch version of the zk-sdk v5.0.1 and update it on agave if we can make the cut.

@samkim-crypto samkim-crypto marked this pull request as ready for review February 11, 2026 12:37
Copy link
Copy Markdown
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, let's get the new release out quick!

@samkim-crypto samkim-crypto merged commit f71f239 into solana-program:main Feb 11, 2026
9 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.

2 participants