Skip to content

Drop dependency on crypto crates#444

Merged
djc merged 1 commit intomainfrom
externals-algs
Jan 29, 2026
Merged

Drop dependency on crypto crates#444
djc merged 1 commit intomainfrom
externals-algs

Conversation

@djc
Copy link
Member

@djc djc commented Jan 28, 2026

This has the integration tests becoming more of an aws-lc-rs monoculture. I think that's okay because the crypto itself is not the part that's under test, and we still have algorithm tests in src/alg_tests.rs.

Depends on

(Cargo Deny and Cargo Package failures are expected while this has git dependencies.)

@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.84%. Comparing base (748e18c) to head (80f7334).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #444      +/-   ##
==========================================
+ Coverage   96.80%   96.84%   +0.04%     
==========================================
  Files          20       20              
  Lines        3940     3898      -42     
==========================================
- Hits         3814     3775      -39     
+ Misses        126      123       -3     

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

use super::*;
use crate::cert::Cert;

/// From <https://www.ietf.org/archive/id/draft-ietf-lamps-dilithium-certificates-11.html#name-example-certificates>.
Copy link
Member Author

Choose a reason for hiding this comment

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

Porting these is non-trivial because they depend on library internals and we effectively have 3 different variants of aws-lc-rs:

  • Default
  • FIPS
  • unstable

rustls-post-quantum has a test that exercises both ML-DSA-44 (for EE) and ML-DSA-87 (for CA), which might be good enough? Alternatively we can add more tests in rustls-aws-lc-rs.

@djc djc requested a review from ctz January 28, 2026 13:32
@djc djc marked this pull request as ready for review January 28, 2026 21:04
@djc djc added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit 412547d Jan 29, 2026
26 checks passed
@djc djc deleted the externals-algs branch January 29, 2026 05:56
@berkus
Copy link

berkus commented Feb 3, 2026

Hi, @ctz :) long time no see.

Do you have plans on when to publish a new version of rustls-webpki with these changes? It removes a "ring" dependency from Cargo.lock for us, which has been flagged for a long time as a component dependency problem by static analysis tools.

@djc
Copy link
Member Author

djc commented Feb 3, 2026

We could drop an alpha soon, but it will likely take us a few months before we release rustls 0.24 which will build upon this. I'm not completely sure whether you could make your own rustls 0.23 verifier implementation with a rustls-webpki alpha?

@berkus
Copy link

berkus commented Feb 3, 2026

Well, alternatively we can patch the dependencies to include this change, not sure how much of a trouble it'll be yet.

@berkus
Copy link

berkus commented Feb 9, 2026

@djc would it be possible to do a patch release with this change only? i'm not sure how much it touches based on the previous refactorings, but if it's isolated enough, it could be possible? then we can drop ring without forking rustls temporarily, which will be a huge relief (I'm dizzy keeping a security related project in a fork).

@djc
Copy link
Member Author

djc commented Feb 9, 2026

@djc would it be possible to do a patch release with this change only? i'm not sure how much it touches based on the previous refactorings, but if it's isolated enough, it could be possible? then we can drop ring without forking rustls temporarily, which will be a huge relief (I'm dizzy keeping a security related project in a fork).

No, I don't think it's feasible.

The static analyses should be aware that Cargo.lock sometimes includes dependencies that are never actually built.

If this is for your work at Microsoft, I strongly suggest they sponsor our work on rustls.

@berkus
Copy link

berkus commented Feb 9, 2026

rustls/rustls#2913

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