-
Notifications
You must be signed in to change notification settings - Fork 833
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
Import Raw RSA Private Key #7608
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. This will sure be handy for wolfSSH
2cdbde4
to
639d5f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SparkiDev please review also. Thank you
wolfcrypt/src/rsa.c
Outdated
|
||
#if defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA) || !defined(RSA_LOW_MEM) | ||
/* | ||
* Calculate y = x^(-1) mod d. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment doesn't match the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the function as well.
1. Add API for importing an RSA private key, `wc_RsaPrivateKeyDecodeRaw()`, when all you have are the components of the key in raw arrays. Also recalculates dP and dQ if missing. 2. Add API test for `wc_RsaPrivateKeyDecodeRaw()`.
Import Raw RSA Private Key
Description
Add API
wc_RsaPrivateKeyDecodeRaw()
for importing an RSA private key when all you have are the components of the key in raw arrays. Also recalculates dP and dQ if missing.Testing
Built wolfSSL with
--enable-wolfssh --enable-lowresource
. Tested against a pending build of wolfSSH that uses the new function if available. Tested with and without low resource set.Checklist