| Crates.io | ferrocrypt-cli |
| lib.rs | ferrocrypt-cli |
| version | 0.2.5 |
| created_at | 2025-12-14 20:23:32.57029+00 |
| updated_at | 2025-12-16 17:25:49.732674+00 |
| description | Command-line interface for Ferrocrypt (installs the 'ferrocrypt' binary). |
| homepage | https://github.com/alexylon/Ferrocrypt |
| repository | https://github.com/alexylon/Ferrocrypt |
| max_upload_size | |
| id | 1985039 |
| size | 181,165 |
Tiny, easy-to-use, and highly secure multiplatform encryption tool with CLI and GUI interfaces. Written entirely in Rust.

Ferrocrypt is a simple encryption tool leveraging Rust's memory safety guarantees and performance benefits. The name comes from Latin: "ferrum" (iron) and "ferrugo" (rust).
GUI Options:
Encryption Modes:
Symmetric - Uses XChaCha20-Poly1305 encryption with Argon2id password-based key derivation. Ideal for personal use where the same password encrypts and decrypts data. Produces .fcs vault files.
Hybrid - Combines XChaCha20-Poly1305 (data encryption) with RSA-4096 (key encryption). Each file/folder gets a unique random key, encrypted with your public key. Requires both the private key AND password for decryption, providing dual-layer security. Produces .fch vault files.
Security Features:
chacha20poly1305 crate, which has undergone successful security auditssecrecy crate, preventing accidental exposure through Debug/Display traits and ensuring automatic memory zeroization when droppedThe code is separated in multiple projects - the library ferrocrypt-lib, a CLI client ferrocrypt-cli,
a TAURI based GUI app ferrocrypt-gui-tauri, and a Dioxus based GUI app ferrocrypt-gui-dioxus.
Install from crates.io:
# Installs the 'ferrocrypt' binary
cargo install ferrocrypt-cli
Or build from source:
cargo build --release
The binary executable file will be generated in target/release/ferrocrypt (macOS and Linux)
or target\release\ferrocrypt.exe (Windows).
cargo add ferrocrypt
Or add to your Cargo.toml:
ferrocrypt = "0.2"
The CLI supports two usage modes:
./ferrocrypt with no argumentsCommands shown are for macOS/Linux (use ferrocrypt instead of ./ferrocrypt on Windows).
Flags can be used in any order.
Available subcommands:
keygen – Generate a hybrid (asymmetric) key pairhybrid – Hybrid encryption/decryption using public/private keyssymmetric – Symmetric encryption/decryption using a passphrase./ferrocrypt symmetric --inpath <SRC_PATH> --outpath <DEST_DIR_PATH> --passphrase <PASSPHRASE>
or
./ferrocrypt symmetric -i <SRC_PATH> -o <DEST_DIR_PATH> -p <PASSPHRASE>
./ferrocrypt keygen --bit-size <BIT_SIZE> --passphrase <PASSPHRASE> --outpath <DEST_DIR_PATH>
or
./ferrocrypt keygen -b <BIT_SIZE> -p <PASSPHRASE> -o <DEST_DIR_PATH>
If --bit-size is omitted, the default is 4096.
./ferrocrypt hybrid --inpath <SRC_PATH> --outpath <DEST_DIR_PATH> --key <PUBLIC_PEM_KEY>
or
./ferrocrypt hybrid -i <SRC_PATH> -o <DEST_DIR_PATH> -k <PUBLIC_PEM_KEY>
./ferrocrypt hybrid --inpath <SRC_FILE_PATH> --outpath <DEST_DIR_PATH> --key <PRIVATE_PEM_KEY> --passphrase <PASSPHRASE>
or
./ferrocrypt hybrid -i <SRC_FILE_PATH> -o <DEST_DIR_PATH> -k <PRIVATE_PEM_KEY> -p <PASSPHRASE>
Running ./ferrocrypt without any arguments starts an interactive shell:
$ ./ferrocrypt
Ferrocrypt interactive mode
Type `keygen`, `hybrid`, or `symmetric` with flags, or `quit` to exit.
ferrocrypt> keygen -o keys -p "my secret"
ferrocrypt> hybrid -i secret.txt -o out -k public.pem
ferrocrypt> symmetric -i secret.txt -o out -p "my secret"
ferrocrypt> quit
This mode is convenient for exploratory or repeated use.
Under the hood, it uses the same subcommands and flags as the direct CLI.
| Flag | Description |
|------------------|----------------|
| `-h, --help` | Print help |
| `-V, --version` | Print version |
symmetric subcommand| Flag | Description |
|----------------------------------|--------------------------------------------------------------------------------------------------------------|
| `-i, --inpath <SRC_PATH>` | File or directory path that needs to be encrypted, or the file path that needs to be decrypted |
| `-o, --outpath <DEST_DIR>` | Destination directory path |
| `-p, --passphrase <PASSWORD>` | Password to derive the symmetric key for encryption and decryption |
| `-l, --large` | For large input file(s) that cannot fit into the available RAM.* |
* Use -l, --large when encrypting files larger than available RAM or to minimize memory usage. Omitting it provides faster encryption for smaller files. The decryption process automatically uses the same method as encryption.
hybrid subcommand| Flag | Description |
|----------------------------------|--------------------------------------------------------------------------------------------------------------|
| `-i, --inpath <SRC_PATH>` | File or directory path that needs to be encrypted, or the file path that needs to be decrypted |
| `-o, --outpath <DEST_DIR>` | Destination directory path |
| `-k, --key <KEY_PATH>` | Path to the public key for encryption, or the path to the private key for decryption |
| `-p, --passphrase <PASSWORD>` | Password to decrypt the private key (only required when using a private key) |
keygen subcommand| Flag | Description |
|----------------------------------|--------------------------------------------------------------------------------------------------------------|
| `-o, --outpath <DEST_DIR>` | Destination directory path where the generated key pair will be written |
| `-p, --passphrase <PASSWORD>` | Passphrase to encrypt the generated private key |
| `-b, --bit-size <BIT_SIZE>` | Length of the key in bits for the key pair generation (default: `4096`) |
After installing Rust and Node.js (at least v.18),
navigate to the ferrocrypt-gui-tauri directory and run the following commands:
create-tauri-app utility:cargo install create-tauri-app
cargo install tauri-cli
npm install
cargo tauri build
The binary executable file of the GUI app will be generated in ferrocrypt-gui-tauri/src-tauri/target/release/
cargo tauri build --bundles dmg
The DMG image file of the GUI app will be generated in ferrocrypt-gui-tauri/src-tauri/target/release/bundle/dmg/
cargo tauri dev
After installing Rust, install the Dioxus CLI:
cargo-binstall:curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall dioxus-cli
Navigate to the ferrocrypt-gui-dioxus directory and run:
cargo build --release
The binary will be generated in target/release/ferrocrypt-gui-dioxus
dx serve
dx bundle
Drag and drop a file or folder into the app window, then select the encryption mode. When decrypting, the app auto-detects the mode.
Encrypt/decrypt using the same password. Choose a password, destination folder, and click "Encrypt". For large files, enable "Large files (low RAM usage)" to reduce memory consumption.
Ideal for secure data exchange. Encrypt using a public RSA key (PEM format), decrypt using the corresponding private key and password.
Select "Create key pair", enter a password to protect the private key, choose output folder, and generate RSA-4096 keys.