diff --git a/doc/developer/blue-app-commands.pdf b/doc/developer/blue-app-commands.pdf index 72a9b60..37d5471 100644 Binary files a/doc/developer/blue-app-commands.pdf and b/doc/developer/blue-app-commands.pdf differ diff --git a/doc/developer/blue-app-commands.rst b/doc/developer/blue-app-commands.rst index ee6fd81..db46f4a 100644 --- a/doc/developer/blue-app-commands.rst +++ b/doc/developer/blue-app-commands.rst @@ -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}` diff --git a/src/monero_api.h b/src/monero_api.h index 0ce728d..89c746d 100644 --- a/src/monero_api.h +++ b/src/monero_api.h @@ -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); diff --git a/src/monero_crypto.c b/src/monero_crypto.c index df01036..d6fe718 100644 --- a/src/monero_crypto.c +++ b/src/monero_crypto.c @@ -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; @@ -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]; } /* ======================================================================= */