diff --git a/src/zcash/prf.cpp b/src/zcash/prf.cpp index 2491de83e..1aa8142d8 100644 --- a/src/zcash/prf.cpp +++ b/src/zcash/prf.cpp @@ -24,6 +24,22 @@ std::array PRF_expand(const uint256& sk, unsigned char t) return res; } +uint256 PRF_rcm(const uint256& rseed) +{ + uint256 rcm; + auto tmp = PRF_expand(rseed, 4); + librustzcash_to_scalar(tmp.data(), rcm.begin()); + return rcm; +} + +uint256 PRF_esk(const uint256& rseed) +{ + uint256 esk; + auto tmp = PRF_expand(rseed, 5); + librustzcash_to_scalar(tmp.data(), esk.begin()); + return esk; +} + uint256 PRF_ask(const uint256& sk) { uint256 ask; diff --git a/src/zcash/prf.h b/src/zcash/prf.h index f666cfa23..b9256769a 100644 --- a/src/zcash/prf.h +++ b/src/zcash/prf.h @@ -22,6 +22,8 @@ uint256 PRF_rho(const uint252& phi, size_t i0, const uint256& h_sig); uint256 PRF_ask(const uint256& sk); uint256 PRF_nsk(const uint256& sk); uint256 PRF_ovk(const uint256& sk); +uint256 PRF_rcm(const uint256& rseed); +uint256 PRF_esk(const uint256& rseed); std::array default_diversifier(const uint256& sk);