Skip to content

Conversation

Avaneesh-axiom
Copy link
Contributor

@Avaneesh-axiom Avaneesh-axiom commented Jul 16, 2025

This PR adds to the ECC extension support for verifying EdDSA signatures over the Ed25519 curve. In particular, the Ed25519 and Ed25519ph (prehashed variant) from this RFC are supported.

A new module named eddsa was added to the ECC guest extension. The eddsa.rs file contains an implementation of EdDSA that is generic over the twisted Edwards curve, but is currently only instantiated (and tested) with the Ed25519 curve.

The Ed25519 and Ed25519ph verification algorithms are tested in the ECC integration tests. All the relevant test vectors from the RFC are used, as well as some randomly generated ones.

Note: Ed25519ph is not simply Ed25519 with the message first hashed with SHA-512. The subtlety is that there is a domain separator incorporated into the input to a hash. See the definition of dom2(F, C) here and its use here.

Depends on #1858 and #1829

jonathanpwang and others added 30 commits June 9, 2025 21:31
- rename remaining structs
- switch from num-bigint-dig to num-bigint
A bug involving opcode collisions between short Weierstrass and twisted Edwards curves was found.

To fix this, CurveConfig was rewritten and separate opcodes were given to the two types of curves.
@Avaneesh-axiom Avaneesh-axiom changed the base branch from main to feat/new-execution July 16, 2025 05:28
@Avaneesh-axiom Avaneesh-axiom force-pushed the feat/eddsa branch 3 times, most recently from f933787 to 90c3220 Compare July 16, 2025 20:45

This comment has been minimized.

Copy link

codspeed-hq bot commented Jul 16, 2025

CodSpeed WallTime Performance Report

Merging #1874 will not alter performance

Comparing feat/eddsa (b3288ab) with feat/new-execution (97eaf48)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 24 untouched benchmarks

Copy link

group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair 1,241 322,676 17,270,914 - - -
fibonacci 2,322 1,500,277 50,589,231 - - -
regex (+43 [+0.6%]) 6,997 4,165,432 166,449,586 - - -
ecrecover (-35 [-2.5%]) 1,385 137,283 8,179,549 - - -
pairing (+183 [+4.8%]) 3,986 1,862,964 102,530,853 - - -

Commit: b3288ab

Benchmark Workflow

@Avaneesh-axiom Avaneesh-axiom marked this pull request as ready for review July 18, 2025 20:26
@Avaneesh-axiom Avaneesh-axiom changed the base branch from feat/new-execution to feat/ed25519 August 10, 2025 00:32
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.

3 participants