sept-secondary: reboot to clean state + grab keys from SE

This commit is contained in:
Michael Scire
2019-02-20 09:20:19 -08:00
parent f58f7c8a16
commit c56561b234
10 changed files with 272 additions and 23 deletions

View File

@@ -53,7 +53,8 @@ def main(argc, argv):
return 1
with open(argv[1], 'rb') as f:
code = f.read()
assert (len(code) & 0xF) == 0
if len(code) & 0xF:
code += '\x00'*(0x10 - (len(code) & 0xF))
# TODO: Support dev unit crypto
with open(argv[2], 'wb') as f:
f.write(sign_encrypt_code(code, KEYS.HOVI_SIG_KEY_PRD, KEYS.HOVI_ENC_KEY_PRD, KEYS.IV, 'THANKS_NVIDIA_<3'))