word-list-cli tool for encoding/decoding binary data to different mnemonic word lists - BIP39, PGP
1.0K
Small docker image with word-list-cli tool.
word-list-cli is utility for encoding and decoding binary data to different mnemonic word lists. BIP39 and PGP algorithms are supported.
Mnemonic code or mnemonic sentences are a group of easy to remember words. A mnemonic code or sentence is superior for human interaction compared to the handling of raw binary or hexadecimal representations of data. The sentence could be written on paper or spoken over the telephone.
Although this utility supports encoding data of any length, it is rather practical for storing a small amount of data. For example to encode passwords, passphrases or cryptographic keys and print then on paper.
word-list-cli can be found at https://github.com/dhlavaty/word-list
# for word-list-cli tool help
$ docker run --rm -i dhlavaty/word-list-cli:latest word-list-cli
simple string to BIP39 encoding
$ echo -n '123456789' | docker run --rm -i dhlavaty/word-list-cli:latest word-list-cli bip39
-----BEGIN BIP39-----
couple muscle snack heavy gloom orchard tone
-----END BIP39-----
BIP39 encoding with input from file
$ cat input-file.bin
123456789
$ docker run --rm -i dhlavaty/word-list-cli:latest word-list-cli bip39 < input-file.bin
-----BEGIN BIP39-----
couple muscle snack heavy gloom orchard tone
-----END BIP39-----
BIP39 encoding with output to file
$ cat input-file.bin
123456789
$ docker run --rm -i dhlavaty/word-list-cli:latest word-list-cli bip39 < input-file.bin > output.txt
$ cat output.txt
-----BEGIN BIP39-----
couple muscle snack heavy gloom orchard tone
-----END BIP39-----
Decoding BIP39 word list back to binary
$ cat output.txt
-----BEGIN BIP39-----
couple muscle snack heavy gloom orchard tone
-----END BIP39-----
$ docker run --rm -i dhlavaty/word-list-cli:latest word-list-cli decodebip39 < output.txt > decoded-file.bin
$ cat decoded-file.bin
123456789
# double-check that binary files are same
$ shasum *.bin
f7c3bc1d808e04732adf679965ccc34ca7ae3441 input-file.bin
f7c3bc1d808e04732adf679965ccc34ca7ae3441 decoded-file.bin
Encoding simple string to PGP word list
$ echo -n '123456789' | docker run --rm -i dhlavaty/word-list-cli:latest word-list-cli pgp
-----BEGIN PGP WORD LIST-----
chatter component chisel confidence chopper congregate clamshell consulting classroom
-----END PGP WORD LIST-----
with input from file
$ cat input-file.bin
123456789
$ docker run --rm -i dhlavaty/word-list-cli:latest word-list-cli pgp < input-file.bin
-----BEGIN PGP WORD LIST-----
chatter component chisel confidence chopper congregate clamshell consulting classroom
-----END PGP WORD LIST-----
with output to file
$ cat input-file.bin
123456789
$ docker run --rm -i dhlavaty/word-list-cli:latest word-list-cli pgp < input-file.bin > output.txt
$ cat output.txt
-----BEGIN PGP WORD LIST-----
chatter component chisel confidence chopper congregate clamshell consulting classroom
-----END PGP WORD LIST-----
Decoding PGP word list back to binary
$ cat output.txt
-----BEGIN PGP WORD LIST-----
chatter component chisel confidence chopper congregate clamshell consulting classroom
-----END PGP WORD LIST-----
$ docker run --rm -i dhlavaty/word-list-cli:latest word-list-cli decodepgp < output.txt > decoded-file.bin
$ cat decoded-file.bin
123456789
# double-check that binary files are same
$ shasum *.bin
f7c3bc1d808e04732adf679965ccc34ca7ae3441 input-file.bin
f7c3bc1d808e04732adf679965ccc34ca7ae3441 decoded-file.bin
Build image:
$ docker build . --tag dhlavaty/word-list-cli:latest
Lint dockerfile:
$ docker run --rm -i hadolint/hadolint < Dockerfile
This project is licensed under MIT - http://opensource.org/licenses/MIT
Content type
Image
Digest
Size
2.2 MB
Last updated
over 5 years ago
docker pull dhlavaty/word-list-cli