According to PSA specification in case of `PSA_KEY_TYPE_ECC_KEY_PAIR`
function `psa_import_key` takes private key from key pair as argument.
This commit adds extraction of Private key from ECDSA key pair.
Also removes not needed `otPlatCryptoEcdsaGetPublicKey`.
Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
Remove two workarounds in OpenThread's PSA crypto backend
that were required when Zephyr used pre-1.5 TF-M version:
1. psa_open_key() is no longer needed to reference
a persistent key
2. psa_cipher_encrypt() can be used to simplify AES
encryption
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
This commit adds new types of keys and algorithm to crypto_psa backend
of openthread.
Added options:
- `OT_CRYPTO_KEY_TYPE_ECDSA`
- `OT_CRYPTO_KEY_ALG_ECDSA`
- `OT_CRYPTO_KEY_USAGE_VERIFY_HASH`
Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
If asserts are disabled, there is a warning in 'otPlatCryptoInit'
regarding unused variable `err`. This commit fixes that.
Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
In OpenThread, Settings are initialized after KeyManager by default.
If device uses PSA with emulated TFM, Settings have to be initialized
at the end of otPlatCryptoInit(), to be available before storing
Network Key.
Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
The psa_generate_random function requires the psa_crypto_init call
before the usage. This can be ensured by calling the psa_crypto_init
in otPlatCryptoRandomInitfunction.
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
This commit adds implementation of following new api functions from
openthread:
- otPlatCryptoEcdsaGenerateAndImportKey
- otPlatCryptoEcdsaExportPublicKey
- otPlatCryptoEcdsaVerifyUsingKeyRef
- otPlatCryptoEcdsaSignUsingKeyRef
Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
Move OpenThread's glue code along with the Kconfig files that configure
OpenThread stack itself into module directory.
Update the maintainers file to reflect this change.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>