Skip to content

Comments

Ed25519 support#120

Draft
ctz wants to merge 28 commits intomainfrom
jbp-ed25519
Draft

Ed25519 support#120
ctz wants to merge 28 commits intomainfrom
jbp-ed25519

Conversation

@ctz
Copy link
Owner

@ctz ctz commented Nov 23, 2025

This is work-in-progress Ed25519 support. Much of the work is thanks to @phlip9 in #74

Draft while I do these items:

  • review coverage
  • self-review and write this list

fixes #74

@ctz ctz marked this pull request as draft November 23, 2025 09:57
@codecov
Copy link

codecov bot commented Nov 23, 2025

Codecov Report

❌ Patch coverage is 99.86541% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.71%. Comparing base (f6150cf) to head (165bdc7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
graviola/src/mid/ed25519.rs 99.08% 2 Missing ⚠️
graviola/src/high/ed25519.rs 99.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #120      +/-   ##
==========================================
+ Coverage   99.64%   99.71%   +0.06%     
==========================================
  Files         170      184      +14     
  Lines       39559    50730   +11171     
==========================================
+ Hits        39419    50585   +11166     
- Misses        140      145       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 23, 2025

Merging this PR will not alter performance

✅ 143 untouched benchmarks
🆕 12 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 graviola N/A 141 µs N/A
🆕 ring N/A 233.8 µs N/A
🆕 aws-lc-rs N/A 80.5 µs N/A
🆕 ring N/A 116.3 µs N/A
🆕 aws-lc-rs N/A 77.6 µs N/A
🆕 dalek N/A 111.9 µs N/A
🆕 graviola N/A 62.8 µs N/A
🆕 dalek N/A 114.6 µs N/A
🆕 graviola N/A 62.4 µs N/A
🆕 ring N/A 122.7 µs N/A
🆕 dalek N/A 150.3 µs N/A
🆕 aws-lc-rs N/A 195.6 µs N/A

Comparing jbp-ed25519 (165bdc7) with main (f6150cf)

Open in CodSpeed

Copy link
Contributor

@phlip9 phlip9 left a comment

Choose a reason for hiding this comment

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

Thanks a ton for bringing this over the finish line! And I apologize for the mess of WIP commits 😅

Figured I would leave some comments as a potential user of both rustls-graviola and graviola::signing::eddsa

@ctz
Copy link
Owner Author

ctz commented Feb 15, 2026

Thanks for the comments, I have addressed most of these.

@ctz ctz force-pushed the jbp-ed25519 branch 2 times, most recently from 035bd25 to 283dcde Compare February 15, 2026 20:42
Copy link
Contributor

@phlip9 phlip9 left a comment

Choose a reason for hiding this comment

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

LGTM!

ctz and others added 18 commits February 18, 2026 19:54
Ex: `#define foo()   bl edwards25519_decode_alt_mul_p25519`

Before this change, the generated rust macro didn't wire up the local label
reference properly:

```rust
macro_rules! foo { () => { Q!(
    "bl " Label!("edwards25519_decode_alt_mul_p25519", 0, Before)
)} }
```

After this change:

```rust
macro_rules! foo { () => { Q!(
    "bl " Label!("edwards25519_decode_alt_mul_p25519", 4, After)
)} }
```

To support this, we now track which macros reference labels. We then track
which blocks call these macros. As long as all macro callsites are uniformly
before or after the labels they reference, we can safely replace the local label
id and search direction in the original macro definition.

It was challenging to track macro callsites in the main `RustFormatter` and also
difficult to "pre-locate" callsites while dealing with hoisting, so the actual
macro fixing happens on the generated Rust code from the `RustFormatter` pass.
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