#encryption #tlock

tlock_age

Rust encryption library for hybrid time-lock encryption

5 releases

0.0.5 Feb 29, 2024
0.0.4 Aug 23, 2023
0.0.3 Jul 23, 2023
0.0.2 Mar 27, 2023
0.0.1 Mar 22, 2023

#1734 in Cryptography

Download history 2/week @ 2024-02-19 401/week @ 2024-02-26 81/week @ 2024-03-04 12/week @ 2024-03-11 4/week @ 2024-03-18 30/week @ 2024-04-01

52 downloads per month
Used in 2 crates

MIT license

55KB
756 lines

tlock_age: Hybrid Timelock Encryption/Decryption in Rust

Documentation License crates.io

tlock_age is a library to encrypt and decrypt age filekey using tlock scheme. It provides an age Identity and Recipient consuming Threshold BLS signatures provided by drand beacons.

The reference interroperable Go implementation is available at drand/tlock.

Tables of Content

Features

  • Timelock encryption and decryption in the age format
  • ASCII Armor
  • tlock header decryption
  • Encryption with public key on G1 and G2
  • Interroperability with Go and JS implementation
  • wasm32 compatible library

Installation

Environment CLI Command
Cargo (Rust 1.74+) cargo install tlock_age

The library is tested against the following targets: x86_64-unknown-linux-gnu, armv7-unknown-linux-gnueabihf, aarch64-unknown-linux-gnu, wasm32-wasi.

Usage

Code examples are provided in tlock_age/examples.

The tlock system relies on unchained drand networks.

This crate does not provide a drand client. You can use drand_core.

Security Considerations

This software has not been audited. Please use at your sole discretion. With this in mind, dee security relies on the following:

FAQ

How does practical timelock encryption work

For the simple explanation, you can use Handwaving Cryptography.

For a more detailed one, you should take time to read tlock: Practical Timelock Encryption from Threshold BLS by Nicolas Gailly, Kelsey Melissaris, and Yolan Romailler.

How can I use it from the command line

You need a client. Clients using tlock-rs are

License

This project is under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be MIT licensed as above, without any additional terms or conditions.

Dependencies

~14–22MB
~243K SLoC