mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-02-07 19:18:23 +00:00
Fix asymmetric decrypt for OAEP. It only supports SHA256.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
8bc4b133ca
commit
fbabb81acd
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ int cmd_decrypt_asym() {
|
|||
mbedtls_rsa_context ctx;
|
||||
mbedtls_rsa_init(&ctx);
|
||||
if (p2 == ALGO_RSA_DECRYPT_OEP)
|
||||
mbedtls_rsa_set_padding(&ctx, MBEDTLS_RSA_PKCS_V21, MBEDTLS_MD_NONE);
|
||||
mbedtls_rsa_set_padding(&ctx, MBEDTLS_RSA_PKCS_V21, MBEDTLS_MD_SHA256);
|
||||
int r = load_private_key_rsa(&ctx, ef);
|
||||
if (r != CCID_OK) {
|
||||
mbedtls_rsa_free(&ctx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue