exo2: implement SmcGenerateAesKek, SmcLoadAesKey

This commit is contained in:
Michael Scire authored and SciresM committed 2020-06-14 22:07:45 -07:00
1 parent 864b6085a8
commit bf546d5fb3
8 files changed
+239 -65

No files matched your search

@@ -44,4 +44,12 @@ namespace ams::pkg1 {
constexpr inline const int OldMasterKeyCount = KeyGeneration_Count - 1;
constexpr inline const int OldDeviceMasterKeyCount = KeyGeneration_Count - KeyGeneration_4_0_0;
constexpr bool IsValidDeviceUniqueKeyGeneration(int generation) {
return generation == KeyGeneration_1_0_0 || (KeyGeneration_4_0_0 <= generation && generation <= KeyGeneration_Current);
}
constexpr bool IsValidKeyGeneration(int generation) {
return KeyGeneration_Min <= generation && generation <= KeyGeneration_Current;
}
}
@@ -53,4 +53,8 @@ namespace ams::pkg1 {
RsaKeySlot_PrivateKey = 1,
};
constexpr bool IsUserAesKeySlot(int slot) {
return AesKeySlot_UserStart <= slot && slot < AesKeySlot_UserEnd;
}
}