To complement the answer above, the Bitcoin chainparams.cpp file contains the following information to assist in achieving BIP 32 compliance:
Mainnet:
base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();
base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();
Testnet:
base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();
base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();
The bitcoin-explorer (bx) command is used below, with the 3rd worst possible brain wallet seed in the world. Additionally, bx was compiled for using testnet not mainnet. Hence, focus on where 04358394 for tprv and 043587cf for tpub that appears in the examples below.
% echo '0' | bx base16-encode | bx sha512 | bx hd-new
tprv8ZgxMBicQKsPdcvudXaExR6Wdz5VgdjGeZHsw5bjnypoxrCxnYsyVq2v9cPTzDsnyLAL1v4Z2tM3Rp2AA6vv9WDbNBtui5QEZTWYucefZox
% echo '0' | bx base16-encode | bx sha512 | bx hd-new | bx base58check-decode
wrapper
{
checksum 3287061687
payload 3583940000000000000000004b0dc73821a026c0c71d07a7655968352b52d7e5896dd3907df121f914f9743900a6b53d2f0e384dc6ced2caeb36f0c9cc6f3ab0677f73c31aca87b62bbcc9fe78
version 4
}
% echo '0' | bx base16-encode | bx sha512 | bx hd-new | bx base58-decode
04358394
0000000000000000004b0dc73821a026c0c71d07a7655968352b52d7e5896dd3907df121f914f9743900a6b53d2f0e384dc6ced2caeb36f0c9cc6f3ab0677f73c31aca87b62bbcc9fe78b794ecc3
% echo '0' | bx base16-encode | bx sha512 | bx hd-new | bx hd-public
tpubD9nYDjxx7QwpsEhUiS7MDJ68p25nu9yxEt1AofKmEjmL3kozwA3z8G4Cm556YCYYJwfnix2GLVTtCHZq79R8UsRZBJVRPtD9HKNQBzDZVo4
% echo '0' | bx base16-encode | bx sha512 | bx hd-new | bx hd-public | bx base58-decode
043587cf
01cf633b1c00000000c023d310564ead16b50e678b2ff20e2d0a0f210fcf9c603ebd16f17d0510663802605d719a28b2707dcc9d7a2b804ba70242330e7010161aec4f86a0771d9909e504b705bf