Skip to main content

Recode Stamper

A small Python utility that encodes UTF-8 text into a 12- or 24-word mnemonic (RECODE) and decodes it back.

Install from PyPI

pip install recode-stamper

Quick start

After installation, use the CLI entry point:

recode --encode "MyPassword123!"
recode --decode "artist scavenge intimate airdrop humdrum curfew hexagon candy comedy bunion brevity aardvark"

Subcommands also work:

recode encode "MyPassword123!"
recode decode "artist scavenge intimate airdrop humdrum curfew hexagon candy comedy bunion brevity aardvark"

For interactive use, the CLI can also prompt for text securely without echoing it in the terminal:

recode --encode
recode encode

This is useful for avoiding accidental exposure in shell history or terminal logs.

Show help:

recode --help

If you are running directly from the repository checkout instead of the installed package:

python recode.py --encode "MyPassword123!"
python recode.py --decode "artist scavenge intimate airdrop humdrum curfew hexagon candy comedy bunion brevity aardvark"

How the format works

The RECODE format uses a fixed 4096-word list.

  • Each word is mapped to a 12-bit value
  • 2^12 = 4096 unique values
  • A word index is therefore a number from 0 to 4095

The format automatically selects between 12 and 24 words:

  • up to 16 bytes of data -> 12 words
  • 17 to 32 bytes of data -> 24 words
  • more than 32 bytes -> rejected

This keeps the output compact while preserving enough space for metadata and a checksum.

You can also force the format explicitly:

recode --encode "MyPassword123!" --plates 12
recode --encode "MyPassword123!" --plates 24

Why UTF-8

The encoder accepts UTF-8 text and converts it to bytes before packing the bit stream. This means it works for regular ASCII strings as well as non-ASCII text, while preserving deterministic behavior and a fixed wordlist layout.

Wordlist source

The file wordlist4096.txt is based on the public wordlist from:

https://raw.githubusercontent.com/kklash/wordlist4096/main/wordlist4096.txt

Also check the 12-bit representation of each of the 4,096 words.

License

This project is licensed under the MIT License. See LICENSE for the full text.

The included wordlist is derived from the upstream source referenced above. Please check the original repository and license terms for the wordlist itself before using it in production or redistribution.

This repository does not claim to replace or relicense the upstream wordlist; it only references the source used for the local copy included here.

Metadata

Release files for recode-stamper 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for recode-stamper 0.1.6
File Size Uploaded
recode_stamper-0.1.6.tar.gz 24.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for recode-stamper 0.1.6
File Interpreter ABI Platform
recode_stamper-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 48.0 kB

Release files / recode_stamper-0.1.6.tar.gz

Download URL recode_stamper-0.1.6.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
045652c350cf93d6c857f0e6986075326c8c7efe4b85353ee3e8dd6de2bb1eb7
BLAKE2b-256 checksum
How to use checksums
abe7067da81930d00e61a055abdf6dd7a48761a4aab9d5de9eff5719244fcf16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / recode_stamper-0.1.6-py3-none-any.whl

Download URL recode_stamper-0.1.6-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f70be19e299c665a785d66999aeed76bd90538157fab4dad4adbebd1b54d2350
BLAKE2b-256 checksum
How to use checksums
18e93eee2d0dc76ab0634d631672bcb96c6afb16b449c9d3a23be77dcf9401e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page