mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 19:27:46 +00:00
[crypto] adding ARM PSA (Platform Security Architecture) support (#6862)
- New format for MAC keys, as a union between literal key and keyrefs. - Modified key_manager to handle both literal keys or keyrefs. - Modified MAC and sub_mac modules to handle both Literal Keys or keyrefs. - Updated Crypto Modules to use abstracted APIs. - New CLIs to handle networkkey and pskc references.
This commit is contained in:
@@ -502,4 +502,52 @@ OT_TOOL_WEAK otError otPlatInfraIfSendIcmp6Nd(uint32_t, const otIp6Address *, co
|
||||
}
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
|
||||
|
||||
otError otPlatCryptoImportKey(otCryptoKeyRef * aKeyRef,
|
||||
otCryptoKeyType aKeyType,
|
||||
otCryptoKeyAlgorithm aKeyAlgorithm,
|
||||
int aKeyUsage,
|
||||
otCryptoKeyStorage aKeyPersistence,
|
||||
const uint8_t * aKey,
|
||||
size_t aKeyLen)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aKeyRef);
|
||||
OT_UNUSED_VARIABLE(aKeyType);
|
||||
OT_UNUSED_VARIABLE(aKeyAlgorithm);
|
||||
OT_UNUSED_VARIABLE(aKeyUsage);
|
||||
OT_UNUSED_VARIABLE(aKeyPersistence);
|
||||
OT_UNUSED_VARIABLE(aKey);
|
||||
OT_UNUSED_VARIABLE(aKeyLen);
|
||||
|
||||
return OT_ERROR_NONE;
|
||||
}
|
||||
|
||||
otError otPlatCryptoExportKey(otCryptoKeyRef aKeyRef, uint8_t *aBuffer, size_t aBufferLen, size_t *aKeyLen)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aKeyRef);
|
||||
OT_UNUSED_VARIABLE(aBuffer);
|
||||
OT_UNUSED_VARIABLE(aBufferLen);
|
||||
|
||||
*aKeyLen = 0;
|
||||
|
||||
return OT_ERROR_NONE;
|
||||
}
|
||||
|
||||
otError otPlatCryptoDestroyKey(otCryptoKeyRef aKeyRef)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aKeyRef);
|
||||
|
||||
return OT_ERROR_NONE;
|
||||
}
|
||||
|
||||
bool otPlatCryptoHasKey(otCryptoKeyRef aKeyRef)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aKeyRef);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user