This project offers an innovative way to enhance the security of storing a BIP39 mnemonic phrase by transforming it into a sigil, a unique cryptographic symbol.
The mnemonic phrase is securely encoded into a combined value using an algorithm, and the result is visually represented as a sigil. This adds an additional layer of security, as the mnemonic is not stored in plain text but rather as an image.
The sigil can be stored in various formats, such as printed images, a painting, or other creative mediums, making it extremely difficult for attackers to recognize or access the underlying mnemonic.
In the event that the sigil is lost or compromised, the mnemonic phrase can still be recovered by decoding the encoded value, providing a secure and discreet method for backing up sensitive information.
- Table of Contents
- Features
- Prerequisites
- Installation
- Usage
- Security and Ethics
- Comparison
- Benchmarks
- Roadmap
- Tree Directory
- Contributions
- Support the Project
- License
- Author
-
π Mnemonic Phrase to Sigil Transformation
Converts a mnemonic phrase into a unique sigil using mathematical transformations. -
π Secure Encoding with an Algorithm
The mnemonic phrase is first converted into numerical indices from a BIP39 word list. These indices are then encoded into a combined value using the base2048 algorithm. -
πΌοΈ Visualization as an Image
The sigil is generated as a vector image, displaying a unique design based on the encoded value, making it harder for attackers to detect or compromise the underlying mnemonic. -
π Mnemonic Phrase Decoding and Recovery
Allows for the recovery of the original mnemonic phrase by decoding the encoded combined value, as long as the necessary number of indices is provided. -
πΎ Sigil Storage and Management
Sigils are saved in a dedicated folder and can be easily stored as images, printed, or used in other creative formats like paintings or objects. -
π Interactive Menu
The user interface allows for choosing between two main options :creating a sigil from a mnemonic phrase
orrecovering the mnemonic phrase from an encoded value
. -
β Mnemonic Phrase Validation
Verifies that each word in the mnemonic phrase exists in the BIP39 word list, with informative error messages in case of missing words. -
πEasy Integration
The code is designed to be easily adaptable for different use cases and can be modified or extended to integrate with other systems or interfaces.
-
Python 3.11
-
Required Python libraries (see Installation)
matplotlib
numpy
shadePy
Make sure you have Python installed on your system before running the install command.
-
Clone this repository
git clone https://github.com/0x414854/Mnemonic_Shield.git
cd Mnemonic_Shield
-
Install dependencies
pip install -r requirements.txt
-
Prepare BIP39 word list
- Make sure you have the BIP39 word list file located at
./utils/wordsBIP39.txt
. - You can obtain the file from here.
- Make sure you have the BIP39 word list file located at
-
Run the script
python3 mnemonicShield.py
-
Interactive Menu
-
πΉ
Create a Sigil
- Enter your BIP39 mnemonic phrase. (12 or 24 words separated by spaces)
- The script converts the phrase into a unique combined value.
- A sigil is generated and saved as an image in the
sigils/
folder.
ποΈ Example with a 12-word mnemonic phrase
foster file unknown pluck economy end bird pistol awesome dentist move crucia
π€ Output
Indices : [737, 690, 1904, 1334, 562, 589, 181, 1324, 133, 469, 1159, 420] Encoded combined value : 1957519189511453243541897867745737060771 Number Mapping for the sigil : [1, 9, 5, 7, 5, 1, 9, 1, 8, 9, 5, 1, 1, 4, 5, 3, 2, 4, 3, 5, 4, 1, 8, 9, 7, 8, 6, 7, 7, 4, 5, 7, 3, 7, 0, 6, 0, 7, 7, 1]
πΌοΈ
sigil.png
file is created in thesigils/
folder.ποΈ Example with a 24-word mnemonic phrase
vital repair dizzy traffic library brief shell often expand south burst foam tissue twist attitude cupboard vapor country today return marine can play brave
π€ Output
Indices : [1961, 1461, 514, 1847, 1033, 224, 1580, 1230, 642, 1666, 247, 721, 1815, 1885, 118, 431, 1932, 393, 1819, 1474, 1089, 264, 1331, 219] Encoded combined value : 28379382023410064612010001521199486933878242917918893669086206599498889245069530 Number Mapping for the sigil : [2, 8, 3, 7, 9, 3, 8, 2, 0, 2, 3, 4, 1, 0, 0, 6, 4, 6, 1, 2, 0, 1, 0, 0, 0, 1, 5, 2, 1, 1, 9, 9, 4, 8, 6, 9, 3, 3, 8, 7, 8, 2, 4, 2, 9, 1, 7, 9, 1, 8, 8, 9, 3, 6, 6, 9, 0, 8, 6, 2, 0, 6, 5, 9, 9, 4, 9, 8, 8, 8, 9, 2, 4, 5, 0, 6, 9, 5, 3, 0]
πΌοΈ
sigil.png
file is created in thesigils/
folder. -
πΉ
Recover a Mnemonic Phrase
- Enter the encoded combined value generated when creating the sigil.
- Specify the number of indices needed to reconstruct the mnemonic phrase.
- The script retrieves and displays the original mnemonic phrase.
ποΈ Example with a 12-word mnemonic phrase
Enter the encoded combined value 1957519189511453243541897867745737060771 Enter the number of indices to reconstruct the phrase : 12
π€ Output
Reconstructed indices : [737, 690, 1904, 1334, 562, 589, 181, 1324, 133, 469, 1159, 420] Reconstructed mnemonic phrase : foster file unknown pluck economy end bird pistol awesome dentist move crucial
ποΈ Example with a 24-word mnemonic phrase
Enter the encoded combined value : 28379382023410064612010001521199486933878242917918893669086206599498889245069530 Enter the number of indices to reconstruct the phrase : 24
π€ Output
Reconstructed indices : [1961, 1461, 514, 1847, 1033, 224, 1580, 1230, 642, 1666, 247, 721, 1815, 1885, 118, 431, 1932, 393, 1819, 1474, 1089, 264, 1331, 219] Reconstructed mnemonic phrase : vital repair dizzy traffic library brief shell often expand south burst foam tissue twist attitude cupboard vapor country today return marine can play brave
Ensuring the security and ethical use of this project is a top priority. Below are key considerations regarding its safe and responsible implementation :
- This project does not transmit or store any mnemonic data online.
- All computations, encoding, and image generation are performed locally on your device, ensuring that sensitive information never leaves your machine.
- The mnemonic phrase is only processed in memory and never stored in plaintext.
- The sigil representation provides a discreet alternative to traditional mnemonic storage, reducing the risk of unauthorized access.
- The sigil image and the encoded combined value serve as an alternative to storing the mnemonic in plaintext.
- It is the user's responsibility to store the sigil and the combined value securely, such as:
- On an offline device
- As a printed image in a secure location
- This project is designed for personal security and privacy enhancement.
- Users should never use this tool for illicit purposes or attempt to recover mnemonics that do not belong to them. As with any security method, layered protection is recommended. Do not rely solely on one backup method.
By following these security best practices, users can enhance their mnemonic storage while keeping their sensitive data protected.
This project offers a discreet alternative for storing BIP39 mnemonic phrases by encoding them into a unique number and generating a corresponding sigil. Below is a comparison between this approach and the traditional method.
- π Enhanced Security: The seed phrase is not directly identifiable as a BIP39 mnemonic.
- π΅οΈ Increased Discretion: A sigil appears as an abstract drawing, making recovery less obvious for an attacker.
- π Digital or Physical Storage: Can be saved as an image or engraved onto a physical medium.
- π’ Reduced Storage Space: The phrase is transformed into a single, more compact number.
β οΈ Code Dependency: The phrase cannot be recovered without running the program.- πΎ Requires a BIP39 File: Recovery depends on the exact BIP39 word dictionary.
- π Less Universal: A standard crypto wallet will not directly recognize this format.
- π οΈ Risk of Loss: If the source code and sigil are lost, the phrase becomes unrecoverable.
Criterion | Sigil Encoding | BIP39 Mnemonic Phrase |
---|---|---|
Security π | β Indirect encryption | β Easily recognizable |
Discretion π΅οΈ | β Unrecognizable sigil | β Looks like a seed phrase |
Ease of Use βοΈ | β Script-dependent | β Universal and portable |
Portability π οΈ | β Can be engraved or stored digitally | β Can be stolen if not well protected |
Risk of Loss |
β Requires both code and sigil | β Can be written on paper |
Recovery π | β Needs script and BIP39 base file | β Directly usable in a wallet |
- Use sigil encoding as a discreet backup method.
- Keep a paper copy of the BIP39 phrase in a secure place to avoid accidental loss.
- Add a password or an extra key to enhance security in case the sigil is discovered.
Currently, no official benchmarks have been performed on the execution speed or memory usage of the script. However, it is designed to be lightweight, and the operations involved (especially plotting) should run efficiently on most modern computers.
-
Export options
: Allow users to save the sigil in other formats likeSVG
orPDF
. - β
Add option to save sigil with or without combined value
.
βββ .gitignore
βββ LICENSE
βββ README.md
βββ mnemonicShield.py
βββ requirements.txt
βββ π docs/
Β Β Β Β βββ README_FR.md
βββ π utils/
Β Β Β Β βββ wordsBIP39.txt
βββ π (sigils)/
Β Β Β Β βββ (sigil.png)
Feel free to submit issues and pull requests to improve this project !
β Giving it a star on GitHub β
Your support makes a huge difference ! This project is maintained with the energy, time, and passion of its contributors.
If you enjoy this project or want to help sustain its development, consider making a donation.
- Help cover development and hardware costs.
- Contribute to new features and improvements.
- Support an open-source project to keep it free and accessible to everyone.
- Enable the purchase of better hardware to create a computational pool for solving bitcoin puzzles.
You can donate using the following cryptocurrency addresses:
- Bitcoin (BTC) :
bc1q6n3ufauzjqgxztkklj3734cp0f7evqq3djh4ne
- Ethereum (ETH) :
0x24800123e8D51F1d596c6Abe4B5DB5A10837Fe8e
- Bittensor (TAO) :
5CrG7bKratZVocnxj66FF23AMVvqKHf7RSHfz49csEtJ2CuG
- Dogecoin (DOGE) :
DJQnasX39Unat3vkmyBMgp4H6Kfd4wFumF
- Solana (SOL) :
Gj9JkpFqdSabag8RiiNTmLaCiZrcxYa6pc4y599vft15
- Binance Smart Chain (BEP-20) :
0x24800123e8D51F1d596c6Abe4B5DB5A10837Fe8e
- Ethereum (ERC-20) :
0x24800123e8D51F1d596c6Abe4B5DB5A10837Fe8e
- Tron (TRC-20) :
THHcEQ8zG3ZnUXoHdBmCdpZ3AAqhoDbMpW
- Solana (SPL) :
Gj9JkpFqdSabag8RiiNTmLaCiZrcxYa6pc4y599vft15
- Binance Smart Chain (BEP-20):
0x24800123e8D51F1d596c6Abe4B5DB5A10837Fe8e
- Ethereum (ERC-20):
0x24800123e8D51F1d596c6Abe4B5DB5A10837Fe8e
- Solana (SPL):
Gj9JkpFqdSabag8RiiNTmLaCiZrcxYa6pc4y599vft15
Thank you so much for your generosity. Your support truly means the world to us and motivates us to keep improving this project. π
β‘οΈ Take action now ! Every contribution, big or small, makes a huge impact.
This project is licensed under the MIT License.