crypter_project_sk

Crates.iocrypter_project_sk
lib.rscrypter_project_sk
version0.1.0
created_at2025-11-10 01:34:58.681667+00
updated_at2025-11-10 01:34:58.681667+00
descriptionA secure file encryption tool using AES-GCM and Argon2.
homepage
repositoryhttps://github.com/rageousk/crypter/
max_upload_size
id1924646
size30,609
Sahil Kamboj (rageousk)

documentation

README

đź”’ crypter

A secure, simple command-line tool written in Rust for encrypting and decrypting files.

This project was built for a Programming Languages course, focusing on applying core Rust concepts—Ownership, Structs, Enums, and Modules—to a practical cybersecurity problem. The tool is fully functional and secure.

Features

  • Secure Encryption: Uses AES-256-GCM, a modern authenticated encryption standard.
  • Strong Key Derivation: Uses Argon2 to derive a strong 32-byte encryption key from your password. (No hardcoded keys!)
  • Salting: Generates a unique, random salt for every encryption, ensuring the same password produces a different result each time. This protects against pre-computation attacks.
  • User-Friendly Prompts: Securely prompts for passwords (no on-screen echoing) and includes retry loops for mistyped entries.
  • Overwrite Protection: Confirmation before overwriting existing output files to prevent data loss.

Getting Started

You’ll need Rust and Cargo installed on your system.

Installing Rust and Cargo

If you don't already have Rust and Cargo, install them using the official installer:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

This command works on most Unix-based systems (Linux, macOS).
For Windows, download and run the installer from rustup.rs.

After installation, restart your terminal and verify:

rustc --version
cargo --version

1. Clone the Repository

git clone https://github.com/rageousk/crypter.git

2. Change Directory

cd crypter

3. Run with Cargo

To Encrypt

Run the encrypt command, providing input and output file paths:

cargo run -- encrypt test_doc.txt my_file.bin

You will be prompted to enter and confirm a password. If it's wrong, you can try again.

To Decrypt

Run the decrypt command:

cargo run -- decrypt my_file.bin test_doc_decrypted.txt

You will be prompted for your password. If it's wrong, you can try again.

Commit count: 0

cargo fmt