diff --git a/utilities/gen_key_file.py b/utilities/gen_key_file.py new file mode 100644 index 0000000..4a70f64 --- /dev/null +++ b/utilities/gen_key_file.py @@ -0,0 +1,36 @@ +# ----------------------------------------------------------------------------- +# Title : Quartus Key generation +# Project : Generic FW tools +# ----------------------------------------------------------------------------- +# File : gen_key_file.py +# Author : Simon Southwell +# Company : Global Inkjet Systems +# Created : 2018-03-14 +# Last update: 2018-03-14 +# Platform : +# Standard : Python 3.x +# ----------------------------------------------------------------------------- +# Description: +# Generates a set of keys for a .key file for FPGA encryption +# ----------------------------------------------------------------------------- +# Copyright (c) 2018 Global Inkjet Systems +# ----------------------------------------------------------------------------- + +import random + +# ############################################################### +# Only run if not imported (to test) +# +if __name__ == '__main__': + + str = 'key1 ' + + for key in range(2) : + + for idx in range(32) : + val = random.randint(0, 255) + str += format(val, '02x') + + print(str) + str = 'key2 ' +