1

I am trying to check KCVs of a few keys.

I am generating the KCV for the keys using the method mentioned here https://crypto.stackexchange.com/a/11873/115990

Question: Can KCVs of two different AES keys be the same? It's a hash but we take only the first 3 bytes so there is a chance right in case there are millions of keys?

humbleCoder
  • 113
  • 3

1 Answers1

0

Yes, there are many keys with the same KCV value. To be precise, there are $2^{24}$ possible KCV values. This means collisions are unlikely to occur by chance unless you generate $2^{12}$ or so (a few thousand) keys, but could easily be constructed maliciously.

Daniel S
  • 29,316
  • 1
  • 33
  • 73