-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Hi,
I do not fully understand the following sentence in the Megolm doc.
This scheme allows the ratchet to be advanced an arbitrary amount forwards while needing at most 1023 hash computations.
If I understood correctly the way the ratchet advances, the worst case scenario would be to advance from i=0
to i=2^32 - 1
, assuming that i
is a 32-bit counter that cannot overflow (can it?).
- 255 forwards would be needed to go from
i=0
toi=2^32 - 2^24
- 255 forwards would be needed to go from
i=2^32 - 2^24
toi=2^32 - 2^16
- 255 forwards would be needed to go from
i=2^32 - 2^16
toi=2^32 - 2^8
- 255 forwards would be needed to go from
i=2^32 - 2^8
toi=2^32 - 1
That makes 1020 hash computations, not 1023. Am I wrong?
Not that it's particularly important, but I am afraid to have an erroneous understanding of the whole thing.
Metadata
Metadata
Assignees
Labels
No labels