I am not a cryptologist, just a cryptography user, so not sure if this is safe.

I want to sign a public key with its private key pair. Is it dangerous to share this signature result along with public key? (For example can this be used to reverse engineer the private key) Or are there anything I should be concerned about?

  • 1
    $\begingroup$ X.509 certificates are a public key with a signature (made by the private key of the CA), and HTTPS webservers (or any TLS servers) will happily give you their certificates, so that is definitively safe. $\endgroup$ – Patrick Mevzek Nov 7 '19 at 6:11

Signing the public key is safe.

The general assumption is that the adversary is allowed to ask any message that he knows to be signed, and that operation must not leak information about the private key (or otherwise generate a signature for a message that was not signed by the legitimate signer).

In this model, the adversary knows the public key (it's assumed to be public, after all), and he can submit that as something to be signed. Hence, if that signature leaks anything untoward, that shows that the signature algorithm is broken.

In practice, it can be seen not to matter; for any signature operation I've seen, you first hash the message to be signed (and perform the signature operation on the hash); this hashing operation would muck up any relation between the message and the public key, even if that were any issue.

| improve this answer | |

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.