Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(crypto): CRP-2596 rename VetKdArgs::encryption_key to encryption_public_key #2789

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions rs/types/types/src/crypto/vetkd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct VetKdArgs {
#[serde(with = "serde_bytes")]
pub derivation_id: Vec<u8>,
#[serde(with = "serde_bytes")]
pub encryption_key: Vec<u8>,
pub encryption_public_key: Vec<u8>,
}

impl fmt::Debug for VetKdArgs {
Expand All @@ -26,7 +26,10 @@ impl fmt::Debug for VetKdArgs {
.field("ni_dkg_id", &self.ni_dkg_id)
.field("derivation_path", &self.derivation_path)
.field("derivation_id", &HexEncoding::from(&self.derivation_id))
.field("encryption_key", &HexEncoding::from(&self.encryption_key))
.field(
"encryption_public_key",
&HexEncoding::from(&self.encryption_public_key),
)
.finish()
}
}
Expand Down
4 changes: 2 additions & 2 deletions rs/types/types/src/crypto/vetkd/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ mod display_and_debug {
derivation_path: vec![b"dp".to_vec()],
},
derivation_id: b"did".to_vec(),
encryption_key: b"ek".to_vec(),
encryption_public_key: b"ek".to_vec(),
};
let output = "VetKdArgs { \
ni_dkg_id: NiDkgId { start_block_height: 7, dealer_subnet: ot5wk-sbkaa-aaaaa-aaaap-yai, dkg_tag: HighThreshold, target_subnet: Remote(0x2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a2a) }, \
derivation_path: ExtendedDerivationPath { caller: 7xzs3-rqraa-aaaaa-aaaap-2ai, \
derivation_path: { 6470 } }, \
derivation_id: 0x646964, \
encryption_key: 0x656b \
encryption_public_key: 0x656b \
}"
.to_string();

Expand Down