35 releases

new 0.7.12 Apr 18, 2024
0.7.10 Feb 18, 2024
0.7.6 Dec 22, 2023
0.7.1 Nov 29, 2023
0.1.1 Nov 24, 2022

#813 in Command line utilities

Download history 10/week @ 2023-12-21 2/week @ 2024-01-04 10/week @ 2024-01-18 114/week @ 2024-02-15 36/week @ 2024-02-22 12/week @ 2024-02-29 329/week @ 2024-03-07 123/week @ 2024-03-14 6/week @ 2024-03-28 1/week @ 2024-04-04

158 downloads per month

GPL-3.0-or-later

96KB
2K SLoC

rscrypt

CI Version MSRV License

rscrypt (scryptenc-cli) is a command-line utility for encrypt and decrypt files.

This is a Rust implementation of scrypt(1).

Screenshot of rscrypt

Installation

From source

cargo install scryptenc-cli

If you want to enable optimizations such as LTO, set them using environment variables.

From binaries

The release page contains pre-built binaries for Linux, macOS and Windows.

How to build

Please see BUILD.adoc.

Usage

Basic usage

Encrypt a file:

rscrypt enc data.txt data.txt.scrypt

Decrypt a file:

rscrypt dec data.txt.scrypt data.txt

Provides information about the encryption parameters

Output as a human-readable string:

rscrypt info data.txt.scrypt

Output:

Parameters used: N = 1024; r = 8; p = 1;
    Decrypting this file requires at least 1 MiB of memory.

Output as JSON:

rscrypt info -j data.txt.scrypt | jq

Output:

{
  "N": 1024,
  "r": 8,
  "p": 1
}

Generate shell completion

--generate-completion option generates shell completions to stdout.

The following shells are supported:

  • bash
  • elvish
  • fish
  • nushell
  • powershell
  • zsh

Example:

rscrypt --generate-completion bash > rscrypt.bash

Command-line options

Please see the following:

Changelog

Please see CHANGELOG.adoc.

Contributing

Please see CONTRIBUTING.adoc.

Acknowledgment

This program is inspired by the scrypt encryption utility, and built on top of the scryptenc crate.

License

Copyright © 2022–2024 Shun Sakai (see AUTHORS.adoc)

  1. This program is distributed under the terms of the GNU General Public License v3.0 or later.
  2. Some files are distributed under the terms of the Creative Commons Attribution 4.0 International Public License.

This project is compliant with version 3.0 of the REUSE Specification. See copyright notices of individual files for more details on copyright and licensing information.

Dependencies

~7–38MB
~587K SLoC