Fix #11: Attack by using a nonce multiple times
This commit is contained in:
parent
08b4de8b61
commit
8c98a259ad
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user