Memo128
A Rust library and CLI tool for encoding 128-bit numbers as memorable natural language sentences.
Overview
Memo128 converts cryptographic keys, blockchain addresses, and other 128-bit values into easy-to-remember sentences. It adds a 7-bit checksum for error detection and uses five dictionaries to create structured sentences that form mini-stories.
Each 128-bit value (plus 7-bit checksum) is encoded as three sentences, with each sentence containing:
- Character (10 bits)
- Setting (10 bits)
- Action (8 bits)
- Object (9 bits)
- Outcome (8 bits)
Installation
Usage
Encoding a 128-bit hex value
This will output three sentences representing the encoded value.
Sentence 1: a brave mouse inside a cosmic cathedral disconnected a question of time but it was already too late
Sentence 2: a worried parent within the cosmic algorithm accepted a mathematical impossibility as code predicted
Sentence 3: the fjord elder inside a particle accelerator stole a reality glitch rebooting the system
Decoding sentences back to the original value
Make sure to quote each sentence and provide all three sentences in the correct order.
Requirements
- Rust 1.70+
- Five dictionary files in the current directory:
character_10bit.txt(1024 entries)setting_10bit.txt(1024 entries)action_8bit.txt(256 entries)object_9bit.txt(512 entries)outcome_8bit.txt(256 entries)
How It Works
- Input a 32-character hexadecimal string (128 bits)
- Calculate a 7-bit checksum using SHA-256
- Combine into a 135-bit sequence
- Split into three 45-bit chunks
- Map each chunk to story components using dictionaries
- Assemble three sentences from the components
For full details, see SPEC.md.
Development
# Build the project
# Run tests
# Format code
# Run linter