Author

Topic: Get master key from 128bit (Read 123 times)

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
November 20, 2021, 09:10:26 PM
#9
what I need to fix in these two lines, to get the master key (deterministicKey) if I do not have string bip-39 at the entrance
 i have only 128 bit number -snip-
I don't need to receive Seed. I need to get a master key (deterministicKey) from a 128-bit number
There's no shortcut to this since the entropy (128 bit number) needs to be a 'UTF-8 normalized' mnemonic before you can get the 'binary seed'.
You'll need to do the above to convert it into a mnemonic, then use the result to your code.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
November 20, 2021, 10:39:44 AM
#8
for example
"dumb merry course mouse salmon first six charge shoot slogan shiver rule"
So BIP-39 entrance is the seed phrase and seedCode is the variable that should contain the phrase, correct? So what you need is to convert your 128 bits to twelve words, right?

You should use MnemonicCode(). I haven't tried it, but it should be fairly easy. And that's true if I've understood properly what you want to achieve. If any of the above questions' conclusion is incorrect, let me know.
member
Activity: 96
Merit: 36
November 20, 2021, 10:23:12 AM
#7
yes

And what's the BIP-39 entrance string?
for example
"dumb merry course mouse salmon first six charge shoot slogan shiver rule"

legendary
Activity: 1512
Merit: 7340
Farewell, Leo
November 20, 2021, 10:17:34 AM
#6
yes

And what's the BIP-39 entrance string?
member
Activity: 96
Merit: 36
November 20, 2021, 10:09:12 AM
#5
Quote
So what you're asking is how to get the master private key from the 128-bit number (which is the string by the name seedCode)? Is that correct?
yes  Smiley
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
November 20, 2021, 09:53:31 AM
#4
Alright, so I just checked it. seedCode is supposed to be a string.

I don't need to receive Seed. I need to get a master key (deterministicKey) from a 128-bit number
So what you're asking is how to get the master private key from the 128-bit number (which is the string by the name seedCode)? Is that correct?

Because, here you say without the BIP-39 string at the entrance and I'm wondering on what you are referring:
what I need to fix in these two lines, to get the master key (deterministicKey) if I do not have string bip-39 at the entrance
member
Activity: 96
Merit: 36
November 20, 2021, 09:34:01 AM
#3
library bitcoinj

I don't need to receive Seed. I need to get a master key (deterministicKey) from a 128-bit number
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
November 20, 2021, 09:30:11 AM
#2
What's the library? If the seedCode requires a seed phrase, then you should convert your 128-bit binary represented number to twelve words. If the seedCode requires an entropy then you should probably convert your binary represented number to hexadecimal or decimal.

It depends on what's seedCode and which type of parameter is the first one from PBKDF2SHA512.derive().
member
Activity: 96
Merit: 36
November 20, 2021, 09:24:14 AM
#1
i write in Java

when i get master key from bip-39 string i do this

Quote
byte [] seed = PBKDF2SHA512.derive (seedCode, "mnemonic", 2048, 64);
DeterministicKey deterministicKey = HDKeyDerivation.createMasterPrivateKey (seed);
...
...
this works fine.

please tell me
what I need to fix in these two lines, to get the master key (deterministicKey) if I do not have string bip-39 at the entrance
 i have only 128 bit number like this
10101010101010101011000 ...... (128 characters)
Jump to: