# Cryptographic Time Lock

Status: |
Finished |

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.

#### How My Time Lock Concept Works

##### Pseudocode Steps To Create The Time Lock.

- 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”.
- 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.)
- 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

- Start by hashing one of the possible combinations for the lock and use the same salt that was used to create the lock.
- Then hash that first hash over and over in a loop until we reach the difficulty count. (For example, 10,000 times.)
- Take this hash and compare it to the copy of the combination hash we have.
- 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.*"I cannot give you the formula for success, but I can give you the formula for failure - which is: Try to please everybody." - Herbert Bayard Swope*