# Can two different CA's/End Entities in different PKI's have the same asymmetric key pair?

Example: $X$ and $Y$ have the same asymmetric key pair. $X$ communicates with $A$ and gives it's PubKey to $A$.

So, $A$ has the PubKey of $X$ which also happens to be the PubKey/PrivKey of $Y$. Now intentionally or by chance, can $A$ intercept and read the signed messages of $Y$?

If this can happen, does this not make the PKI vulnerable?

• It is not really clear what you are asking. Can you edit to add more detail? – mikeazo Sep 18 '17 at 13:07
• "Can" is ambiguous: is that from the standpoint of having the PKI work (and then is that from a mathematical or security/legal standpoint?). Or are you asking if this can happen by chance/or accident? – fgrieu Sep 18 '17 at 13:16
• Sure, but what is the chance? – Dr_Bunsen Sep 18 '17 at 13:55
• Are the keypair in question used for encryption or signing? – DannyNiu Sep 19 '17 at 6:15
• what will be the case for each of these transactions i.e. signing and encryption? – Yash Sep 19 '17 at 6:33

## 1 Answer

If this can happen, does this not make the PKI vulnerable?

if by chance they tend to generate THE SAME key (p,q) and private parameter (d), indeed they could read/sign each other's messages

However - it is the same probability as with guessing any key - choosing a random value from the whole set, there's a small probability the chosen value will be the key. The keyspace (say 128 bit for symmetric / 2048 bit for assymetric keys) should be big enough that the probability is negligible.

Now A has the PuKey of X which also happens to be the PuKey/PrKey of Y

A shall have no access to the private key of Y. As it happens, that's not problem of PKI, that's problem of Y not protecting its key