add support for crypto cb only with ECC and CAAM#7269
add support for crypto cb only with ECC and CAAM#7269dgarske merged 2 commits intowolfSSL:masterfrom
Conversation
|
This fixes checking if an imported private key is a black key when using WOLF_CRYPTO_CB_ONLY_ECC. In ecc.c by default if a public key has been imported with the private key a validation of the key pair is done in order to test if the private key is encrypted or not : Before this change if WOLF_CRYPTO_CB_ONLY_ECC was defined, then the call to _ecc_validate_public_key would return MP_OKAY. Leading to the assumption that the public / private key pair was able to be validated and that the private key was unencrypted. This would then cause an invalid ECC signature generated with the imported private key since the encrypted black key was being used as though it was a decrypted plain text key. I created a simple blob test app and ran it on an RT1176 EVK board before and after the fix. It has the following code to print out the imported key type: Building without WOLF_CRYPTO_CB_ONLY_ECC avoids this edge case, and importing only the private key without a public key also avoids this case since without the public key to validate the key pair it is assumed that the private key is an encrypted black key. |
|
retest this please Jenkins.. |
ZD17312