Add implementations of PRF_expand calls that obtain esk and rcm.
This commit is contained in:
parent
552482a404
commit
6581970d59
|
@ -24,6 +24,22 @@ std::array<unsigned char, 64> 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;
|
||||
|
|
|
@ -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<unsigned char, 11> default_diversifier(const uint256& sk);
|
||||
|
||||
|
|
Loading…
Reference in New Issue