Generate BIP39 Mnemonic

Make a suggestion Improve this page

The Key Generation Protocol will securely generate a BIP39 Mnemonic that will be used to store all your assets.

Through the BIP39 standard we will create 24 words (a mnemonic) which will then be used to derive private keys across protocols. Each signatory will only need to secure their 24-word phrase in order to be able to access funds .

By the end of this section, each signatory will generate the following information:

  • A BIP39 Mnemonic: Also called a seed phrase, this is a 24-word combination that will later be used to unlock your funds across BTC, BCH, LTC, XRP & ETH. Each seed phrase should be created in a different device by a different signatory. In your M-of-N policy there should be N signatories each with 1 seed phrase. These phrases should always be separated and signatories should never see each other’s seed phrases.
  • A Master public key for Bitcoin: An alphanumeric string to allow Electrum to generate the public keys for the BTC cold HD wallet
  • A Master public key for Litecoin: An alphanumeric string to allow Electrum-LTC to generate the public keys for the LTC cold HD wallet
  • A Master public key for Bitcoin Cash: An alphanumeric string to allow Electron-Cash to generate the public keys for the BCH cold HD wallet
  • An XRP address: Address to give ownership of an XRP multisign account
  • An ETH address: Address to give ownership of an ETH multisig contract

Only quarantined hardware should be used during the execution of the Key Generation Protocol.

