i am thinking about building a public crypto service, yet at the same time, I am still quite new to crypto and therefore prone to snake-oil inventions I guess.

My plan is to build a website which allows encrypting a document for a certain time.

The current scheme I came up is as follows:

  • choose the time at which you want the document to be publicly available (e.g. 2 weeks from now).

  • locally on your computer create a password to be used to encrypt the document, based on the hash of the datetime-stamp for the release, plus an unique salt value (e.g. hash of document)

  • hash that encryption password in order to hide the original password and load the hash up to the website, along with the selected target date

  • the website starts a unique timer for you which generates passwords every second, based on the current datetime-stamp and the salt provided, then rehashes the resulting hash to see if it fits the specified hash for the encryption password

  • if so, the point in time for decryption has been attained

I am not happy about the scheme as I am looking for a perfect solution in that the server should not know anything specific about the password used to encrypt the document, as well as never produce it itself. Also, the encryption should stay secure even in the event of the server being compromised...

I am grateful for any feedback.

  • 4
    $\begingroup$ Welcome to Cryptography. Did you see Time capsule Cryptography $\endgroup$ – kelalaka Feb 20 at 11:23
  • 1
    $\begingroup$ Someone hacks the semi-honest web server and executes a massive search and finds earlier than the website. Keep the file with you and release when needed. $\endgroup$ – kelalaka Feb 20 at 11:26
  • $\begingroup$ I saw the time capsule cryptography post, yes, but I didn't want to rely on complexity for protection. $\endgroup$ – Glaze Feb 20 at 11:34
  • $\begingroup$ Keeping the file with me is not an option (also, I am generally speaking). Ideally, I'd like to encrypt the file and post it somewhere (e.g. a website). I would like to find something like an encrypt-and-forget scheme. And you are right, someone who compromises the server can reverse engineer the algorithm and obtain the secret salt to "let the clock run faster" by precomputing the hashes and finding the actual password before the selected time has come. $\endgroup$ – Glaze Feb 20 at 11:35
  • 2
    $\begingroup$ @Glaze So what's the point exactly? If you trust the server not to search for the key faster than you want, what's the point of the encryption? Just give the document to the server and tell it when to publish it. $\endgroup$ – Maeher Feb 20 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.