Skip to content

Feat/compare values within credential#79

Merged
0xVikasRushi merged 4 commits intomainfrom
feat/compare-values-within-credential
Apr 16, 2026
Merged

Feat/compare values within credential#79
0xVikasRushi merged 4 commits intomainfrom
feat/compare-values-within-credential

Conversation

@vplasencia
Copy link
Copy Markdown
Member

@vplasencia vplasencia commented Apr 15, 2026

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

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

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.

@vplasencia vplasencia requested a review from 0xVikasRushi April 15, 2026 12:23
@0xVikasRushi 0xVikasRushi merged commit d13c457 into main Apr 16, 2026
1 check 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.

Compare values within the same credential

2 participants