From 2f2c8ea5f324c4550cb6884148515a6933c9d5ed Mon Sep 17 00:00:00 2001 From: ying tong Date: Thu, 20 Aug 2020 10:44:45 +0800 Subject: [PATCH] Rename PRV_DIVERSIFIER to PRF_TAG Co-authored-by: str4d --- src/zcash/prf.cpp | 10 +++++----- src/zcash/prf.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/zcash/prf.cpp b/src/zcash/prf.cpp index 99e9868e8..e575d562b 100644 --- a/src/zcash/prf.cpp +++ b/src/zcash/prf.cpp @@ -27,7 +27,7 @@ std::array PRF_expand(const uint256& sk, unsigned char t) uint256 PRF_rcm(const uint256& rseed) { uint256 rcm; - auto tmp = PRF_expand(rseed, PRF_RCM_DIVERSIFIER); + auto tmp = PRF_expand(rseed, PRF_RCM_TAG); librustzcash_to_scalar(tmp.data(), rcm.begin()); return rcm; } @@ -35,7 +35,7 @@ uint256 PRF_rcm(const uint256& rseed) uint256 PRF_esk(const uint256& rseed) { uint256 esk; - auto tmp = PRF_expand(rseed, PRF_ESK_DIVERSIFIER); + auto tmp = PRF_expand(rseed, PRF_ESK_TAG); librustzcash_to_scalar(tmp.data(), esk.begin()); return esk; } @@ -43,7 +43,7 @@ uint256 PRF_esk(const uint256& rseed) uint256 PRF_ask(const uint256& sk) { uint256 ask; - auto tmp = PRF_expand(sk, PRF_ASK_DIVERSIFIER); + auto tmp = PRF_expand(sk, PRF_ASK_TAG); librustzcash_to_scalar(tmp.data(), ask.begin()); return ask; } @@ -51,7 +51,7 @@ uint256 PRF_ask(const uint256& sk) uint256 PRF_nsk(const uint256& sk) { uint256 nsk; - auto tmp = PRF_expand(sk, PRF_NSK_DIVERSIFIER); + auto tmp = PRF_expand(sk, PRF_NSK_TAG); librustzcash_to_scalar(tmp.data(), nsk.begin()); return nsk; } @@ -59,7 +59,7 @@ uint256 PRF_nsk(const uint256& sk) uint256 PRF_ovk(const uint256& sk) { uint256 ovk; - auto tmp = PRF_expand(sk, PRF_OVK_DIVERSIFIER); + auto tmp = PRF_expand(sk, PRF_OVK_TAG); memcpy(ovk.begin(), tmp.data(), 32); return ovk; } diff --git a/src/zcash/prf.h b/src/zcash/prf.h index 5ab3ed1a3..654410a77 100644 --- a/src/zcash/prf.h +++ b/src/zcash/prf.h @@ -25,11 +25,11 @@ uint256 PRF_ovk(const uint256& sk); uint256 PRF_rcm(const uint256& rseed); uint256 PRF_esk(const uint256& rseed); -const char PRF_ASK_DIVERSIFIER = 0; -const char PRF_NSK_DIVERSIFIER = 1; -const char PRF_OVK_DIVERSIFIER = 2; -const char PRF_RCM_DIVERSIFIER = 4; -const char PRF_ESK_DIVERSIFIER = 5; +const char PRF_ASK_TAG = 0; +const char PRF_NSK_TAG = 1; +const char PRF_OVK_TAG = 2; +const char PRF_RCM_TAG = 4; +const char PRF_ESK_TAG = 5; std::array default_diversifier(const uint256& sk);