1
$\begingroup$

I am using AES with GCM and a colleague told me "Repeating a VCC with the same key and a different message reduces the security of the key." He did not have any additional detail to offer.

What he meant was since the encrypted VCC is in a fixed location in a packet, bad guys could intercept the messages and correlate the two messages, somehow making it easier to crack the message or key because the VCC was repeated. (I don't understand how bad guys would know if the VCC was repeated or not...)

My understanding is the VCC is there to prevent replay attacks, nothing more, nothing less. I understand they should not be repeated.

So my question is this: does repeating the VCC with a different message and the same key actually make it easier to crack the encryption key? If so, how?

$\endgroup$
5
  • 1
    $\begingroup$ What does VCC mean? I'm not sure if that is a common enough term to use without defining it. $\endgroup$
    – Ella Rose
    Nov 7, 2018 at 19:10
  • $\begingroup$ @EllaRose The VCC is a "Vehicle Command Count". It is just an incrementing number. The vehicle only accepts commands if the VCC is what is expected. Sort of like the sequence count in TCP. To understand the question without VCCs. Just imagine a field that is a known size and known location within a packet. Does repeating the same value in that field make it less secure? $\endgroup$
    – kmort
    Nov 7, 2018 at 19:16
  • 3
    $\begingroup$ We would need to know how the VCC is used; specifically if it is used as (input to) the IV of GCM or not. Please link to the specification. By the way, with AES the key is protected by the block cipher itself. However, that doesn't mean that the plaintext message is kept fully confidential, and that's the goal of encryption in the end. $\endgroup$
    – Maarten Bodewes
    Nov 7, 2018 at 19:28
  • $\begingroup$ My guess is that the VCC is used as the IV. If true, then your colleague is correct, you should never reuse a key/IV pair. With GCM the IV is a nonce, i.e. a number used only once. If used more than once then you leak information. $\endgroup$ Nov 7, 2018 at 20:52
  • $\begingroup$ @MaartenBodewes It is not used as part of the IV. Consider it part of the data to be encrypted. It just happens to be in every message at the same relative offset each time. It is in the first 16 bytes to be encrypted for each message. Sorry, I can't link to any spec for it. $\endgroup$
    – kmort
    Nov 7, 2018 at 20:54

1 Answer 1

5
$\begingroup$

Your colleague is wrong; assuming that the GCM nonces are generated correctly (that is, never repeats for the same key), there is no risk to GCM in repeating the VCC.

GCM has the property that, as long as you never repeat the nonce for the same key, GCM guarantees both the privacy and integrity of the encrypted plaintext (assuming that AES is a strong block cipher and that the AES key cannot be guessed). This remains true even if you repeat the same region (such as the VCC) for multiple plaintexts. Actually, the guarantee is even stronger; you could let the attacker choose the plaintexts for you to encrypt, and he still cannot learn either the AES key, or the plaintext for an encrypted message that he did not choose.

$\endgroup$
1
  • 2
    $\begingroup$ ... but note that a repeating VCC may indicate issues in other parts of the protocol. Even if GCM is secure, the protocol may not be secure. If it is secure or not depends on the protocol specifics. $\endgroup$
    – Maarten Bodewes
    Nov 7, 2018 at 22:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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