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

Parse RSA CRT parameters from PKCS1 private keys #91

Merged
merged 1 commit into from
Mar 9, 2020

Conversation

jack-fortanix
Copy link
Contributor

Currently they are ignored in the serialized key and then regenerated from P/Q/D. But that exposes key loading to a side channel attack on the modular inversion and GCD bignum functions when QP is computed. [And probably similar issues for DP/DQ during the division step but no attack there has been published yet.]

Also this reduces computational overhead of loading RSA private keys from memory which will be nice for us in roche.

Backport of ARMmbed/mbed-crypto#352

Currently they are ignored in the serialized key and then regenerated
from P/Q/D. But that exposes key loading to a side channel attack on
the modular inversion and GCD bignum functions when QP is computed.
[And probably similar issues for DP/DQ during the division step but no
attack there has been published yet.]

Backport of ARMmbed/mbed-crypto#352
@jack-fortanix
Copy link
Contributor Author

@jethrogb ping

@jethrogb
Copy link
Member

jethrogb commented Mar 9, 2020

bors r+

bors bot added a commit that referenced this pull request Mar 9, 2020
90: Fix ECDSA side channel r=jethrogb a=jack-fortanix

Backport of ARMmbed/mbed-crypto@247c4d3
which addresses the attack described in https://eprint.iacr.org/2020/055.pdf

91: Parse RSA CRT parameters from PKCS1 private keys r=jethrogb a=jack-fortanix

Currently they are ignored in the serialized key and then regenerated from P/Q/D. But that exposes key loading to a side channel attack on the modular inversion and GCD bignum functions when QP is computed. [And probably similar issues for DP/DQ during the division step but no attack there has been published yet.]

Also this reduces computational overhead of loading RSA private keys from memory which will be nice for us in roche.

Backport of ARMmbed/mbed-crypto#352

Co-authored-by: Jack Lloyd <[email protected]>
@bors
Copy link
Contributor

bors bot commented Mar 9, 2020

Build failed (retrying...)

@jethrogb
Copy link
Member

jethrogb commented Mar 9, 2020

bors r-

@bors
Copy link
Contributor

bors bot commented Mar 9, 2020

Canceled

@jethrogb
Copy link
Member

jethrogb commented Mar 9, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 9, 2020

Build succeeded

@bors bors bot merged commit 3827fb0 into fortanix:master Mar 9, 2020
mcr pushed a commit to mcr/rust-mbedtls that referenced this pull request Aug 10, 2023
This PR corrects a variable name and type, and ensures we
test the socks-proxy feature as part of the test matrix.
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