1
$\begingroup$

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?

$\endgroup$

1 Answer 1

0
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ What I have now found with practical data is that the collisions happen quite a lot as only 16 ^ 6 (i.e. 2 ^ 24 as you have mentioned) combinations are possible which is only 16 mill. For a large dataset that's too small and collisions will happen. $\endgroup$ Commented Apr 16 at 3:36

Your Answer

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

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