Skip to content

CryptGuard CLI is a command-line tool for cryptographic operations, including key generation, signing, verification, encryption, and decryption using various algorithms.

License

Notifications You must be signed in to change notification settings

mm9942/crypt_guard_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CryptGuard CLI

Crates.io MIT licensed Documentation Hashnode Blog GitHub Library GitHub CLI

This project is based on the Rust crate crypt_guard. You can read more about the crate here.

Pre-Release

This is a pre-release version, currently lacking proper error handling. The foundation is already laid and will soon integrate improved error handling and additional security features. Despite this, by following the README and CLI help, you should not encounter major issues. Currently, the highest security key types (Kyber 1024, Falcon 1024, and Dilithium 5) have been tested.

Overview

CryptGuard CLI is a command-line tool for cryptographic operations, including key generation, signing, verification, encryption, and decryption using various algorithms.

Installation

To use this tool, ensure you have Rust installed on your machine. Clone this repository and build the project using Cargo:

git clone https://github.com/mm9942/crypt_guard_cli
cd crypt_guard_cli
cargo build --release

Usage

KeyGen commands

Falcon key generation size: 1024 (available: 1024, 512)

./target/debug/crypt_guard keygen -a Falcon1024 -d test/falcon_keys

Dilithium key generation size: 5 (available: 5, 3, 2)

./target/debug/crypt_guard keygen -a Dilithium5 -d test/dilithium_keys

Kyber key generation size: 1024 (available: 1024, 768, 512)

./target/debug/crypt_guard keygen -a Kyber1024 -d test/kyber_keys

Creation of detached signature

Create Detached Signature

./target/debug/crypt_guard sign --type detached -i test/Cargo.lock -a falcon -k test/falcon_keys/falcon_keys.sec -K 1024 -o test/Files/detached/Cargo.toml.sig

Verify Detached Signature

./target/debug/crypt_guard verify detached -i test/Files/detached/Cargo.toml.sig -a falcon -k test/falcon_keys/falcon_keys.pub -K 1024 -s test/Files/detached/Cargo.lock.sig

Creating Signed data

Signing Data

./target/debug/crypt_guard sign --type signed -i test/Cargo.lock -a falcon -k falcon_keys/falcon_keys.sec -K 1024 -o test/Files/signed/Cargo.lock.sig

Opening Signed Data

./target/debug/crypt_guard verify signed -o test/Files/signed/Cargo.lock -a falcon -k falcon_keys/falcon_keys.pub -K 1024 -i test/Files/signed/Cargo.lock.sig

Encryption using AES

Encryption

./target/debug/crypt_guard encrypt -i test/Cargo.lock -o test/Files/AES/enc/Cargo.lock.enc -K 1024 -k test/kyber_keys/kyber_keys.pub -p "keyphrase" -a AES

Decryption

./target/debug/crypt_guard decrypt -i test/Files/AES/enc/Cargo.lock.enc -o test/Files/AES/dec/Cargo.lock -c test/Files/AES/enc/Cargo.lock.ct -K 1024 -k test/kyber_keys/kyber_keys.sec -p "keyphrase" -a AES

Encryption using XChaCha20

Encryption

./target/debug/crypt_guard encrypt -i test/Cargo.lock -o test/Files/XChaCha20/enc/Cargo.lock.enc -K 1024 -k test/kyber_keys/kyber_keys.pub -p "keyphrase" -a XChaCha20

Decryption

./target/debug/crypt_guard decrypt -i test/Files/XChaCha20/enc/Cargo.lock.enc -o test/Files/XChaCha20/dec/Cargo.lock -c test/Files/XChaCha20/enc/Cargo.lock.ct -K 1024 -k test/kyber_keys/kyber_keys.sec -p "keyphrase" -a XChaCha20 -n="54643ed8ce9d454690b0d6263de59159fb1826f75043c19e"

Please note that XChaCha20 returns a nonce that is not automatically saved and needs to be noted down!

About

CryptGuard CLI is a command-line tool for cryptographic operations, including key generation, signing, verification, encryption, and decryption using various algorithms.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages