Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: switch to aws-lc-rs library #307

Open
flavio opened this issue Nov 14, 2023 · 6 comments
Open

Refactor: switch to aws-lc-rs library #307

flavio opened this issue Nov 14, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@flavio
Copy link
Member

flavio commented Nov 14, 2023

Description

A long time ago we moved away from the ring crate to a constellation of pure-rust cryptographic libraries. We did the switch because the ring library did not build for certain architectures (like s390x and webassembly).

This limitation has been addressed by latest versions of the library. Moreover, we have recently reintroduced the ring dependency to implement TUF trustroots.

Moving back to ring would reduce the list of dependencies we have, making the codebase easier to understand and to maintain.

I think these are the dependencies we should be able to remove:

  • ecdsa
  • ed25519
  • ed25519-dalek
  • elliptic-curve
  • p256
  • p384
  • pkcs1
  • pkcs8
  • rsa
@flavio flavio added the enhancement New feature or request label Nov 14, 2023
@jleightcap
Copy link
Contributor

@flavio @lukehinds ToB is willing to pick this up!

@flavio
Copy link
Member Author

flavio commented Dec 11, 2023

@jleightcap: awesome, who should assign this issue to?

@flavio
Copy link
Member Author

flavio commented Sep 17, 2024

Update: rustls is now supporting two different crypto backends: ring and aws-lc-rs. The latter one is a drop-in replacement of ring that provides FIPS support.

The tough crate is also considering to perform the same change.

I still think we should drop the pure-rust libraries and support either ring or aws-lc-rs

@viccuad
Copy link
Collaborator

viccuad commented Sep 30, 2024

I still think we should drop the pure-rust libraries and support either ring or aws-lc-rs

It seems that aws-lc-rs is finicky for Windows builds. Since they are drop-in replacements, I think it would be a good idea to provide a feature for selecting between them.

@flavio flavio changed the title Refactor: switch to ring library Refactor: switch to aws-lc-rs library Feb 24, 2025
@flavio
Copy link
Member Author

flavio commented Feb 24, 2025

ring is being put on security maintenance mode (see here). I don't think it makes a lot of sense to switch to it.

I would propose to move to aws-lc-rs because:

  • It's getting traction inside of the rust ecosystem, as a proof this is one of the two official crypto providers of rustls (see here)
  • It can be built using FIPS mode, which is a nice addition

What do the other maintainers think about that?

@viccuad
Copy link
Collaborator

viccuad commented Feb 25, 2025

I'm in for aws-lc-rs provided that we can do Windows builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants