0
$\begingroup$

I want to store two ciphertexts inside the same file. The data stored in each ciphertext is the same (except for padding), but the data was encrypted with different keys and IVs. Both ciphertexts were also generated by the same algorithm.

In this case specifically that would be a variant of AES, Chacha20 or Serpent.

In my scenario the attacker would know only that both ciphertexts hold the same data and the original data's length/size (with and without the padding) and then ofc also the padding's size.

He does not know what the plaintext/data looks like and he also does not know what the padding looks like.

Does this reduce the amount of power/time needed to crack the ciphertext? Are different keys +IVs and also different padding values/bytes (not length) enough to keep the data secure?

$\endgroup$

1 Answer 1

1
$\begingroup$

Yes, that should be secure as long as each algorithm is CPA-secure (as AES, Chacha20 and Serpent should be), and the keys are chosen independently and uniformly at random (different keys is not enough).

Does this reduce the amount of power/time needed to crack the ciphertext?

No compared to attacking the easier to attack of the two algorithms, assuming ability to recognize a correct plaintext (e.g. because it's quite redundant). In theory, for random unknown plaintext, it becomes possible to verify a correct guess of both keys, but that's not a practical issue.

I don't see much value in using different IVs and padding. IVs are here to allow key reuse, and repel multi-target attacks.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.