Lectures Publications Theses Events

BIP 39

BIP stands for Bitcoin Improvment Proposal and defines several standards and key features. BIP 39 is the proposal 39, which defines a mnemonic code for generating deterministic keys. Thus, it can be used as a seed for your keys, or represent a private key.


Exercise 1

Read and understand BIP 39.


A mnemonic code is created from a word list with 2048 words. We'll use the following word list: https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt.


Exercise 2

You have the following random number: 94b8c423610d2ce4adb08ca74bae438e and you want to create a mnemonic according to BIP 39.


The SHA256 hash of 94b8c423610d2ce4adb08ca74bae438e is b1de5c24b373385e95c8dc42fea83d5adb13ab1c3f6f4e214bb596e3a7c53c0a. The first n bits of this hash will be used as a checksum. Append these bits to your random number.


Exercise 3

Your number looks as follows: 94b8c423610d2ce4adb08ca74bae438eX, where X is your answer from Q2.


Take a look at the BIP 39 implementation at https://github.com/tbocek/VSS-BIP39. Some crucial parts are missing, marked with **.


Exercise 4


Once we have the words we can calculate the BIP 39 seed according to the specification. For the BIP 39 seed, PBKDF2 (Password-Based Key Derivation Function 2) is used. The password is the space separated word list, the salt is "mnemonic", number of iterations is 2048, and key length is 64 bytes as the hash is SHA512.


Exercise 5