19 releases (11 breaking)

0.11.0 Nov 3, 2024
0.10.0 Feb 4, 2024
0.9.2 Jun 13, 2023
0.9.1 Mar 24, 2023
0.0.0 Oct 6, 2019

#110 in Cryptography

Download history 3177/week @ 2024-08-25 4251/week @ 2024-09-01 4352/week @ 2024-09-08 3519/week @ 2024-09-15 4209/week @ 2024-09-22 5388/week @ 2024-09-29 4073/week @ 2024-10-06 3967/week @ 2024-10-13 4744/week @ 2024-10-20 3059/week @ 2024-10-27 4146/week @ 2024-11-03 3746/week @ 2024-11-10 3032/week @ 2024-11-17 3100/week @ 2024-11-24 4951/week @ 2024-12-01 4962/week @ 2024-12-08

16,142 downloads per month
Used in 41 crates (24 directly)

MIT/Apache

1.5MB
9K SLoC

The age logo, an wireframe of St. Peters dome in Rome, with the text: age, file encryption

age Rust library

age is a simple, modern, and secure file encryption library. It features small explicit keys, no config options, and UNIX-style composability.

This crate provides a set of Rust APIs that can be used to build more complex tools based on the age format. The primary consumers of these APIs are the rage CLI tools, which provide straightforward encryption and decryption of files or streams (e.g. in shell scripts), as well as additional features such as mounting an encrypted archive.

The format specification is at age-encryption.org/v1. The age format was designed by @Benjojo and @FiloSottile.

The reference interoperable Go implementation is available at filippo.io/age.

Usage

Add this line to your Cargo.toml:

age = "0.11"

See the documentation for examples.

Feature flags

  • armor enables the age::armor module, which provides support for ASCII-armored age files.

  • async enables asynchronous APIs for encryption and decryption.

  • cli-common enables common helper functions for building age CLI tools.

  • ssh enables the age::ssh module, which allows for reusing existing SSH key files for age encryption.

  • web-sys enables calculating the work factor for passphrase encryption with the Performance timer via the web-sys crate, when compiling for a WebAssembly target such as wasm32-unknown-unknown. This feature is ignored for the wasm32-wasi target, which supports std::time::SystemTime.

  • unstable enables in-development functionality. Anything behind this feature flag has no stability or interoperability guarantees.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~8–21MB
~303K SLoC