MCPcopy
hub / github.com/AsahiLinux/m1n1 / test_custom_key

Function test_custom_key

proxyclient/experiments/aes.py:102–113  ·  view source on GitHub ↗
(key, keygen=0)

Source from the content-addressed store, hash-verified

100
101
102def test_custom_key(key, keygen=0):
103 aes.R_IRQ_STATUS = aes.R_IRQ_STATUS.val
104 aes.R_CONTROL.set(CLEAR_FIFO=1)
105 aes.R_CONTROL.set(RESET=1)
106 aes.R_CONTROL.set(START=1)
107 # aes.dump_regs()
108 aes_set_custom_key(aes, key, keyslot=0, keygen=keygen)
109 aes_set_iv(aes, b"\x00" * 16)
110 aes_set_iv(aes, b"\x11" * 16, slot=1)
111 chexdump(aes_crypt(aes, dart, b"\x00" * 16, key_slot=0, iv_slot=0))
112 # aes.dump_regs()
113 aes.R_CONTROL.set(STOP=1)
114
115
116p.pmgr_adt_power_enable("/arm-io/aes")

Callers 1

aes.pyFile · 0.85

Calls 5

aes_set_custom_keyFunction · 0.85
aes_set_ivFunction · 0.85
chexdumpFunction · 0.85
aes_cryptFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected