1
$\begingroup$

Symmetric encryption: Does using the same key over and over again introduce a vulnerability?

Meaning, if I transmit a different piece of plaintext encrypted with the same key every day, will an attacker eventually be able to deduce the key? (In what lengths of time?)

$\endgroup$
2
$\begingroup$

It depends greatly on what form and mode of encryption you use.

For any stream cipher or a block cipher used in a psuedo-stream mode such as CTR or GCM then reusing a key/IV pair even once is absolutely fatal. Never, ever use a static key with them, and if you do, never, ever reuse an IV. They are strictly for one time use keys negotiated via a key exchange algorithm for a particular session.

For modes such as CBC key reuse isn't a big issue even if you accidentally use the same IV again. Re-using the same key/IV will let an attacker determine whether two messages have a common prefix, but won't inherently leak information leading to a breach of the key or plaintext.

So, if you are using temporary keys AND trust your random number generator to be secure and strong then the advantages of CTR or stream mode are compelling especially if speed/parallelization is a concern. If either of these are not the case, such as a pre-shared key or there is no good entropy source, or you don't benefit from the stream cipher characteristics then something like CBC is the way to go.

| improve this answer | |
$\endgroup$
1
$\begingroup$

In short, yes, key re-use will eventually lead to a growing vulnerability to a persistent and dedicated attacker over a very large data set.

Depending on what encryption method you are using, the details get a very complicated very quickly. I believe in a standard AES CBC implementation with a random IV a key change is recommended after 264 bytes of data. In CTR mode it is closer to 292 bytes of data.

In practice, for many applications you don't have to worry too much as 264 bytes is around 18,450,000 Terabytes. Depending on the situation, this could greatly exceed the lifespan of the application.

| improve this answer | |
$\endgroup$
1
$\begingroup$

No, an attacker won't be able to deduce the key over time, as the key is protected by the block cipher itself. Of course it is wise to stay within the bounds of key use specified for the unbroken block cipher.

It is good practice that you don't reuse the key for different purposes. So if your mode of operation or your protocol is vulnerable, your plaintext may not be protected against loss of confidentiality. In that case the fact that the key is still secret only offers small consolation.

| improve this answer | |
$\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.