Cryptographic Time Lock

Last Update: 11/14/2018
Download: Link

On a long drive I was thinking about time locks in banks and safes. Then I though how could someone make something like that digitally? You could not really rely on any clock because they could always be changed. So maybe the best option would be to rely on the amount of time it takes to find a hash. Kind of like how bitcoin works.

Time Lock Program

How My Time Lock Concept Works

Pseudocode Steps To Create The Time Lock.
  1. So I take some lock combination like 1234 and I hash it with a random salt. Let's say the salt is “timesalt”. So are combination string would look something like “1234timesalt”.
  2. To add difficulty and increase the time it will take to solve we can hash the hash in a loop. (For example, 10,000 times.)
  3. Store this hash, salt, and the loop count for later use and destroy the original copy of the combination
Pseudocode Steps To Solve The Time Lock
  1. Start by hashing one of the possible combinations for the lock and use the same salt that was used to create the lock.
  2. Then hash that first hash over and over in a loop until we reach the difficulty count. (For example, 10,000 times.)
  3. Take this hash and compare it to the copy of the combination hash we have.
  4. If they match then we have found the combination. If not then we move on to the next possible combinations.

Proof Of Concept

There are some down sides to this like no exact open time but I think it is a cool concept and I wanted to share! If you would like to play with the source code, you can download it here. I also have a blog post about it.
"Show me a thoroughly satisfied man and I will show you a failure." - Thomas Edison