--- Log opened Fri Mar 25 00:00:37 2022 00:27 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 00:28 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 01:22 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 01:23 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 01:32 -!- greypw2546 [~greypw254@grey.pw] has quit [Quit: Ping timeout (120 seconds)] 01:32 -!- greypw2546 [~greypw254@grey.pw] has joined #bitcoin-rust 01:33 -!- jrawsthorne [~jrawsthor@static.235.41.217.95.clients.your-server.de] has quit [Quit: ZNC 1.8.1 - https://znc.in] 01:33 -!- jrawsthorne [~jrawsthor@static.235.41.217.95.clients.your-server.de] has joined #bitcoin-rust 01:35 < RCasatta[m]> a master public key in bip32 sense is a public key and a chain code, so you can't use a public key alone as an ExtendedPubKey 01:40 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 01:40 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 01:56 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 01:57 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 03:13 -!- greypw2546 [~greypw254@grey.pw] has quit [Quit: I'll be back!] 03:13 -!- greypw2546 [~greypw254@grey.pw] has joined #bitcoin-rust 03:25 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 05:56 -!- geyaeb [~geyaeb@gateway/tor-sasl/geyaeb] has quit [Remote host closed the connection] 05:57 -!- geyaeb [~geyaeb@gateway/tor-sasl/geyaeb] has joined #bitcoin-rust 08:06 < ls55> BIP 32 mentions "In order to prevent these from depending solely on the key itself, we extend both private and public keys first with an extra 256 bits of entropy. This extension, called the chain code, is identical for corresponding private and public keys, and consists of 32 bytes.” (https://bips.xyz/32#extended-keys). 08:06 < ls55> 
If I understand this text correctly, both the master private and the master public keys use themself as the chain code. You can verify this logic in `bitcoin::util::bip32::ExtendedPrivKey pub fn new_master`: 08:06 < ls55> ``` 08:06 < ls55> impl ExtendedPrivKey { 08:06 < ls55> pub fn new_master(network: Network, seed: &[u8]) -> Result { 08:06 < ls55> let mut hmac_engine: HmacEngine = HmacEngine::new(b"Bitcoin seed"); 08:06 < ls55> hmac_engine.input(seed); 08:06 < ls55> let hmac_result: Hmac = Hmac::from_engine(hmac_engine); 08:06 < ls55> Ok(ExtendedPrivKey { 08:06 < ls55> // … 08:06 < ls55> chain_code: ChainCode::from(&hmac_result[32..]), 08:06 < ls55> }) 08:06 < ls55> } 08:06 < ls55> ``` 08:06 < ls55> According to the text above, apparently the same can be done for the `bitcoin::util::bip32 pub struct ExtendedPubKey`. 08:06 < ls55> Could the `new_master()` function be adapted to `ExtendedPubKey` ? 08:29 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 09:27 -!- valwal2 [~valwal@pool-96-232-179-212.nycmny.fios.verizon.net] has joined #bitcoin-rust 09:29 -!- valwal [~valwal@pool-96-232-179-212.nycmny.fios.verizon.net] has quit [Ping timeout: 256 seconds] 09:29 -!- valwal2 is now known as valwal 11:38 -!- filename [~kilitary@static.246.201.46.78.clients.your-server.de] has joined #bitcoin-rust 12:11 -!- filename [~kilitary@static.246.201.46.78.clients.your-server.de] has quit [Ping timeout: 240 seconds] 15:13 -!- filename [~kilitary@188.242.105.134] has joined #bitcoin-rust 16:02 -!- shesek_ [~shesek@user/shesek] has quit [Remote host closed the connection] 16:03 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 16:28 -!- filename [~kilitary@188.242.105.134] has quit [Remote host closed the connection] 16:58 -!- shesek_ is now known as shesek 17:50 -!- filename [~kilitary@188.242.105.134] has joined #bitcoin-rust 18:00 -!- filename [~kilitary@188.242.105.134] has quit [Remote host closed the connection] 19:15 -!- filename [~kilitary@188.242.105.134] has joined #bitcoin-rust 19:20 -!- shesek_ [~shesek@user/shesek] has joined #bitcoin-rust 19:21 -!- shesek [~shesek@user/shesek] has quit [Remote host closed the connection] 20:13 -!- filename [~kilitary@188.242.105.134] has quit [Quit: joined libera] 20:16 -!- filename [~kilitary@static.246.201.46.78.clients.your-server.de] has joined #bitcoin-rust 20:40 -!- filename [~kilitary@static.246.201.46.78.clients.your-server.de] has quit [Ping timeout: 260 seconds] 20:44 -!- filename [~kilitary@188.242.105.134] has joined #bitcoin-rust 21:01 -!- greypw2546 [~greypw254@grey.pw] has quit [Remote host closed the connection] 21:01 -!- greypw2546 [~greypw254@grey.pw] has joined #bitcoin-rust 21:02 -!- greypw2546 [~greypw254@grey.pw] has quit [Remote host closed the connection] 21:02 -!- greypw2546 [~greypw254@grey.pw] has joined #bitcoin-rust 21:03 -!- greypw2546 [~greypw254@grey.pw] has quit [Remote host closed the connection] 21:03 -!- greypw2546 [~greypw254@grey.pw] has joined #bitcoin-rust 21:04 -!- greypw2546 [~greypw254@grey.pw] has quit [Remote host closed the connection] 21:04 -!- greypw2546 [~greypw254@grey.pw] has joined #bitcoin-rust 21:05 -!- greypw2546 [~greypw254@grey.pw] has quit [Remote host closed the connection] 22:44 -!- filename [~kilitary@188.242.105.134] has quit [Remote host closed the connection] 23:29 -!- dunxen [~dunxen@gateway/tor-sasl/dunxen] has quit [Ping timeout: 240 seconds] --- Log closed Sat Mar 26 00:00:39 2022