Skip to content

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

License

Notifications You must be signed in to change notification settings

nulltea/tlock-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages