Skip to content

Commit

Permalink
Fix view tag derivation
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeutin-ledger committed Jul 19, 2022
1 parent a4964ae commit bf19f81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/monero_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ void monero_derive_view_tag(unsigned char *view_tag, unsigned char *drv_data,
unsigned char varint[8 + 32 + 8];
unsigned int len_varint;

os_memmove(varint, "view_tag", 8);
os_memmove(varint, "view_tag", 8); // leave off null terminator
os_memmove(varint + 8, drv_data, 32);
len_varint = monero_encode_varint(varint + 8 + 32, 8, out_idx);
len_varint += 8 + 32;
Expand Down
2 changes: 1 addition & 1 deletion src/monero_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ int monero_apdu_derive_view_tag(
unsigned char res[1];

// fetch
monero_io_fetch_decrypt(derivation, 32, TYPE_DERIVATION);
monero_io_fetch(derivation, 32);
output_index = monero_io_fetch_u32();
monero_io_discard(0);

Expand Down

0 comments on commit bf19f81

Please sign in to comment.