Signatories should not be in close proximity of each other when executing the Key Generation Protocol. Signatory should always use distinct quarantined computers and should never ever share seed phrases.

  1. If this is not your first time working with CryptoGlacier:
    1. Use a networked computer to access the latest full release of CryptoGlacier ( not just the protocol document) at https://github.com/vogelito/CryptoGlacierProtocol/releases.
    2. Open the protocol document (CryptoGlacier.pdf) within the ZIP file.
    3. Check the Release Notes (Appendix E) of the protocol document to see if there are any new versions of CryptoGlacier recommended.
    4. Whether or not you decide to upgrade, review the errata for the version of CryptoGlacier you are using at https://github.com/vogelito/GlacierProtocol/releases.
  2. Execute Section VI of the Setup Protocol to prepare your quarantined workspace.
  3. Create entropy for private keys

    Creating an unguessable private key requires entropy – random data. We’ll combine two sources of entropy to generate our keys. This ensures securely random keys even if one entropy source is somehow flawed or compromised to be less-than-perfectly random.

    1. Generate dice entropy
      1. Type “DICE ENTROPY” into both Quarantined Scratchpads.
      2. Roll 62 six-sided dice, shaking the dice thoroughly each roll. 62 dice rolls corresponds to 160 bits of entropy. See the design document for details.
      3. If you are rolling multiple dice at the same time, read the dice left-to-right. This is important. Humans are horrible at generating random data and great at noticing patterns. Without a consistent heuristic like “read the dice left to right”, you may subconsciously read them in a non-random order (like tending to record lower numbers first). This can drastically undermine the randomness of the data, and could be exploited to guess your private keys.
      4. Manually enter the numbers into the Quarantined Scratchpad of ONLY ONE of the quarantined computers. Put all rolls on the same line to create one line of 62 numbers. (It’s fine to add spaces for readability.)
    2. Generate BIP39 seed phrase
      1. Make sure you are in the ~/cryptoglacier folder:
        $ cd ~/cryptoglacier
        
      2. On the Q1 computer enter the following command to generate your BIP39 seed phrase
        $ node setup.js --init
        
      3. The script will prompt you to enter the 62-number line of dice entropy
      4. The script will output your cold storage data:
        • Dice entropy
        • Generated Computer entropy
        • Final entropy
        • BIP39 Mnemonic
        • Bitcoin Master Public Key
        • Litecoin Master Public Key
        • Bitcoin Cash Master Public Key
        • Ethereum Address
        • Ethereum Private Key
        • Ripple Address
        • Ripple Private Key

        Example output:

        Dice entropy:                         1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 11
        Generated Computer entropy:           aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa
        Final entropy:                        ae29155ab1b3f5a1fc0c7cee883cd39457d273b9eb5eb6ac16a309bc7dd4d293
        BIP39 Mnemonic:                       purchase emerge find gloom dismiss special usual moon update draft crunch chunk large degree tray hint repeat gaze potato beach sick tuna engage hand
        Bitcoin Master Public Key (Zpub):     Zpub75EpZYVWcoTQ1WChsnabzLUAm91t379iNBPM647HvyuXg2Pn9DtkyVkLWicg4CJzbLKYcSzYV6B1yLTUbjq5LMqkhrzRDW7ebTEaUvxHhUL
        Litecoin Master Public Key (Zpub):    Zpub75CcoXN1LVH6qE3MNYAAbd8f6c3pgJC8aT1L8crzZTifZQcjrJcJxRxL1o4UxLMHGg4YvBjDN8hHQaHrKsxsSwwApiX7b7goVDRQrpLLmB9
        BitcoinCash Master Public Key (xpub): xpub6BjfaUaRAzkDfaYWKGNDxewXDUpgkJdPTB7jo4hcDfFG5QwX6JqJEEKg1at6FkwMVsFYPKf3KyKBSiK7i3gXdYaBNc8m2TEHNARwfWasdcX
        Ethereum Address:                     0x6bff50edf67a2eae30e9eef7007b31292405ab2d
        Ethereum Private Key:                 0xB31B0A016562839D6D6D137489924C56566312DD0167B197295DFF89D89C1C48
        Ripple Address:                       rHzjZTF4nD1ta2oPz7EYvYKXx26n8ZKFUv
        Ripple private key:                   F477BA0925608BCBBF870078E17030DB132CBD7D3286B305A60312B9FB9D9729
      5. Type “COMPUTER ENTROPY” into both computers’ Quarantined Scratchpads. (This is a descriptive heading to keep your notes organized and minimize risk of error.)
      6. Copy-paste the Generated Computer entropy into the Quarantined Scratchpad.
      7. Manually enter the Generated Computer entropy into the Quarantined Scratchpad on the other quarantined computer.
    3. Verify the integrity of the cold storage data

      If there are discrepancies in any of the verification steps, please restart the protocol. If discrepancies continue, please DO NOT PROCEED and seek assistance.

      1. On the Q2 computer enter the following command:
        $ node setup.js --check
        
        1. The script will prompt you to enter the 62-number dice entropy and the Generated computer entropy.
        2. Verify that the BIP39 Mnemonic shown in the terminal window is identical on both computers.

          Make sure you carefully verify every word.

          There are attack vectors which could replace just a portion of BIP39 seed phrase, making the private keys easier to brute force, so it’s important to check them thoroughly.

      2. On the Q2 computer enter the following command:
        $ python mnemonic_entropy.py entropy --integrity
        
        1. The script will prompt you to enter the 62-number dice entropy and the Generated computer entropy.

          Example output of the python script:

          Generated Entropy (copy this string into bip39-standalone.html): ae29155ab1b3f5a1fc0c7cee883cd39457d273b9eb5eb6ac16a309bc7dd4d293
        2. Verify that the Generated Entropy string shown in the terminal window is identical to the Final entropy string shown in the node script terminal output of the Q1 Computer.

      3. On the Q2 computer open bip39-standalone.html
        $ firefox ~/apps/bip39-standalone.html
        
        1. Check the Show entropy details checkbox
        2. Copy the Generated Entropy output of the python script into the Entropy box in Firefox and verify that the BIP39 seed matches that of the node script terminal output of the Q1 Computer.

          Example output in the BIP39 Mnemonic section in Firefox:

          purchase emerge find gloom dismiss special usual moon update draft crunch chunk large degree tray hint repeat gaze potato beach sick tuna engage hand

          Verify every word of the BIP39 Mnemonic so it matches the output of the scripts on both computers.

        3. In the Coin dropdown menu in Firefox, select ETH - Ethereum
          1. Verify that the derived Ethereum address for the m/44'/60'/0'/0/0 Path matches the Ethereum address output of the script on the Q1 computer. (Case insensitive)
          2. Verify that the derived Ethereum Private Key for the m/44'/60'/0'/0/0 Path matches the Ethereum Private Key output of the script on the Q1 computer. (Case insensitive)

            For the Ethereum private key, verify each character. Again, there are attack vectors which could replace just a portion of private keys, making the private keys easier to brute force so it’s important to check them thoroughly. For Ethereum, both the private key and the address ARE NOT case sensitive.

        4. In the Coin dropdown menu in Firefox, select XRP - Ripple
          1. Verify that the derived Ripple address for the m/44'/144'/0'/0/0 Path matches the Ripple address output of the script on the Q1 computer.
          2. Verify that the derived Ripple Private Key for the m/44'/144'/0'/0/0 Path matches the Ripple Private Key output of the script on the Q1 computer.

            For the Ripple private key, verify each character. Again, there are attack vectors which could replace just a portion of private keys, making the private keys easier to brute force so it’s important to check them thoroughly.

      4. On the Q2 computer open Electrum
        $ ~/apps/electrum-3.3.6-x86_64.AppImage
        
        1. Leave default_wallet and click Next.
        2. Select Multi-signature wallet and click Next.
        3. Select your M-of-N policy. The top bar, cosigners is the N and the lower bar, Required signatures is the M. Click Next.
        4. Select I already have a seed and click Next.
        5. Click on Options, select BIP39 seed and click OK.
        6. Enter your BIP39 seed phrase and click Next.
        7. Leave native segwit multisig (p2wsh) selected and click Next.
        8. Verify that the Master Public Key is the same as the output of the script on the Q1 computer.

          Again, please make sure you verify each character.

        9. Close the window (click on the top left x)
      5. On the Q2 computer open Electrum-LTC
        $ ~/apps/electrum-ltc-3.3.6.1-x86_64.AppImage
        
        1. Leave default_wallet and click Next.
        2. Select Multi-signature wallet and click Next.
        3. Select your M-of-N policy. The top bar, cosigners is the N and the lower bar, Required signatures is the M. Click Next.
        4. Select I already have a seed and click Next.
        5. Click on Options, select BIP39 seed and click OK.
        6. Enter your BIP39 seed phrase and click Next.
        7. Leave native segwit multisig (p2wsh) selected and click Next.
        8. Verify that the Master Public Key is the same as the output of the script on the Q1 computer.

          Again, please make sure you verify each character.

        9. Close the window (click on the top left x)
      6. On the Q2 computer open Electron-Cash
        $ ~/apps/Electron-Cash-4.2.3-x86_64.AppImage
        
        1. Leave default_wallet and click Next.
        2. Select Multi-signature wallet and click Next.
        3. Select your M-of-N policy. The top bar, cosigners is the N and the lower bar, Required signatures is the M. Click Next.
        4. Select I already have a seed and click Next.
        5. Click on Options, select BIP39 seed and click OK.
        6. Enter your BIP39 seed phrase and click Next.
        7. Leave the default m/44'/145'/0' derivation path selected and click Next.
        8. Verify that the Master Public Key is the same as the output of the script on the Q1 computer.

          Again, please make sure you verify each character.

        9. Close the window (click on the top left x)
      7. On the Q2 computer open multisigweb
        $ multisigweb
        
        1. Agree to the Terms of Use and Privacy Policy
        2. Select Light Wallet
        3. Go to the Accounts tab and click Import
        4. Click Browse... and go to Home -> cryptoglacier
        5. Select the ethereum.json file and click Open
        6. In the password field enter cryptoglacier
        7. In the account name field enter anything you’d like, such as coolest signatory
        8. Click Import Account
        9. Verify that the Ethereum Address is the same as the output of the script on the Q1 computer.

          Again, please make sure you verify each character.

        10. Close the window (click on the top left x)