From aa425b56db6eaf72bf14ed25c212f814d404e298 Mon Sep 17 00:00:00 2001 From: Bjoern Kerler Date: Tue, 30 Jul 2024 16:53:13 +0200 Subject: [PATCH] Fix dxcc --- mtkclient/Library/Hardware/hwcrypto_dxcc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtkclient/Library/Hardware/hwcrypto_dxcc.py b/mtkclient/Library/Hardware/hwcrypto_dxcc.py index c991c749..cda42774 100755 --- a/mtkclient/Library/Hardware/hwcrypto_dxcc.py +++ b/mtkclient/Library/Hardware/hwcrypto_dxcc.py @@ -1286,7 +1286,7 @@ def generate_sha256(self, data): def sbrom_key_derivation(self, aeskeytype, label, salt, requestedlen, destaddr): result = bytearray() - if aeskeytype <= HwCryptoKey.PLATFORM_KEY or (1 << (aeskeytype - 1) & 0x17) == 0: + if aeskeytype > HwCryptoKey.PLATFORM_KEY or (1 << (aeskeytype - 1) & 0x17) == 0: return 0xF2000002 if requestedlen > 0xFF or (requestedlen << 28) & 0xFFFFFFFF: return 0xF2000003