Skip to content

nathanfarlow/timelock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

timelock

This tool encrypts files so that they can only be decrypted after an approximate amount of time. It uses the time lock puzzle written about here.

Usage

To encrypt

python3 timelock.py --num-squarings 1000000 encrypt example.png encrypted.enc

Set the --num-squarings parameter according to approximately how long you want the decryption to take. You can calculate this value by finding how many squarings per second your computer can calculate, and then multiplying by how many seconds you want the decryption to take. See benchmarking

To decrypt

python3 timelock.py decrypt encrypted.enc decrypted.png

Note that decryption in Python will take a long time compared to an optimized native program. In the future, the benchmarking program can be developed into a full decryption program.

About

Encrypt a message so that it is only available after some time

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published