I assume that you say this is to find a way to change the cryptographic key used in your algorithm periodically, so that even if the key is found, then only the data encrypted with this key can be decrypted? If we donβt worry about the startup process, one way to do this is to encode part (but not all) of your subsequent keys in the data set encrypted with one key, and when switching keys, encrypt the other part of subsequent keys with a new key.
For example, let's say that your keys are 8 elements wide (where the element can be a byte or a 32-bit word or something else), and we will call the keys you use to encrypt any given data block as Kn, where ' n 'is a block of data encrypted with this key. We will index key elements by saying Kn [0] for the 1st element, up to Kn [7] for the 8th. We will also call this data block Dn. Then the plaintext Dn will include Kn + 1 [0], Kn + 2 [1], Kn + 3 [2], ..., Kn + 8 [7]. If you could decrypt Dn-7 .. Dn, then you completely restored Kn + 1, then to decrypt the next data block, etc. You need to get plaintext for several blocks in a sequence before you can reliably decrypt the rest of the data, although getting plaintext for any given block will make it easier to attack the remainder keys.
Initial setup is a more complicated problem. SSL would be a good way to distribute K0, K1 [1..7], K2 [2..7], ..., K7 [7].
I'm not a professional cryptographer, so I'm not quite sure how safe this is. This algorithm is offered to you by AS IS, without any warranty.
source share