Skip to content

Commit

Permalink
Update EIP-7745: Fix reverse_transform
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
zsfelfoldi authored Sep 4, 2024
1 parent ca43ed7 commit e423033
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions EIPS/eip-7745.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ def column_transform(value_subindex, transform_hash):
def reverse_transform(column_index, transform_hash):
x = column_index
x = (x + 2**32 - littleEndian_to_uint32(transform_hash[0:4])) % 2**32
x = (x * modInverse(littleEndian_to_uint32(transform_hash[4:8])*2+1, 2**32)) % 2**32
x = x ^ littleEndian_to_uint32(transform_hash[8:12]
x = (x * modInverse(littleEndian_to_uint32(transform_hash[12:16])*2+1, 2**32)) % 2**32
x = (x + 2**32 - littleEndian_to_uint32(transform_hash[16:20])) % 2**32
x = (x * modInverse(littleEndian_to_uint32(transform_hash[20:24])*2+1, 2**32)) % 2**32
x = x ^ littleEndian_to_uint32(transform_hash[24:28]
x = (x * modInverse(littleEndian_to_uint32(transform_hash[28:32])*2+1, 2**32)) % 2**32
x = x ^ littleEndian_to_uint32(transform_hash[24:28]
x = (x * modInverse(littleEndian_to_uint32(transform_hash[20:24])*2+1, 2**32)) % 2**32
x = (x + 2**32 - littleEndian_to_uint32(transform_hash[16:20])) % 2**32
x = (x * modInverse(littleEndian_to_uint32(transform_hash[12:16])*2+1, 2**32)) % 2**32
x = x ^ littleEndian_to_uint32(transform_hash[8:12]
x = (x * modInverse(littleEndian_to_uint32(transform_hash[4:8])*2+1, 2**32)) % 2**32
x = (x + 2**32 - littleEndian_to_uint32(transform_hash[0:4])) % 2**32
return x
```

Expand Down

0 comments on commit e423033

Please sign in to comment.