Could your time-based scheme be defeated by changing the system clock on the attacker computer?
Could your time-based scheme be defeated by changing the system clock on the attacker computer?
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.