🧬 DNAPass Password Generator

Written in modern C++, inspired by DNA nucleotide sequences

Generate Password Now View on GitHub

OVERVIEW

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.

C++ G++ CMake Git Clang Maintained MIT License

TABLE OF CONTENTS

FEATURES

🧬 DNA-Inspired Sequences

Generates passwords using DNA nucleotide sequences (A, T, C, G) with ambiguous character resolution.

🔒 High Entropy

Produces passwords with high entropy, exceeding NIST's 80-bit recommendation for high-security passwords.

🎲 Random Selection

Uses two sets of sequences with 90%/10% probability distribution for increased randomness.

🔣 Character Diversity

Enforces uppercase, lowercase, digits, and special characters for maximum password strength.

⚡ Modern C++

Written in modern C++ with clean, maintainable code following best practices.

📦 Cross-Platform

Compatible with Windows, Linux, and macOS with CMake support for easy building.

INSTALLATION ON THE LINUX SYSTEM

Prerequisites

# 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++

Building from Source

# 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 .

USAGE

Command Line

  • 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

Troubleshooting

  • 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.

Web Interface

Use our web-based password generator for quick and easy password generation.

Try Web Generator

HOW IT WORKS

🎲 Sequence Selection

DNAPass uses two sets of DNA-inspired sequences:

  • Primary Sequences: A list of 200 DNA sequences derived from biological motifs, including ambiguous characters (e.g., 'N', 'R'). Selected with a 90% probability.
  • Secondary Sequences: A smaller set of 8 sequences restricted to the nucleotides A, T, C, and G, selected with a 10% probability.

🤹 Ambiguity Resolution

Primary sequences often contain ambiguous characters defined by the IUPAC nucleotide code. These are resolved randomly using a predefined mapping:

  • 'N': Random choice from ['A', 'T', 'C', 'G']
  • 'R': Random choice from ['A', 'G']
  • 'Y': Random choice from ['C', 'T']
  • And so on...

🔣 Character Diversity

To ensure password strength, DNAPass enforces:

  • Uppercase Letters: At least 10% of the password length (minimum 1)
  • Lowercase Letters: At least one lowercase letter
  • Digits: At least 2 digits for passwords < 50 characters, or 3 for ≥ 50 characters
  • Special Characters: At least 4 special characters from a predefined set
  • No Spaces: Any spaces are removed

📈 Entropy Considerations

The entropy of a DNAPass-generated password is influenced by:

  • Sequence Selection: With 141 primary and 8 secondary sequences
  • Ambiguity Resolution: Each ambiguous character has multiple possible outcomes
  • Character Modifications: Adding digits, special characters, and case variations
  • Random Shuffling: Ensures no predictable structure

For a 12-character password, DNAPass typically achieves entropy above NIST's 80-bit recommendation for high-security passwords.

View Detailed Methodology

SECURITY NOTES

Do 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.

CONTRIBUTING

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

Issue Templates

Use our issue templates to report bugs or suggest improvements:

View Issues

LICENSE

This project is licensed under the MIT License. See the:

View MIT License

CHANGELOG

See what's new in each version of DNAPass:

View Changelog

ISSUES

Found a bug or have a suggestion? Check our issues page:

View Issues