Skip to content

A secure cryptographic key generation script with validation and entropy checking capabilities

License

Notifications You must be signed in to change notification settings

alimahdibahrami/SecureKeyGenerationScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecureKeyGenerationScript

This project is a Python script designed for generating secure keys with various complexities and validating their strength. It provides functionalities to create secure keys for different purposes, including JWT (JSON Web Tokens), and includes validation mechanisms to ensure the generated keys meet security standards.

Features

  • Key Generation: Generate secure keys with different complexity levels (medium, high, ultra).
  • JWT Key Generation: Create secure keys specifically for JWT with added entropy.
  • Key Validation: Validate the strength of generated keys based on length, character diversity, and other security metrics.
  • Backup Keys: Generate backup keys for added security.

Installation

To set up the project, follow these steps:

  1. Clone the repository:
    git clone https://github.com/alimahdibahrami/SecureKeyGenerationScript.git
    
  2. Navigate to the project directory:
    cd SecureKeyGenerationScript
    
  3. Install the required dependencies:
    pip install -r requirements.txt
    

Usage

To generate secure keys, run the generate_keys.py script:

python src/generate_keys.py

This will generate a SECRET_KEY, JWT_SECRET_KEY, and backup keys, displaying them in the console and saving them to a file named generated_keys.txt.

Testing

To run the tests for the project, navigate to the tests directory and execute:

pytest

This will run all unit tests defined in the test_generate_keys.py and test_key_validator.py files.

Security Guidelines

For best practices on key management and usage, refer to the docs/security_guidelines.md file.

Contribution

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and commit them (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A secure cryptographic key generation script with validation and entropy checking capabilities

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages