Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/araujo88/bip39-in-c
An attempt to generate 12 word seed (BIP39) in C. USE WITH CAUTION, IT DOES NOT GUARANTEE ENOUGH ENTROPY AND SAFETY!
https://github.com/araujo88/bip39-in-c
bip39 bip39-seed
Last synced: 15 days ago
JSON representation
An attempt to generate 12 word seed (BIP39) in C. USE WITH CAUTION, IT DOES NOT GUARANTEE ENOUGH ENTROPY AND SAFETY!
- Host: GitHub
- URL: https://github.com/araujo88/bip39-in-c
- Owner: araujo88
- License: gpl-3.0
- Created: 2024-03-07T23:22:54.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-11T03:20:32.000Z (10 months ago)
- Last Synced: 2024-03-12T03:39:36.896Z (10 months ago)
- Topics: bip39, bip39-seed
- Language: C
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BIP39 Bitcoin Wallet Seed Generator
An attempt to generate 12 word seed (BIP39) in C. USE WITH CAUTION, IT DOES NOT GUARANTEE ENOUGH ENTROPY AND SAFETY!
## Overview
This program generates a 12-word seed, compliant with the BIP39 standard, for Bitcoin wallets. It uses a list of 2048 predefined words and selects 12 of them at random to create a seed. The randomness is sourced from a cryptographically secure pseudo-random number generator (CSPRNG) to ensure the seed's security.
## Dependencies
- OpenSSL: The program uses the `RAND_bytes` function from OpenSSL for cryptographically secure randomness.
## Compilation
To compile this program, you need to have GCC and OpenSSL library installed on your system. On a Unix-like system, you can compile the program with the following command:
```
make
```## Downloading BIP-39 word list
```
wget https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt
```Check for the file integrity:
```
echo "2f5eed53a4727b4bf8880d8f3f199efc90e58503646d9ff8eff3a2ed3b24dbda english.txt" > english.sha256 && sha256sum -c english.sha256
```## Running the Program
Before running the program, ensure you have the `english.txt` file in the same directory as your compiled executable. This file should contain the list of 2048 words used by the BIP39 standard, one word per line.
Run the program using:
```
./generate_seed
```The program will print out a 12-word seed that you can use for your Bitcoin wallet.
## Security Note
This program is designed for educational purposes and should be carefully reviewed before being used in production systems. Ensure that the `english.txt` file is accurate and has not been tampered with. Additionally, the security of the generated seed relies on the proper functioning and implementation of the OpenSSL `RAND_bytes` function.
## Contributing
Contributions are welcome. Please follow these steps:
1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Make your changes and commit them (`git commit -am 'Add some feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Create a new Pull Request.## License
This project is licensed under the GPL License - see the [LICENSE](LICENSE) file for details.