From b4480d005bc1b56fe10c6ffde48cd92a6fe19f7e Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 9 Aug 2021 20:03:30 +0500 Subject: [PATCH] Rewrite expression to be the same as in key_scramble1 --- blkstuff/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blkstuff/main.cpp b/blkstuff/main.cpp index c286f1a..b3b10b8 100644 --- a/blkstuff/main.cpp +++ b/blkstuff/main.cpp @@ -185,7 +185,7 @@ void mhy0_header_scramble2(uint8_t* input) int idx = j % 8; - tmp[j] = smol_key[idx] ^ key_scramble_table1[j % 4 * 256 | gf256_mul(v25[idx], input[i])]; + tmp[j] = smol_key[idx] ^ key_scramble_table1[((j & 3) << 8) | gf256_mul(v25[idx], input[i])]; } memcpy(input, tmp, 16); }