1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00

Merge pull request #426 from ph4r05/pr/xmr-payment-id-fix

xmr: payment ID computation fix
This commit is contained in:
Tomas Susanka 2018-11-28 09:37:47 +01:00 committed by GitHub
commit 47790634ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = bytearray(33)
derivation = crypto.encodepoint_into(derivation, derivation_p)
derivation[32] = 0x8B
derivation[32] = 0x8D # ENCRYPTED_PAYMENT_ID_TAIL
hash = crypto.cn_fast_hash(derivation)
pm_copy = bytearray(payment_id)
for i in range(8):