Say I create a certificate with some content and then sign it with my private key. Now, I decrypt the sign with a trusted CA's public key and somehow come up with content that can match the decrypted value and use this content to replace the initial content which was signed. I believe that to find such a content would be difficult because of hashing. But is it not at all possible ?

  • 4
    Essentially you are asking to find content for a hash, i.e. a preimage attack. Such an attack is not considered feasible against currently used hash algorithms. Jan 13, 2022 at 20:28

1 Answer 1


There are actually more attack vectors.

  1. As @SteffenUllrich said, preimage attack: An attacker can try to create a message that gives the same hash. If you use one of standard signature algorithms, this will be impossible.

  2. Another vector is to get the private key. If you use some "home grown" scheme with relatively small keys or some curve that is easy to brute-force, then it can be possible to brute-force the private key and thus to forge the signature. If you use an appropriate signature standard, brute-forcing will be impossible. But just keep in mind, that signature method with all its details should also be chosen carefully.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .