Rust library for practical time-lock encryption using `drand` threshold network

Overview

tlock-rs: Practical Timelock Encryption/Decryption in Rust

This repo contains pure Rust implementation of drand/tlock scheme. It provides time-based encryption and decryption capabilities by relying on a drand threshold network and identity-based encryption (IBE). The IBE scheme implemented here is Boneh-Franklin.

Usage

The tlock system relies on an unchained drand network. Working endpoints to access it are, for now:

Lock file for given duration

cargo run -- lock -o test_lock.pem -d 30s test.txt

Lock file for drand round

cargo run -- lock -o test_lock.pem -r 1000 test.txt

Attempt unlocking file

cargo run -- unlock -o test_unlock.txt test_lock.pem

Error Too early will appear, if one tries to unlock a file before the specified round is reached.

Known issues

  • API currently supports 32 bytes of plaintext
  • Cross-library decryption hasn't been verified
You might also like...
An extensible and practical demonstration of constructing evm-based sandwich attacks built with ethers-rs and Huff language.
An extensible and practical demonstration of constructing evm-based sandwich attacks built with ethers-rs and Huff language.

subway-rs β€’ Construct evm-based sandwich attacks using Rust and Huff. Getting Started subway-rs is a port of libevm's original subway, implemented wit

A Password Manager Using age for Encryption

A Password Manager Using age for Encryption Contents Features Usage Install Import from pass How It Works Features It is inspired by pass. senior's fe

A simple command-line application to securely store secrets using encryption

rust-secret-vault A simple yet robust command-line tool designed to safely encrypt and store your sensitive information. Harnessing the power of AES-2

Audit Cargo.lock files for dependencies with security vulnerabilities

RustSec Crates πŸ¦€ πŸ›‘οΈ πŸ“¦ The RustSec Advisory Database is a repository of security advisories filed against Rust crates published via crates.io. The a

A contract to lock fungible tokens with a given vesting schedule including cliffs.

Fungible Token Lockup contract Features A reusable lockup contract for a select fungible token. Lockup schedule can be set as a list of checkpoints wi

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

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

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

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

Owner
Timofey
Researcher. Developer. Passionate about cryptography, distributed computing, self-hosting, and digital art
Timofey
Arkworks circuits for verifiable time-lock encryption

zk-timelock This repo contains arithmetic circuits for verifiable time-lock encryption made using arkworks-rs toolkit. For more details on such an enc

Timofey 68 Apr 5, 2023
Authenticated Encryption with Associated Data Algorithms: high-level encryption ciphers

RustCrypto: Authenticated Encryption with Associated Data (AEAD) Algorithms Collection of Authenticated Encryption with Associated Data (AEAD) algorit

Rust Crypto 457 Jan 4, 2023
A pure-Rust implementation of various threshold secret sharing schemes

Threshold Secret Sharing Efficient pure-Rust library for secret sharing, offering efficient share generation and reconstruction for both traditional S

Snips 137 Dec 29, 2022
πŸ”‘ Threshold Shamir's secret sharing in Rust

Rusty Secrets Rusty Secrets is an implementation of a threshold Shamir's secret sharing scheme. Documentation (latest) Documentation (master) Design g

Spin Research 233 Dec 17, 2022
Rust implementation of {t,n}-threshold ECDSA (elliptic curve digital signature algorithm).

Multi-party ECDSA This project is a Rust implementation of {t,n}-threshold ECDSA (elliptic curve digital signature algorithm). Threshold ECDSA include

[ZenGo X] 706 Jan 5, 2023
An ECDSA threshold signature algorithm implemented in Rust.

Open TSS This project is a Rust implementation of multi-party {t,n}-threshold signature scheme(TSS). The current version of this library supports ECDS

LatticeX Foundation 64 Dec 17, 2022
Multy-party threshold ECDSA Substrate node

Webb DKG ??️ The Webb DKG ??β€βœˆοΈ ⚠️ Beta Software ⚠️ Running the DKG Currently the easiest way to run the DKG is to use a 3-node local testnet using dk

webb 42 Dec 19, 2022
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
Baek-Zheng threshold cryptosystem on top of BLS12-381

bzte A rust implementation of the Baek-Zhang threshold cryptosystem on top of BLS12-381 using arkworks Why threshold encrypt? The advantage of thresho

null 4 Jun 28, 2022
Gentle reminders to commit when your inserts/deletes cross a threshold

DiffDing It's easy to get lost in what you're doing. Diff ding counts the changes in your repo and reminds you to commit your changes once you exceed

Trevor Coleman 4 Dec 2, 2022