Turns out there's a bit of code that isn't compatible w/ the Python version,
eliminate it... This was to support encoding lengths (via negative length
parameters)...
Also, the default C version (which we want to use) is Keccak(800) and not
Keccak(1600), switch Python to 800, as it'll be faster on the 32-bit uC, and
still has plenty of security margin...
This can be useful for doing trial receptions of messages, and
if they work, update the state when successful... Setting the
state on the old object is best as it's hard to change all references
to the new object..
copyof = strb.copy()
try:
copyof.recv_enc(msg)
copyof.recv_mac(mac)
except AuthenticationFailed: # failed, ignore message
return
else: # it worked
strb.set_state_from(copyof)
<process msg>