Skip to content

Commit

Permalink
Merge pull request #114 from LedgerHQ/pr110-review
Browse files Browse the repository at this point in the history
Review PR #110
  • Loading branch information
jibeee authored Aug 10, 2022
2 parents c89985a + 183a145 commit 1d96de2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Binary file modified doc/developer/blue-app-commands.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions doc/developer/blue-app-commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@
.. |eDRVout| replace:: :math:`\widetilde{\mathfrak{D}_\mathrm{out}}`
.. |AKout| replace:: :math:`\mathcal{AK}_\mathrm{amount}`
.. |eAKout| replace:: :math:`\widetilde{\mathcal{AK}_\mathrm{amount}}`
.. |vtf| replace:: :math:`\mathit{view_tag_full}`
.. |vt| replace:: :math:`\mathit{view_tag}`
.. |vtf| replace:: :math:`\mathit{view\_tag\_full}`
.. |vt| replace:: :math:`\mathit{view\_tag}`


.. |ctH| replace:: :math:`\mathcal{H}_\mathrm{commitment}`
Expand Down
3 changes: 2 additions & 1 deletion src/monero_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ void monero_derive_public_key(unsigned char *x, unsigned char *drv_data, unsigne
unsigned char *ec_pub);
void monero_secret_key_to_public_key(unsigned char *ec_pub, unsigned char *ec_priv);
void monero_generate_key_image(unsigned char *img, unsigned char *P, unsigned char *x);
void monero_derive_view_tag(unsigned char *view_tag, unsigned char *drv_data, unsigned int out_idx);
void monero_derive_view_tag(unsigned char *view_tag, const unsigned char drv_data[static 32],
unsigned int out_idx);

void monero_derive_subaddress_public_key(unsigned char *x, unsigned char *pub,
unsigned char *drv_data, unsigned int index);
Expand Down
4 changes: 2 additions & 2 deletions src/monero_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ void monero_generate_key_image(unsigned char *img, unsigned char *P, unsigned ch
/* ----------------------------------------------------------------------- */
/* --- --- */
/* ----------------------------------------------------------------------- */
void monero_derive_view_tag(unsigned char *view_tag, unsigned char *drv_data,
void monero_derive_view_tag(unsigned char *view_tag, const unsigned char drv_data[static 32],
unsigned int out_idx) {
unsigned char varint[8 + 32 + 8];
unsigned int len_varint;
Expand All @@ -532,7 +532,7 @@ void monero_derive_view_tag(unsigned char *view_tag, unsigned char *drv_data,
len_varint = monero_encode_varint(varint + 8 + 32, 8, out_idx);
len_varint += 8 + 32;
monero_keccak_F(varint, len_varint, varint);
os_memmove(view_tag, varint, 1);
*view_tag = varint[0];
}

/* ======================================================================= */
Expand Down

0 comments on commit 1d96de2

Please sign in to comment.