The Random Key Generator is an interactive command-line tool that allows you to create secure random keys by mixing characters from a specified range and adding a unique salt.
To use the Random Key Generator, follow the usage instructions below:
Usage: generate -l <length> -f <from> -t <to> -o <output_path>
Replace the placeholders with the appropriate values for your desired key generation. You can set the length of the key, specify the range of characters to choose from, and set the output location.
-
Installation: Make sure you have OpenSSL installed on your system. If not, install it using your package manager.
-
Compilation: Compile the code files using the following command:
gcc main.c generator.c file_writer.c -o key_generator -lcrypto
-
Run: Execute the generated binary to use the Random Key Generator.
-l <int:length>
: Set the length of the generated key.-f <string:from>
: Specify the starting character for the range.-t <string:to>
: Specify the ending character for the range.-o </home/user/...txt>
: Set the output location for the generated key.
Generate a random key with a length of 20 characters, using characters ranging from 'a' to 'z', and save it to /home/user/key.txt
:
./key_generator -l 20 -f a -t z -o /home/user/key.txt
- Generates secure random keys using a specified range of characters.
- Customizable key length, character range, and output location.
The Random Key Generator is a simple project that showcases the usage of cryptographic concepts to enhance key security. It's important to keep security practices in mind when using keys for sensitive applications.