Append length in bits to new_X

pull/20/head
tuxxy 2017-09-01 10:06:18 -06:00
parent 1acf1c3034
commit 87011f37c5
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class KMAC_256(object):
kmac = hashlib.shake_256()
new_X = (self._bytepad(key, self.BLOCK_SIZE_BYTES)
+ message
+ (self.LENGTH_BYTES).to_bytes(2, byteorder='big'))
+ (self.LENGTH_BYTES*8).to_bytes(2, byteorder='big'))
kmac.update(new_X)
return kmac.digest(self.LENGTH_BYTES)