From fd4e38d3077691832297a756bcca29c4e2a8ff42 Mon Sep 17 00:00:00 2001 From: Franz-Stefan Preiss Date: Mon, 25 Nov 2024 09:48:38 +0000 Subject: [PATCH 1/2] refactor(crypto): rename VetKdArgs::encryption_key to encryption_public_key --- rs/types/types/src/crypto/vetkd.rs | 7 +++++-- rs/types/types/src/crypto/vetkd/test.rs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rs/types/types/src/crypto/vetkd.rs b/rs/types/types/src/crypto/vetkd.rs index 2fc02ca774c..7d2f89b7956 100644 --- a/rs/types/types/src/crypto/vetkd.rs +++ b/rs/types/types/src/crypto/vetkd.rs @@ -17,7 +17,7 @@ pub struct VetKdArgs { #[serde(with = "serde_bytes")] pub derivation_id: Vec, #[serde(with = "serde_bytes")] - pub encryption_key: Vec, + pub encryption_public_key: Vec, } impl fmt::Debug for VetKdArgs { @@ -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() } } diff --git a/rs/types/types/src/crypto/vetkd/test.rs b/rs/types/types/src/crypto/vetkd/test.rs index a67a0d066c8..78982fea22a 100644 --- a/rs/types/types/src/crypto/vetkd/test.rs +++ b/rs/types/types/src/crypto/vetkd/test.rs @@ -24,7 +24,7 @@ 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) }, \ From 457a99d510a73d81c6cc2186a3feeeff37400fd1 Mon Sep 17 00:00:00 2001 From: Franz-Stefan Preiss Date: Mon, 25 Nov 2024 13:22:37 +0000 Subject: [PATCH 2/2] Fix test --- rs/types/types/src/crypto/vetkd/test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rs/types/types/src/crypto/vetkd/test.rs b/rs/types/types/src/crypto/vetkd/test.rs index 78982fea22a..47f9bc24a94 100644 --- a/rs/types/types/src/crypto/vetkd/test.rs +++ b/rs/types/types/src/crypto/vetkd/test.rs @@ -31,7 +31,7 @@ mod display_and_debug { derivation_path: ExtendedDerivationPath { caller: 7xzs3-rqraa-aaaaa-aaaap-2ai, \ derivation_path: { 6470 } }, \ derivation_id: 0x646964, \ - encryption_key: 0x656b \ + encryption_public_key: 0x656b \ }" .to_string();