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

runtime: Get rid of ring and webpki #2683

Closed
Yawning opened this issue Feb 17, 2020 · 1 comment · Fixed by #4021
Closed

runtime: Get rid of ring and webpki #2683

Yawning opened this issue Feb 17, 2020 · 1 comment · Fixed by #4021
Labels
c:deps Category: external dependencies c:runtime Category: runtime c:security Category: security sensitive

Comments

@Yawning
Copy link
Contributor

Yawning commented Feb 17, 2020

In an ideal world, we would not have a mess of Rust crypto libraries used by our system. Having to depend on someone else's branch of the library (because upstream refuses to merge a trivial branch to support the SGX target) is suboptimal to begin with. When said branch doesn't build with recent versions of the compiler, it's an even bigger issue (#2666).

This should be easy to do apart from where we use the libraries to validate AVR signatures. I'm not sure what options there are for doing X.509 certificate validation, especially with RSA in the mix, but in the medium to long term we should switch if at all possible.

@Yawning Yawning added p:0 Priority: High! bugs, address immediately c:runtime Category: runtime c:security Category: security sensitive c:deps Category: external dependencies labels Feb 17, 2020
@kostko kostko removed the p:0 Priority: High! bugs, address immediately label Mar 27, 2020
@Yawning
Copy link
Contributor Author

Yawning commented Jun 8, 2021

Looking into this again, the only remaining use of these crates should be runtime/src/common/sgx/avr.rs. So with that in mind we will need:

Of all of these things, certificate path validation is non-trivial, and hard to get exactly correct so my preference is for us to not do it ourselves, but as far as I can tell unless we can use something like openssl, we don't have a choice here if we want to shed the webpki dependency.

I am still not totally thrilled by the idea of implementing this ourselves, but because the certificate chain that IAS uses is very explicitly defined, we can just validate against what we expect IAS to provide, which is considerably easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:deps Category: external dependencies c:runtime Category: runtime c:security Category: security sensitive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants