From e423033c334bac1f74f3dad2a5e19ffbf60391ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felf=C3=B6ldi=20Zsolt?= Date: Wed, 4 Sep 2024 14:55:03 +0200 Subject: [PATCH] Update EIP-7745: Fix reverse_transform Merged by EIP-Bot. --- EIPS/eip-7745.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/EIPS/eip-7745.md b/EIPS/eip-7745.md index 985ac4b28aa78e..53cb9e18cf4aeb 100644 --- a/EIPS/eip-7745.md +++ b/EIPS/eip-7745.md @@ -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 ```