From 7d170259d3331f92d0b719831a9cd552a2acb3cf Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 20 Feb 2019 13:26:54 -0800 Subject: [PATCH] sept-s: fix building without keys (output won't work though) --- sept/sept-secondary/KEYS_template.py | 7 +++++++ sept/sept-secondary/Makefile | 2 +- sept/sept-secondary/sept_sign.py | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 sept/sept-secondary/KEYS_template.py diff --git a/sept/sept-secondary/KEYS_template.py b/sept/sept-secondary/KEYS_template.py new file mode 100644 index 000000000..a4a0ee971 --- /dev/null +++ b/sept/sept-secondary/KEYS_template.py @@ -0,0 +1,7 @@ +HOVI_ENC_KEY_PRD = '00000000000000000000000000000000'.decode('hex') +HOVI_ENC_KEY_DEV = '00000000000000000000000000000000'.decode('hex') +HOVI_SIG_KEY_PRD = '00000000000000000000000000000000'.decode('hex') +HOVI_SIG_KEY_DEV = '00000000000000000000000000000000'.decode('hex') +HOVI_KEK_KEY_PRD = '00000000000000000000000000000000'.decode('hex') +HOVI_KEK_KEY_DEV = '00000000000000000000000000000000'.decode('hex') +IV = '00000000000000000000000000000000'.decode('hex') \ No newline at end of file diff --git a/sept/sept-secondary/Makefile b/sept/sept-secondary/Makefile index 015822d91..b09d2359d 100644 --- a/sept/sept-secondary/Makefile +++ b/sept/sept-secondary/Makefile @@ -132,7 +132,7 @@ clean: #--------------------------------------------------------------------------------- else -.PHONY: all +.PHONY: all $(OUTPUT).enc DEPENDS := $(OFILES:.o=.d) diff --git a/sept/sept-secondary/sept_sign.py b/sept/sept-secondary/sept_sign.py index c764a7598..ff49bea2d 100644 --- a/sept/sept-secondary/sept_sign.py +++ b/sept/sept-secondary/sept_sign.py @@ -3,7 +3,11 @@ import sys from struct import pack as pk, unpack as up from Crypto.Cipher import AES from Crypto.Hash import CMAC -import KEYS +try: + import KEYS +except ImportError: + import KEYS_template as KEYS + print('Warning: output will not work on 7.0.0+!') def shift_left_xor_rb(s): N = int(s.encode('hex'), 16)