Find the last word for your mnemonic with AnuBitux

Creating a mnemonic phrase is a very sensitive operation that can be done in a lot of different ways. No one of them can be considered absolutely better than the others, we can only try to find out which one fits our needs in the best way. We need to create it safely and store it in secure ways since it can be used to recover access to all the related private keys.

What is a mnemonic phrase made of?

A mnemonic phrase looks like a random sequence of words but it's not that easy. These words are taken from pre-established ordered wordlists, containing 2048 words. The last word of the list can't be a random one because it works as a checksum and helps us to verify that our phrase is correct.

Going deeper, our mnemonic seed represents our seed, which is made by a sequence of bits obtained joining our entropy with the checksum. Every word of the list represents an 11-bit sequence corresponding to the decimal value of the index of the word in the list. The last 11 bits, concerning to the last word of the mnemonic seed are made by the last part of the entropy and the checksum. So the last word needs to be chosen respecting the checksum obtained from our entropy.

How is the checksum calculated?

The checksum is obtained by taking a bit of the Sha256 hash of our entropy every 32 bits of entropy. So, for instance, with 128 bits of entropy we will have a 4 bits checksum (128/32=4). The first 121 bits of entropy (11*11=121) will always correspond to the same 11 words. The last word's index is made by the last seven bits of entropy and the checksum. So, as these 7 bits change, we will obtain a different checksum and a different last word for our mnemonic phrase.

We also discussed mnemonic phrases in this post

How to obtain the last word

Let's assume we obtained the first words of our mnemonic phrase in a way we consider secure and safe according to our needs. Now we need to obtain the last word to have a complete mnemonic phrase but we may not be able to calculate the Sha256 value of our entropy and convert it to bits. AnuBitux helps us with the lastword.py tool!

To use it in a safe way we are supposed to run it in a live session of AnuBitux disabling all the network features with the proper desktop shortcut!

To run it we can type

lastword.py

in our terminal window and follow the prompted questions.

Now we can select how many words we have in our mnemonic phrase and the language of the wordlist we used.

Now we can provide the first words we obtained with our secure method.

The tool is showing us the corresponding index of each word, so we can also check that we selected them correctly.

Now the tool will add some securely generated random bits to our entropy to reach the correct length. Then it will calculate the checksum and provide us our mnemonic phrase.

 

Final thoughts

Creating a mnemonic phrase has to be done very carefully since it is very hard to realize it has been compromised before we are losing all our coins.

This tool is just another solution to help users to create mnemonics in a secure and simple way. We do not have to forget that we also need to pay attention to the way we are storing it. Even in this case, there isn't a universal solution. If we need to access often our mnemonic to sign transactions it should be in a secure but accessible place or if we use it as a disaster recovery strategy, it can be stored in a very hard to reach place.

We should not look for the best strategy but we should seek the knowledge that will allow us to decide which strategy is the best for us.

This article was updated on 26 Oct 2023