Chargo is a tool for file encryption/decryption. It's based on Argon2 and ChaCha20Poly1305 algorithms.

Related tags

Cryptography chargo
Overview

Latest Version | Documentation

Chargo is a tool for file encryption/decryption with password. It's based on Argon2 and ChaCha20Poly1305 algorithms. From arg2u with

Requirments

To use Chargo you need to install Cargo and Rust. Just paste into your terminal window:

curl https://sh.rustup.rs -sSf | sh
cargo install chargo

Usage

chargo [OPTIONS] <mode> -i <input> -p <pwd>

Flags

-h, --help       Prints help information
-V, --version    Prints version informat

Options

-i <input>         Input file path
-o <output>        Out file path. If it is not provided, Chargo will override input file
-p <pwd>           Path to a password file

Args

<mode>    Set mode decrypt or encrypt

Examples

In-Terminal usage

chargo encrypt -p password.txt -i myfile.txt -o myfile.chargo
chargo decrypt -p password.txt -i myfile.chargo -o myfile.txt

In-Code usage

use chargo::{encrypt_to_file, decrypt_from_file};
use std::path::PathBuf;

fn main() {
    encrypt_to_file(PathBuf::from("pwd.txt"), PathBuf::from("file.txt"), Some(PathBuf::from("file.chargo"))).unwrap();
    decrypt_from_file(PathBuf::from("pwd.txt"), PathBuf::from("file.chargo"), Some(PathBuf::from("file.txt"))).unwrap();
}

Sponsor

ETH: 0xd66e9d65EB278075859881A56B9027Da3260533E

License

MIT

You might also like...
CLI password manager with encryption: AES256, Salsa20 and Chacha20, with cross platform and exclusive features
CLI password manager with encryption: AES256, Salsa20 and Chacha20, with cross platform and exclusive features

Keep My House (CLI) CLI password manager with encryption: AES256, Salsa20 and Chacha20, with cross platform and exclusive features Features AES256 GCM

End-to-end encryption and mutual authentication for distributed applications.
End-to-end encryption and mutual authentication for distributed applications.

✨ Hands-on Introduction: Build end-to-end encrypted, mutually-authenticated, secure messaging in Rust ✨ Rust and Elixir libraries for end-to-end encry

Meta-repository for Miscreant: misuse-resistant symmetric encryption library with AES-SIV (RFC 5297) and AES-PMAC-SIV support

The best crypto you've never heard of, brought to you by Phil Rogaway A misuse resistant symmetric encryption library designed to support authenticate

An experimental fork of a16z's Helios Ethereum client which can run its network traffic over the Nym mixnet

Helios (Nym mixnet fork) Helios is a fully trustless, efficient, and portable Ethereum light client written in Rust. This fork of Helios includes nasc

WebAssembly wrapper of the rage encryption library

rage-wasm: WebAssembly wrapper of rage rage is a simple, modern, and secure file encryption tool, using the age format. It features small explicit key

In addition to encryption library, pure RUST implementation of SSH-2.0 client protocol

In addition to encryption library, pure RUST implementation of SSH-2.0 client protocol

The Hybrid Public Key Encryption (HPKE) standard in Python

Hybrid PKE The Hybrid Public Key Encryption (HPKE) standard in Python. hybrid_pke = hpke-rs ➕ PyO3 This library provides Python bindings to the hpke-r

Project Masterpass is a deterministic databaseless key management algorithm, aimed to help those who cannot protect their encryption keys in storage

Project Masterpass (working title) Attention! This project is still under heavy development, and SHOULD NOT be used in practice, as the algorithms cou

A simple to use, cross-platform aes encryption

About Project End to End encryption (AES) for multiple languages (cross-platform) with CBC Icon Item 🥳 Upcoming ⚖️ License 📝 ChangeLog Usage (rust)

Comments
  • openssl alternative

    openssl alternative

    Hello,

    great work, thank you for publishing this.

    providing the password from the command line is not a good idea, since it logs the password into the history

    i have been using these aliases to achieve the same functionality with openssl:

    export CIPHER=aes-256-cbc
    alias enc_stream="gzip -f | openssl enc -${CIPHER} -salt -a"
    alias dec_stream="openssl enc -d -${CIPHER} -salt -a | gunzip - "
    

    so

    cat file.txt | enc_stream > file.txt.enc
    
    

    would be great to mirror the same functionality with this, including the ability to pick the cipher

    opened by korovkin 5
Owner
Airat Galiullin
I develop IT solutions and help businesses and startups effectively use IT technologies for 10+ years. Stack: Fullstack JS/Rust/Flutter/Python
Airat Galiullin
A pairing-based threshold cryptosystem for collaborative decryption and signatures used in HoneybadgerBFT implementation

threshold_crypto A pairing-based threshold cryptosystem for collaborative decryption and signatures. The threshold_crypto crate provides cryptographic

null 166 Dec 29, 2022
Rust encryption library for practical time-lock encryption.

tlock_age: Hybrid Timelock Encryption/Decryption in Rust tlock_age is a library to encrypt and decrypt age filekey using tlock scheme. It provides an

Thibault 5 Mar 29, 2023
A Rust Library of China's Standards of Encryption Algorithms (SM2/3/4)

Libsm Libsm is an open source pure rust library of China Cryptographic Algorithm Standards. It is completed by a collaborative effort between the Cryp

CITAHub 149 Dec 23, 2022
A Rust Implementation of China's Standards of Encryption Algorithms(SM2/SM3/SM4)

gm-rs A Pure Rust High-Performance Implementation of China's Standards of Encryption Algorithms(SM2/SM3/SM4) Usage Add this to your Cargo.toml: [depen

null 2 Oct 27, 2022
DexiosGUI - Simple cross-platform drag-and-drop Dexios file encryption

DexiosGUI Simple cross-platform drag-and-drop Dexios file encryption. Latest Windows x64 release is here. DexiosGUI is a Qt/C++ app for encrypt and de

Fabrice Corraire 4 Jul 25, 2022
A Rust binary for file encryption to multiple participants.

Kaspa-miner A Rust binary for file encryption to multiple participants. Installation From Sources With Rust's package manager cargo, you can install k

Elichai Turkel 31 Dec 30, 2022
A secure file encryption utility, written in rust.

Dexios Dexios What is it? Building notes Checksums Performance Output file sizes Environment Variables Key Inputs Usage Examples To Do What is it? Dex

brxken 156 Dec 22, 2022
rabe is an Attribute Based Encryption library, written in Rust

Rabe rabe is a rust library implementing several Attribute Based Encryption (ABE) schemes using a modified version of the bn library of zcash (type-3

Fraunhofer AISEC 52 Dec 15, 2022
A Rust library for lattice-based additive homomorphic encryption.

Cupcake Cupcake is an efficient Rust library for the (additive version of) Fan-Vercauteren homomorphic encryption scheme, offering capabilities to enc

Facebook Research 365 Dec 11, 2022
Simple to use CLI tool that makes encryption easy! Written in Rust.

?? eme: Encryption Made Easy an extremely simple AES-256 encryption tool written in Rust Usage: # To encrypt: eme --encrypt secret.png # To decrypt: e

null 5 Jan 3, 2023