1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 11:28:14 +00:00

nem: IV is not copied

The IV copy was moved to trezor-crypto
(https://github.com/trezor/trezor-crypto/pull/140) so it is not needed
in trezor-mcu anymore
This commit is contained in:
Tomas Susanka 2018-04-04 11:21:37 +02:00 committed by Pavol Rusnak
parent 399706ae22
commit 7b1b9d3069

View File

@ -264,11 +264,8 @@ bool nem_fsmTransfer(nem_transaction_ctx *context, const HDNode *node, const NEM
random_buffer(encrypted, NEM_SALT_SIZE + AES_BLOCK_SIZE);
// hdnode_nem_encrypt mutates the IV
uint8_t iv[AES_BLOCK_SIZE];
memcpy(iv, &encrypted[NEM_SALT_SIZE], AES_BLOCK_SIZE);
const uint8_t *salt = encrypted;
const uint8_t *iv = &encrypted[NEM_SALT_SIZE];
uint8_t *buffer = &encrypted[NEM_SALT_SIZE + AES_BLOCK_SIZE];
bool ret = hdnode_nem_encrypt(node,