Closed DIEGGOMEZ closed 1 year ago
Anotation:
static uint8_t decrypted_message[274] = {0};
uint16_t decrypted_message_length = sizeof(decrypted_message);
And 0xE0FD private key is 2048 RSA
Hi, the code seems to be correct. The reported error-code 0x802E indicates a "decryption failure", which should only happen, if the data could not be decrypted with the given key (key mismatch).
Hi @koblibri
After these days, and multiple tries with different messages encryptions, i always have the same error, 802E, i can read public key from my certificate, but obviously(?) i cant read private key stored in E0FD to check that wverything is correct...
Any idea?
Regards!
Finally resolved, thank you.
Hi, I am triying to decrypt with my private key stored in 0xE0FD, but error 0x802E is occuring, here is my code:
};
HAL_StatusTypeDef status; optiga_lib_status_t return_status = 0; optiga_key_id_t optiga_key_id = 0xE0FD; optiga_util_t util = NULL; optiga_crypt_t crypt = NULL; optiga_rsa_encryption_scheme_t encryption_scheme; uint8_t tries = 0;
//Read certificate do{ util = optiga_util_create(OPTIGA_INSTANCE_ID_0,optiga_util_callback,NULL); optiga_status = optiga_util_open_application(util,0);
HAL_Delay(5000);
Any idea? Regards!