[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:
hemanth-silabs
2021-09-08 14:47:46 -07:00
committed by GitHub
parent 88c2f0f7ed
commit cf452fbf7c
71 changed files with 2687 additions and 402 deletions
+3 -3
View File
@@ -46,7 +46,7 @@ void TestMinimumPassphrase(void)
otInstance * instance = testInitInstance();
SuccessOrQuit(ot::MeshCoP::GeneratePskc(passphrase, *reinterpret_cast<const ot::Mac::NetworkName *>("OpenThread"),
static_cast<const ot::Mac::ExtendedPanId &>(xpanid), pskc));
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, sizeof(pskc)) == 0);
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, OT_PSKC_MAX_SIZE) == 0);
testFreeInstance(instance);
}
@@ -76,7 +76,7 @@ void TestMaximumPassphrase(void)
otInstance *instance = testInitInstance();
SuccessOrQuit(ot::MeshCoP::GeneratePskc(passphrase, *reinterpret_cast<const ot::Mac::NetworkName *>("OpenThread"),
static_cast<const ot::Mac::ExtendedPanId &>(xpanid), pskc));
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, sizeof(pskc)) == 0);
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, sizeof(pskc.m8)) == 0);
testFreeInstance(instance);
}
@@ -91,7 +91,7 @@ void TestExampleInSpec(void)
otInstance *instance = testInitInstance();
SuccessOrQuit(ot::MeshCoP::GeneratePskc(passphrase, *reinterpret_cast<const ot::Mac::NetworkName *>("Test Network"),
static_cast<const ot::Mac::ExtendedPanId &>(xpanid), pskc));
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, sizeof(pskc)) == 0);
VerifyOrQuit(memcmp(pskc.m8, expectedPskc, sizeof(pskc.m8)) == 0);
testFreeInstance(instance);
}