BIP39 (Deterministic Key Generation) - Seed to phraseBIP39 is a Deterministic Key Generation method and it is used to derive encryption keys for a known seed. This seed can be a series of human readable string of random words. |
Outline
BIP39 is a Deterministic Key Generation method and it is used to derive encryption keys for a known seed. This seed can be a series of human readable string of random words. In the BIP39 standard there are 2,048 words, and if each phrase has 12 worlds, then there are \(2048^{12}\) different permutation - giving \(2^{132}\) different bit values (or 132 bits) . The first fe
abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve
Code
The code is:
package main import ( "encoding/hex" "fmt" "github.com/tyler-smith/go-bip39" "os" ) func main() { ent:="00000000000000000000000000000000" argCount := len(os.Args[1:]) if (argCount>0) { ent= (os.Args[1])} entropy,_ := hex.DecodeString(ent) mnemonic, _ := bip39.NewMnemonic(entropy) fmt.Printf("Random %x\n\n12-word phrase %s\n\n",entropy,mnemonic) }
A sample run is:
Random: 00a84c51041d49acca66e6160c1fa999 12-word phrase: absent draw begin amused stand stool civil system bid genius tuna cram