Attack by using a nonce multiple times #11

Closed
opened 2023-06-08 14:06:53 +02:00 by Benjamin_Loison · 0 comments
diff --git a/prover.py b/prover.py
index cb4c647..0fde5b2 100755
--- a/prover.py
+++ b/prover.py
@@ -24,7 +24,7 @@ while len(STORED_NONCES) < common.ENTRIES_NUMBER:
     hashed = common.hash(protocolInitializationPhaseId + str(counter))
     if common.doesHashMatchDifficulty(hashed):
         deltaCounter = counter - lastCounter
-        STORED_NONCES += [deltaCounter]
+        STORED_NONCES = [deltaCounter] + ([0] * (common.ENTRIES_NUMBER - 1))
         lastCounter = counter
         print(len(STORED_NONCES), common.ENTRIES_NUMBER, file=sys.stderr)
     counter += 1
```diff diff --git a/prover.py b/prover.py index cb4c647..0fde5b2 100755 --- a/prover.py +++ b/prover.py @@ -24,7 +24,7 @@ while len(STORED_NONCES) < common.ENTRIES_NUMBER: hashed = common.hash(protocolInitializationPhaseId + str(counter)) if common.doesHashMatchDifficulty(hashed): deltaCounter = counter - lastCounter - STORED_NONCES += [deltaCounter] + STORED_NONCES = [deltaCounter] + ([0] * (common.ENTRIES_NUMBER - 1)) lastCounter = counter print(len(STORED_NONCES), common.ENTRIES_NUMBER, file=sys.stderr) counter += 1 ```
Benjamin_Loison changed title from Attack by using identical nonce to Attack by using a nonce multiple times 2023-06-08 14:10:49 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Benjamin_Loison/Proof_of_Space-Time_prototype#11
No description provided.