Skip to content

A simple CLI tool that can generate RSA key pair, encrypt and decrypt message.

Notifications You must be signed in to change notification settings

waddaboo/crypto-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto CLI

A Rust CLI tool to generate RSA key pair, encrypt and decrypt message.

Features

  • Generate private and public RSA key pairs.
  • Encrypt message using public key with the option of hex encoding.
  • Decrypt message using private key with the option of hex decoding.

Getting Started

  1. Run the line below to get more information on each command.
cargo run -- --help
  1. Run a specific command.
cargo run -- <COMMAND>

Commands

  1. You can get more specific information about any commands by using --help with a specific command. For example, you can run any of the following commands for varying level of detail:
    • cargo run -- --help
      
    • cargo run -- encrypt --help
      
    • cargo run -- decrypt --help
      
  2. More information on shorthand commands like --text (shortcut -t) can be found in --help.
  3. Currently available commands:
    • cargo run -- generate
      
    • cargo run -- encrypt --text <TEXT> --public_exponent <PUBLIC_EXPONENT> --modulus <MODULUS>
      
    • cargo run -- decrypt --text <TEXT> --private_exponent <PRIVATE_EXPONENT> --public_exponent <PUBLIC_EXPONENT> --modulus <MODULUS>
      
    • cargo run -- encrypt-encode --text <TEXT> --public_exponent <PUBLIC_EXPONENT> --modulus <MODULUS>
      
    • cargo run -- decrypt-decode --text <TEXT> --private_exponent <PRIVATE_EXPONENT> --public_exponent <PUBLIC_EXPONENT> --modulus <MODULUS>
      
  4. Test commands for testing RSA encryption decryption cases:
cargo test

About

A simple CLI tool that can generate RSA key pair, encrypt and decrypt message.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages