Skip to content

Compress mnemonic by article words. #6

@artimonist

Description

@artimonist

Find BIP39 words from article.
All found words as x-axis, and BIP39 same language words as y-axis, it makes an words plane.

Example words plane by article: "Youth is not a time of life; it is a state of mind; ..."

... ... ... ...
you tilt library ...
young timber license ...
youth time life ...
zebra tiny lift ...
zero tip light ...
... ... ... ...

Use article first BIP39 word as original point, and article BIP39 words list as x-axis.
The first word coords is:

x-coord: from previous x-axis word (original point == 0) to current x-axis word.
y-coord: from current x-axis word to current word.

x-coord and y-coord can be positive number or negative number.

x-coord positive number mains from left to right.
y-coord positive number mains from top to bottom.

Example:
A words list of "life tiny library" coords can be: (2, 0) (-1, 1) (1, -2).

Because the next word coords location based on prev word coords, all coords can be minimum.

Obviously, one word can find multiple coords pair, but we as far as possible to find the minimum one.

Now, we have translated mnemonic words to coords.
Then we connect the coords into a byte array as entropy to create a new mnemonic.

For minimize storage, we don't store coords number directly.
Instead of, we store coord number as compressed bits of number.

The compressed bits of number aims to use minimum bits to contain all coords of mnemonic words.

Exampe:
If the max x-coord of words list is less than 16 (2^4), one coord can stored by 5 bits, 1 bit for sign and 4 bits for absolute value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions