i don't see anyone mentioning this but it doesn't work the other way around! meaning you can not create a seed from a private key. instead you create a seed then get different private keys from that seed. it is an Hierarchy after all.
It was actually mentioned in the very first reply (2nd post)
It is not possible to generate seed out of private key, because private keys are generate from the seed.
However, theoretically, you CAN actually generate a seed from a private key as, in their simplistic form, both are simply large numbers... so there is no reason you couldn't use a private key to make a seed. It just probably isn't advised
Long geeky example of converting a 32 byte hex to a mnemonic string:Private Key (WIF): Kx45GeUBSMPReYQwgXiKhG9FzNXrnCeutJp4yjTd5kKxCitadm3C
Private Key (HEX): 18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206321725
The HEX = 32 bytes = 256 bits (max allowed ENT for BIP39 as per
the spec), so we can just use the HEX as as our ENT.
We also need to calculate the checksum as the first ENT/32 bits of the SHA-256 of the ENT.
SHA-256(ENT): 547E964D2262DFCF5C03DA93F54AC0FE66B2856240F8A70AB0C582DE5860D062 => first 8 bits = first byte => "54" => 0101 0100
ENT + CS = 0001 1000 1110 0001 0100 1010 0111 1011 0110 1010 0011 0000 0111 1111 0100 0010 0110 1010 1001 0100 1111 1000 0001 0001 0100 0111 0000 0001 1110 0111 1100 1000 1110 0111 0111 0100 1110 0111 1111 1001 1010 0100 0111 1110 0010 1100 0010 0000 0011 0101 1101 1011 0010 1001 1010 0010 0000 0110 0011 0010 0001 0111 0010 0101 0101 0100
As per the BIP39 spec, we slice it up into 11 bit chunks and convert to words from
the BIP39 wordlistword 1 : 00011000111 -> 199 -> body
word 2 : 00001010010 -> 82 -> apart
word 3 : 10011110110 -> 1270 -> paddle
word 4 : 11010100011 -> 1699 -> stamp
word 5 : 00000111111 -> 63 -> among
word 6 : 10100001001 -> 1289 -> patrol
word 7 : 10101010010 -> 1362 -> prevent
word 8 : 10011111000 -> 1272 -> pair
word 9 : 00010001010 -> 138 -> bacon
word 10: 00111000000 -> 448 -> day
word 11: 01111001111 -> 975 -> ketchup
word 12: 10010001110 -> 1166 -> mushroom
word 13: 01110111010 -> 954 -> jar
word 14: 01110011111 -> 927 -> initial
word 15: 11100110100 -> 1844 -> track
word 16: 10001111110 -> 1150 -> more
word 17: 00101100001 -> 353 -> club
word 18: 00000001101 -> 13 -> accuse
word 19: 01110110110 -> 950 -> item
word 20: 01010011010 -> 666 -> fashion
word 21: 00100000011 -> 259 -> call
word 22: 00011001000 -> 200 -> boil
word 23: 01011100100 -> 740 -> frame
word 24: 10101010100 -> 1364 -> pride
Seed Mnemonic: body apart paddle stamp among patrol prevent pair bacon day ketchup mushroom jar initial track more club accuse item fashion call boil frame pride