You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Used as initial key material, to be expanded into multiple secret keys (but not to be used
@@ -967,9 +967,7 @@ pub struct KeysManager {
967
967
channel_master_key:ExtendedPrivKey,
968
968
channel_child_index:AtomicUsize,
969
969
970
-
rand_bytes_master_key:ExtendedPrivKey,
971
-
rand_bytes_child_index:AtomicUsize,
972
-
rand_bytes_unique_start:Sha256State,
970
+
rand_bytes_index:AtomicUsize,
973
971
974
972
seed:[u8;32],
975
973
starting_time_secs:u64,
@@ -1015,7 +1013,6 @@ impl KeysManager {
1015
1013
Err(_) => panic!("Your RNG is busted"),
1016
1014
};
1017
1015
let channel_master_key = master_key.ckd_priv(&secp_ctx,ChildNumber::from_hardened_idx(3).unwrap()).expect("Your RNG is busted");
1018
-
let rand_bytes_master_key = master_key.ckd_priv(&secp_ctx,ChildNumber::from_hardened_idx(4).unwrap()).expect("Your RNG is busted");
1019
1016
let inbound_payment_key:SecretKey = master_key.ckd_priv(&secp_ctx,ChildNumber::from_hardened_idx(5).unwrap()).expect("Your RNG is busted").private_key;
let child_ix = self.rand_bytes_child_index.fetch_add(1,Ordering::AcqRel);
1242
-
let child_privkey = self.rand_bytes_master_key.ckd_priv(&self.secp_ctx,ChildNumber::from_hardened_idx(child_ix asu32).expect("key space exhausted")).expect("Your RNG is busted");
1243
-
sha.input(&child_privkey.private_key[..]);
1236
+
let nanos_plus_index = self.starting_time_nanosasu64 + index asu64;
1237
+
let nonce:[u8;16] = [self.starting_time_secs.to_be_bytes(), nanos_plus_index.to_be_bytes()]
0 commit comments