Coder Social home page Coder Social logo

mm9942 / crypt_guard_cli Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 142.66 MB

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

License: MIT License

Rust 100.00%
cli cryptography dilithium falcon kyber postquantumcryptography

crypt_guard_cli's Introduction

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!

crypt_guard_cli's People

Contributors

mm9942 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.