mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-18 04:18:10 +00:00
xmr: payment ID computation fix
- typo in tail differentiating tag caused invalid short payment id encryption. was 0x8B, should have been 0x8D -69b646494b/src/device/device_default.cpp (L39)
-69b646494b/src/device/device_default.cpp (L287)
This commit is contained in:
parent
dd5eba8da9
commit
f810230e71
@ -373,7 +373,7 @@ def _encrypt_payment_id(payment_id, public_key, secret_key):
|
|||||||
derivation_p = crypto.generate_key_derivation(public_key, secret_key)
|
derivation_p = crypto.generate_key_derivation(public_key, secret_key)
|
||||||
derivation = bytearray(33)
|
derivation = bytearray(33)
|
||||||
derivation = crypto.encodepoint_into(derivation, derivation_p)
|
derivation = crypto.encodepoint_into(derivation, derivation_p)
|
||||||
derivation[32] = 0x8B
|
derivation[32] = 0x8D # ENCRYPTED_PAYMENT_ID_TAIL
|
||||||
hash = crypto.cn_fast_hash(derivation)
|
hash = crypto.cn_fast_hash(derivation)
|
||||||
pm_copy = bytearray(payment_id)
|
pm_copy = bytearray(payment_id)
|
||||||
for i in range(8):
|
for i in range(8):
|
||||||
|
Loading…
Reference in New Issue
Block a user