mirror of https://github.com/zcash/orchard.git
Dummy implementation of Domain methods for prepared ivk and epk.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
3faab98e9e
commit
2ff7ff4a54
|
@ -84,3 +84,7 @@ debug = true
|
||||||
|
|
||||||
[profile.bench]
|
[profile.bench]
|
||||||
debug = true
|
debug = true
|
||||||
|
|
||||||
|
[patch.crates-io]
|
||||||
|
zcash_note_encryption = { git = "https://github.com/daira/librustzcash.git", rev = "515b0a40ec06eb640fffa65b745166511bf56ecc" }
|
||||||
|
group = { git = "https://github.com/zkcrypto/group.git", rev = "a7f3ceb2373e9fe536996f7b4d55c797f3e667f0" }
|
||||||
|
|
|
@ -102,6 +102,7 @@ impl OrchardDomain {
|
||||||
impl Domain for OrchardDomain {
|
impl Domain for OrchardDomain {
|
||||||
type EphemeralSecretKey = EphemeralSecretKey;
|
type EphemeralSecretKey = EphemeralSecretKey;
|
||||||
type EphemeralPublicKey = EphemeralPublicKey;
|
type EphemeralPublicKey = EphemeralPublicKey;
|
||||||
|
type PreparedEphemeralPublicKey = EphemeralPublicKey;
|
||||||
type SharedSecret = SharedSecret;
|
type SharedSecret = SharedSecret;
|
||||||
type SymmetricKey = Hash;
|
type SymmetricKey = Hash;
|
||||||
type Note = Note;
|
type Note = Note;
|
||||||
|
@ -122,6 +123,10 @@ impl Domain for OrchardDomain {
|
||||||
*note.recipient().pk_d()
|
*note.recipient().pk_d()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn prepare_epk(epk: Self::EphemeralPublicKey) -> Self::PreparedEphemeralPublicKey {
|
||||||
|
epk
|
||||||
|
}
|
||||||
|
|
||||||
fn ka_derive_public(
|
fn ka_derive_public(
|
||||||
note: &Self::Note,
|
note: &Self::Note,
|
||||||
esk: &Self::EphemeralSecretKey,
|
esk: &Self::EphemeralSecretKey,
|
||||||
|
@ -138,7 +143,7 @@ impl Domain for OrchardDomain {
|
||||||
|
|
||||||
fn ka_agree_dec(
|
fn ka_agree_dec(
|
||||||
ivk: &Self::IncomingViewingKey,
|
ivk: &Self::IncomingViewingKey,
|
||||||
epk: &Self::EphemeralPublicKey,
|
epk: &Self::PreparedEphemeralPublicKey,
|
||||||
) -> Self::SharedSecret {
|
) -> Self::SharedSecret {
|
||||||
epk.agree(ivk)
|
epk.agree(ivk)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue