Feat/compare values within credential#79
Merged
0xVikasRushi merged 4 commits intomainfrom Apr 16, 2026
Merged
Conversation
…e same credential
…ring values within the same credential
0xVikasRushi
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for comparing claims within a credential, improves the generalized predicates documentation to better reflect current capabilities and possible extensions, and adds code comments. It also updates ecdsa-spartan2 to generate benchmarks.
Benchmarks
Computer properties:
MacBook Pro, Chip Apple M5, Memory 24 GB, macOS Tahoe
Benchmarks before adding the feature
Circuits
jwt: 1k
non-linear constraints: 1000691
show
non-linear constraints: 13620
╔════════════════════════════════════════════════════╗
║ BENCHMARK RESULTS — circuit size: 1k ║
╠════════════════════════════════════════════════════╣
║ TIMING MEASUREMENTS ║
╠════════════════════════════════════════════════════╣
║ Prepare Setup: 2048 ms ║
║ Show Setup: 36 ms ║
║ Generate Blinds: 0 ms ║
║ Prove Prepare: 1036 ms ║
║ Reblind Prepare: 322 ms ║
║ Prove Show: 57 ms ║
║ Reblind Show: 25 ms ║
║ Verify Prepare: 734 ms ║
║ Verify Show: 18 ms ║
╠════════════════════════════════════════════════════╣
║ SIZE MEASUREMENTS ║
╠════════════════════════════════════════════════════╣
║ Prepare Proving Key: 257.22 MB ║
║ Prepare Verifying Key: 257.22 MB ║
║ Show Proving Key: 2.96 MB ║
║ Show Verifying Key: 2.96 MB ║
║ Prepare Proof: 75.93 KB ║
║ Show Proof: 40.51 KB ║
║ Prepare Witness: 32.03 MB ║
║ Show Witness: 512.52 KB ║
╚════════════════════════════════════════════════════╝
Benchmarks after adding the feature
Circuits
jwt: 1k
non-linear constraints: 1000691
show
non-linear constraints: 13644
╔════════════════════════════════════════════════════╗
║ BENCHMARK RESULTS — circuit size: 1k ║
╠════════════════════════════════════════════════════╣
║ TIMING MEASUREMENTS ║
╠════════════════════════════════════════════════════╣
║ Prepare Setup: 2262 ms ║
║ Show Setup: 37 ms ║
║ Generate Blinds: 0 ms ║
║ Prove Prepare: 1110 ms ║
║ Reblind Prepare: 341 ms ║
║ Prove Show: 59 ms ║
║ Reblind Show: 25 ms ║
║ Verify Prepare: 741 ms ║
║ Verify Show: 18 ms ║
╠════════════════════════════════════════════════════╣
║ SIZE MEASUREMENTS ║
╠════════════════════════════════════════════════════╣
║ Prepare Proving Key: 257.22 MB ║
║ Prepare Verifying Key: 257.22 MB ║
║ Show Proving Key: 2.96 MB ║
║ Show Verifying Key: 2.96 MB ║
║ Prepare Proof: 75.93 KB ║
║ Show Proof: 40.51 KB ║
║ Prepare Witness: 32.03 MB ║
║ Show Witness: 512.52 KB ║
╚════════════════════════════════════════════════════╝
Related Issue(s)
Closes #78
Checklist
Important
We do not accept pull requests for minor grammatical fixes (e.g., correcting typos, rewording sentences) or for fixing broken links, unless they significantly improve clarity or functionality. These contributions, while appreciated, are not a priority for merging. If you notice any of these issues, please create a GitHub Issue to report them so they can be properly tracked and addressed.