0
$\begingroup$

This is a very newbie question.

SSL Pinning is "safe" in assumption that only the real server can decrypt the public key. By design, it should be almost impossible to find the private key from the public key. However, is it relatively easy to create a new certificate (private key) that generates the "same" public key which the SSL Pinning trusts?

In order words, how hard is to create a new private key that generates the public key "I want".

For example, if I want to create a new certificate which the public key is: sha256/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=

Can I easily do that?

$\endgroup$
1
$\begingroup$

It's astonishingly difficult.

  • With RSA, it's literally a mathematical impossibility.

  • With Weierstrass, Montgomery and Edwards elliptic curves, the possibility of generating the same public key from different private key should be impossible assuming the private key scalar value doesn't overflow the order of the generator of the group.

  • With Hash-based digital signatures, this may be possible, because the public key is the tree hash of many one-time hash signature public keys. But still, finding such public key collision is as difficult as finding any regular hash collision. (not to mention real-world hash signatures often use randomized hashing).

  • Lattice-based schemes have the mathematical possibility of generating colliding public keys if the public component reduces the dimension of the private component, but that's very improbable. However, it should be noted, even the public component are randomly generated in most candidate schemes in NIST Post-Quantum Cryptography Project.

$\endgroup$
0
$\begingroup$

With what we know today, there is no practical way to determine the private key that corresponds to a given public key for any widely use public key system. If there was a way to do that then public key crypto wouldn't be secure.

$\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.