We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3609d5 commit 8b9f324Copy full SHA for 8b9f324
ledgerblue/hexLoader.py
@@ -89,10 +89,11 @@ class HexLoader:
89
def scp_derive_key(self, ecdh_secret, keyindex):
90
if self.scpv3:
91
mac_block = b"\x01" * 16
92
- cipher = AES.new(ecdh_secret, AES.MODE_ECB)
+ iv = b"\x00" * 16
93
+ cipher = AES.new(ecdh_secret, AES.MODE_CBC, iv=iv)
94
mac_key = cipher.encrypt(mac_block)
95
enc_block = b"\x02" * 16
96
97
enc_key = cipher.encrypt(enc_block)
98
return mac_key + enc_key
99
retry = 0
0 commit comments