Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Time is a finicky concept with computers.

Could your time-based scheme be defeated by changing the system clock on the attacker computer?



As I explained above, time is not used in the decryption at all. You use a timer to set expiry for the masterkeyphrase. For eg: If I want to encrypt all personal communication with my family, I could use a single master key phrase for the year 2022 (for all personal correspondence). The UI could prompt me when the new year arrives to reset the master keyphrase. There would still be the file level data encryption key phrase.

In the following [] denotes a byte sequence and | denotes concatenation of two byte sequences and +/-> denotes a transformation.

Encryption

[correspondence] -> [masterkey encrypted datakey|datakey encrypted data]

Normal Decryption

[masterkey encrypted datakey|datakey encrypted data] + [datakey] -> [correspondence]

Key recovery (datakey lost/forgotten)

[masterkey encrypted datakey|datakey encrypted data] + [masterkey] -> [datakey]

Once the datakey is recovered, the encrypted data can be read.

We use keyrecovery as a backup.

We don't need to worry about clock accuracy for this as the timeframe we are talking about is in the order of days or months.

For added security you can use a different keyderivation/encryption method for the masterkey and even a different encryption method. For eg: You could use RSA to encrypt the datakey while you use AES for the data.

I hope this clarifies.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: