diff --git a/key_protocol/src/key_management/key_tree/keys_private.rs b/key_protocol/src/key_management/key_tree/keys_private.rs index beaa2e4..c72184b 100644 --- a/key_protocol/src/key_management/key_tree/keys_private.rs +++ b/key_protocol/src/key_management/key_tree/keys_private.rs @@ -10,8 +10,6 @@ use crate::key_management::{ secret_holders::{PrivateKeyHolder, SecretSpendingKey}, }; -const TWO_POWER_31: u32 = (2u32).pow(31); - #[derive(Debug, Serialize, Deserialize, Clone)] pub struct ChildKeysPrivate { pub value: (KeyChain, nssa::Account), @@ -20,21 +18,6 @@ pub struct ChildKeysPrivate { pub cci: Option, } -impl ChildKeysPrivate { - fn nth_child_nonharden_hash(&self, cci: u32) -> [u8; 64] { - /// TODO: logic required - panic!("Nonharden keys not yet designed for private state") - } - - fn nth_child_harden_hash(&self, cci: u32) -> [u8; 64] { - let mut hash_input = vec![]; - // hash_input.extend_from_slice(self.csk.value()); - //hash_input.extend_from_slice(&(cci - TWO_POWER_31).to_le_bytes()); - - hmac_sha512::HMAC::mac(hash_input, self.ccc) - } -} - impl KeyNode for ChildKeysPrivate { fn root(seed: [u8; 64]) -> Self { let hash_value = hmac_sha512::HMAC::mac(seed, b"NSSA_master_priv"); @@ -127,7 +110,6 @@ impl KeyNode for ChildKeysPrivate { let isk = ssk.generate_child_incoming_viewing_secret_key(cci); let ovk = ssk.generate_child_outgoing_viewing_secret_key(cci); - //TODO: separate out into its own function let npk: NullifierPublicKey = { let mut hasher = sha2::Sha256::new();