Tidy impl From<SpendingKey> for IvkCommitRandomness
This commit is contained in:
parent
bd4e5e1f38
commit
01fed3e0f3
|
@ -410,7 +410,9 @@ impl From<SpendingKey> for IvkCommitRandomness {
|
||||||
///
|
///
|
||||||
/// https://zips.z.cash/protocol/protocol.pdf#orchardkeycomponents
|
/// https://zips.z.cash/protocol/protocol.pdf#orchardkeycomponents
|
||||||
fn from(sk: SpendingKey) -> Self {
|
fn from(sk: SpendingKey) -> Self {
|
||||||
Self(pallas::Scalar::from_bytes_wide(prf_expand(sk.into(), &[8])))
|
let scalar = pallas::Scalar::from_bytes_wide(&prf_expand(sk.into(), &[&[8]]));
|
||||||
|
|
||||||
|
Self(scalar)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,10 @@ impl Arbitrary for TransmissionKey {
|
||||||
(any::<SpendingKey>())
|
(any::<SpendingKey>())
|
||||||
.prop_map(|spending_key| {
|
.prop_map(|spending_key| {
|
||||||
let spend_authorizing_key = SpendAuthorizingKey::from(spending_key);
|
let spend_authorizing_key = SpendAuthorizingKey::from(spending_key);
|
||||||
let proof_authorizing_key = ProofAuthorizingKey::from(spending_key);
|
|
||||||
|
|
||||||
let authorizing_key = AuthorizingKey::from(spend_authorizing_key);
|
let spend_validating_key = SpendValidatingKey::from(spending_key);
|
||||||
let nullifier_deriving_key = NullifierDerivingKey::from(proof_authorizing_key);
|
let nullifier_deriving_key = NullifierDerivingKey::from(spending_key);
|
||||||
|
let ivk_commit_randomness = IvkCommitRandomness::from();
|
||||||
|
|
||||||
let incoming_viewing_key =
|
let incoming_viewing_key =
|
||||||
IncomingViewingKey::from((authorizing_key, nullifier_deriving_key));
|
IncomingViewingKey::from((authorizing_key, nullifier_deriving_key));
|
||||||
|
|
Loading…
Reference in New Issue