Post
Topic
Board Development & Technical Discussion
Re: Using Bitcoin as a time capsule?
by
ltcltcltc
on 20/12/2023, 22:04:20 UTC
I created BTCapsule about a year ago, and it might not be exactly what you’re looking for, but maybe it will be helpful.

At first, BTCapsule used the Network Time Protocol (NTP), and when a certain date was met, the information would decrypt. However, I discovered I could trick my computer into thinking it was getting the time from Google while I’m offline.

I think this is the main problem about time locking, the program needs to read the time from somewhere, and if you use the time direct from your system or you can get it from a web page, but both ways can get rigged, you can change your time on the PC or create a site on your local host to provide some date from the future.

On linux you can use the UNIX date:

Code:
date +%s
1357004952

Knowing that you can create a simple script:

Code:
if $(date +%s) < 1357004952; then echo("YourPrivateKey"); fi;

To encrypt the script you only put the text on a file and save it as capsule.sh, then use shc.

Code:
shc -f capsule.sh

Now you can delete the capsule.sh file an run the script with the .x file.

Code:
./capsule.sh.x

Just wanted to share my way to OP, maybe you can get some ideas from here for the next version of your software.

By the way, shc let us prunt an expiration message, that's another easy way to get the private key even with an empty script :p

Code:
shc -e <date> -m <message> -f <script_name>


Yeah, good but that's easy to rev engineer. Decompiling that code should be straightforward. @garlonicon link is so accurate, thanks! And @BTCapsule: it's cool that someone else thought the same thing as me. Cognitive convergence...