Skip to content

Commit 99df03d

Browse files
committed
remove shuffle_keys
1 parent fcf8ef1 commit 99df03d

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

bbtool.py

+6-12
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,22 @@
1515

1616
KNOWN_MODELS = {
1717
3: ("AirPort Extreme 802.11g", None),
18-
102: ("AirPort Express 802.11g", "1f1ba10645645be2bab3c80f2e8eaae1"),
18+
102: ("AirPort Express 802.11g", "0601ba1a587a44c29b91eb2b0ba88dc9"),
1919
104: ("AirPort Extreme 802.11n (1st Generation)", None),
2020
105: ("AirPort Extreme 802.11n (2nd Generation)", None),
2121
106: ("AirPort Time Capsule 802.11n (1st Generation)", None),
22-
107: ("AirPort Express 802.11n (1st Generation)", "5249c351028bf1fd2bd1849e28b23f24"),
23-
108: ("AirPort Extreme 802.11n (3rd Generation)", "bb7deb0970d8ee2e00fa46cb1c3c098e"),
22+
107: ("AirPort Express 802.11n (1st Generation)", "4b53d84d1f95eedd0af3a7ba0d94180c"),
23+
108: ("AirPort Extreme 802.11n (3rd Generation)", "a267f0156dc6f10e21d865ef391a2ea6"),
2424
109: ("AirPort Time Capsule 802.11n (2nd Generation)", None),
2525
113: ("AirPort Time Capsule 802.11n (3rd Generation)", None),
2626
114: ("AirPort Extreme 802.11n (4th Generation)", None),
27-
115: ("AirPort Express 802.11n (2nd Generation)", "1075e806f4770cd4763bd285a64e9174"),
27+
115: ("AirPort Express 802.11n (2nd Generation)", "096ff31ae96913f45719f1a18368b65c"),
2828
116: ("AirPort Time Capsule 802.11n (4th Generation)", None),
2929
117: ("AirPort Extreme 802.11n (5th Generation)", None),
3030
119: ("AirPort Time Capsule 802.11ac", None),
31-
120: ("AirPort Extreme 802.11ac", "688cdd3b1b6bdda207b6cec2735292d2"),
31+
120: ("AirPort Extreme 802.11ac", "7196c6270675c2822694ede65674b5fa"),
3232
}
3333

34-
35-
def shuffle_key(key: bytes) -> bytes:
36-
# Apple does a shuffle of the decryption key stored in firmware
37-
return bytes([key[i] ^ (i + 0x19) for i in range(len(key))])
38-
39-
4034
def encrypt_payload(key: bytes, iv: bytes, input: bytes, decrypt: bool) -> bytes:
4135
def chunkify(lst, n):
4236
for i in range(0, len(lst), n):
@@ -175,7 +169,7 @@ def get_info(model: int):
175169
if info is None:
176170
raise BaseBinaryError("Unknown model %s" % hex(model), None)
177171
(name, key) = info
178-
real_key = None if key is None else shuffle_key(bytes.fromhex(key))
172+
real_key = None if key is None else bytes.fromhex(key)
179173
return ModelInfo(name, real_key, model != 102)
180174

181175

0 commit comments

Comments
 (0)