Skip to content

Fix the ctgrind errors in the 25519 tests#171

Merged
ctz merged 1 commit into
ctz:mainfrom
brian-pane:valgrind-fixes
May 30, 2026
Merged

Fix the ctgrind errors in the 25519 tests#171
ctz merged 1 commit into
ctz:mainfrom
brian-pane:valgrind-fixes

Conversation

@brian-pane
Copy link
Copy Markdown
Contributor

No description provided.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 27, 2026

Merging this PR will not alter performance

✅ 166 untouched benchmarks


Comparing brian-pane:valgrind-fixes (f206525) with main (f27b0a7)

Open in CodSpeed

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

❌ Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 99.76%. Comparing base (f27b0a7) to head (f206525).

Files with missing lines Patch % Lines
graviola/src/high/ed25519.rs 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
- Coverage   99.76%   99.76%   -0.01%     
==========================================
  Files         189      189              
  Lines       52588    52599      +11     
==========================================
+ Hits        52466    52476      +10     
- Misses        122      123       +1     

☔ 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.

@brian-pane brian-pane force-pushed the valgrind-fixes branch 3 times, most recently from 84e68bd to ece4e75 Compare May 1, 2026 03:05
@brian-pane brian-pane changed the title Fix some of the ctgrind errors in the 25519 tests Fix the ctgrind errors in the 25519 tests May 1, 2026
@brian-pane
Copy link
Copy Markdown
Contributor Author

I had some extra time today, so I updated this to address the remaining ec25519-related ctgrind errors.

@brian-pane
Copy link
Copy Markdown
Contributor Author

(I just rebased this to make sure it works cleanly atop PR #174.)

Copy link
Copy Markdown
Owner

@ctz ctz left a comment

Choose a reason for hiding this comment

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

Hi, thanks for working on this.

I think it should be done in a slightly different way -- low::ct calls should be done in library code, rather than tests. The reason for that is that the library code is the part that should have and express an accurate handling of which quantities are secret or public.

I think that means that the public API has to change, eg Ed25519SigningKey::as_seed() (and any others that return a reference to secret storage). I think copying 32 bytes not worth worrying about.

@brian-pane
Copy link
Copy Markdown
Contributor Author

Thanks, that makes sense; I'll rework this to have Ed25519SigningKey::as_seed() etc return low::ct::public'ed copies.

@brian-pane brian-pane marked this pull request as draft May 30, 2026 10:05
@brian-pane brian-pane force-pushed the valgrind-fixes branch 2 times, most recently from 5f6ea60 to baa3630 Compare May 30, 2026 14:53
@brian-pane brian-pane marked this pull request as ready for review May 30, 2026 15:10
@brian-pane
Copy link
Copy Markdown
Contributor Author

@ctz I think this is ready for review now. I moved the ct::public calls from the tests into the various library functions that return (copies of) secrets.

Copy link
Copy Markdown
Owner

@ctz ctz left a comment

Choose a reason for hiding this comment

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

Thanks!

@ctz ctz merged commit a12d4de into ctz:main May 30, 2026
16 of 17 checks passed
@brian-pane brian-pane deleted the valgrind-fixes branch May 30, 2026 17:21
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