Compare commits

..

1 Commits

Author SHA1 Message Date
8c98a259ad Fix #11: Attack by using a nonce multiple times 2023-06-08 14:11:07 +02:00

View File

@@ -55,6 +55,15 @@ while True:
with open(input('entries: ')) as f:
entries = ast.literal_eval(f.read())
nonces = set()
for entry in entries:
if type(entry) == str:
break
if entry in nonces:
print('A given nonce was used several times!')
exit(1)
nonces.add(entry)
merkleTreeLevels = [{} for _ in range(common.LEVELS)]
for index in indexesRequest: