Written in modern C++, inspired by DNA nucleotide sequences
DNAPass is a password generator written in modern C++ that creates secure passwords inspired by DNA nucleotide sequences.
The generator uses DNA-inspired sequences and applies various transformations to ensure password strength while maintaining memorability through biological patterns.
Generates passwords using DNA nucleotide sequences (A, T, C, G) with ambiguous character resolution.
Uses a cryptographically secure random source (OS CSPRNG in the CLI, Web Crypto API in the browser). 16+ characters give an estimated 100+ bits.
Uses two sets of sequences with 90%/10% probability distribution for increased randomness.
Enforces uppercase, lowercase, digits, and special characters for maximum password strength.
Written in modern C++ with clean, maintainable code following best practices.
Compatible with Windows, Linux, and macOS with CMake support for easy building.
# Update and install the environments required for the installation. (Mandatory action)
sudo apt update
sudo apt install git
sudo apt install g++
sudo apt install clang
# After installing the environments, confirm and verify the installed versions. (Optional checking)
sudo apt update
sudo apt install git
sudo apt install cmake
sudo apt install g++
# Cloning the repository to install packages.
git clone https://github.com/gerivanc/dnapass-password-generator.git
cd dnapass-password-generator
mkdir build
cd build
cmake ..
cmake --build .
-
Method 1. Call the function by question to generate the password by choosing between 8-128 characters:
./dnapass_generator
-
Method 2. Automated Mode. Call to generate the password by choosing a 45-character password. In the function, enter the number of characters between 8 and 128:
echo "45" | ./dnapass_generator
-
Method 3. Command-line options (same as the web toggles). Generate a 32-character password without special characters:
./dnapass_generator --length 32 --no-special
-
Options: -l/--length N, --no-uppercase, --no-lowercase, --no-digits, --no-special, -q/--quiet (password only), -h/--help, -v/--version
- Error: "cmake: command not found": Install CMake with sudo apt install cmake.
- Error: "g++: command not found": Install g++ with sudo apt install g++.
- Error: "./dnapass_generator: No such file or directory": Ensure the build step completed successfully. Run ls to check if dnapass_generator exists in the build folder. If not, repeat the cmake .. and cmake --build . steps.
- Permission denied: Run chmod +x dnapass_generator to make the executable runnable, then try ./dnapass_generator again.
Use our web-based password generator for quick and easy password generation. It can be installed as an app (PWA) from your browser and works offline; passwords are generated locally and never leave your device.
Try Web GeneratorDNAPass uses two sets of DNA-inspired sequences:
Primary sequences often contain ambiguous characters defined by the IUPAC nucleotide code. These are resolved randomly using a predefined mapping:
To ensure password strength, DNAPass enforces:
The entropy of a DNAPass-generated password is influenced by:
With all character types enabled, the estimated entropy grows by about 6.5 bits per character (90-symbol set): about 78 bits at 12 characters and about 104 bits at 16. The estimate is an upper bound, so use 16 characters or more for high-security accounts — 20+ is recommended.
View Detailed MethodologyDo not attempt to memorize the passwords generated by this tool. Instead, use a reliable password manager, such as Bitwarden, which I personally recommend.
The only password you should memorize is the master password for your password manager's vault, created with a strong combination of uppercase and lowercase letters, numbers, and special characters.
Enable two-factor authentication (2FA) whenever possible to enhance security.
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
Use our issue templates to report bugs or suggest improvements:
View IssuesThis project is licensed under the MIT License. See the:
View MIT LicenseSee what's new in each version of DNAPass:
View ChangelogFound a bug or have a suggestion? Check our issues page:
View Issues