update solo hacker key

This commit is contained in:
Conor Patrick
2018-12-10 21:21:56 -05:00
parent db0642eeab
commit 2a8498210c
3 changed files with 7 additions and 7 deletions

View File

@@ -16,16 +16,15 @@ def flash_addr(num):
args = sys.argv[:]
# generic / hacker attestation key
secret_attestation_key = "cd67aa310d091ed16e7e9892aa070e1994fcd714ae7c408fb946b72e5fe75d30"
secret_attestation_key = "1b2626ecc8f69b0f69e34fb236d76466ba12ac16c3ab5750ba064e8b90e02448"
# user supplied, optional
for i,x in enumerate(args):
if x == '-s':
secret_attestation_key = args[i+1]
args = args[:i] + args[i+2:]
break
if secret_attestation_key is not None:
args = args[:i] + args[i+2:]
# TODO put definitions somewhere else
PAGES = 128
@@ -35,6 +34,7 @@ ATTEST_ADDR = (flash_addr(PAGES - 15))
first = IntelHex(args[1])
for i in range(2, len(args)-1):
print('merging %s with ' % (args[1]), args[i])
first.merge(IntelHex( args[i] ), overlap = 'replace')
first[AUTH_WORD_ADDR] = 0
@@ -49,9 +49,9 @@ first[AUTH_WORD_ADDR+7] = 0xff
if secret_attestation_key is not None:
key = unhexlify(secret_attestation_key)
print('using key ',key)
for i,x in enumerate(key):
print(hex(ATTEST_ADDR + i))
first[ATTEST_ADDR + i] = x
first.tofile(args[len(args)-1], format='hex')