-
Notifications
You must be signed in to change notification settings - Fork 1
Add RSA-PSS support for handshake #60
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
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.
Some comments
pub unsafe extern "C" fn parsec_provider_kmgmt_gettable_params( | ||
_provctx: VOID_PTR, | ||
) -> *const OSSL_PARAM { | ||
println!("In func parsec_provider_kmgmt_GETTABLE_params"); |
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.
Could you please remove this print?
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.
Dropped it now.
.map_err(|_| "OSSL_PKEY_PARAM_RSA_E not found".to_string())?; | ||
|
||
let mut exp = slice::from_raw_parts(exp_param.data as *const u8, exp_param.data_size).to_vec(); | ||
//ToDo: endianess |
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.
ditto with the todo
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.
Will fix it.
} | ||
} else { | ||
Ok(OPENSSL_SUCCESS) |
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.
typo: "keys"
PARSEC_PROVIDER_DESCRIPTION_ECDSA | ||
), | ||
pub const PARSEC_PROVIDER_KEYMGMT: [OSSL_ALGORITHM; 2] = [ | ||
// ossl_algorithm!( |
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.
Is it necessary to comment it out?
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.
Will drop this.
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.
Pushed a new commit as I had removed some const in another commit.
5930bf6
to
420b819
Compare
420b819
to
6345508
Compare
This patch adds a openssl support function which finds the desired param from the param array and sets it withe provided value. Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
This is a temporary change. ECDSA support will be added in the follow-up PRs. Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
The RSA component will store the modulus and exponent parts of the RSA public key in the Provider key object. Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
The RSA key from x509 certificates will be loaded using the public params modulus and exponent. The import function now is capable of loading RSA public keys. Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
The private key and public can only be compared using the public parts of the RSA key. Only if the match succeeds we can consider that a public key is related to the corresponding private key. Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
We need digest_sign_init() as we need to calculate the digest and then sign the data. So drop sign_init() in this patch. Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
cdedb0e
to
32b4482
Compare
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
32b4482
to
e4eac5b
Compare
Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
Before, keymgmt match was testing for key names. This does not apply as what should be compared is the public key content in the TLS handshake. Remove that comparison and the corresponding tests. Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
f4500d6
to
8a3be2a
Compare
Signed-off-by: Gowtham Suresh Kumar gowtham.sureshkumar@arm.com