I know that X.509 certificate signing process includes creating a CSR (certificate signing request) and then the following happens:
- Some data's from the certificate to be signed hash is computed using a hash-algorithm, i.e. SHA-256.
- The hash result is signed with the issuer's private key.
- The signature gets embedded to a client certificate.
However, it's still unclear to me what some data's from the certificate to be signed
"some data's from the certificate to be signed" and the signature
"the signature" are.
With my very basic knowledge of public-key cryptography, I'm aware that the public key is used for encryption and the private one for decryption. But in what regard is this related to creating a signature and verifying one?
For example, I can write the following code and get no exception since :
usrCer.verify(issuerCert.getPublicKey());
I comprehendunderstand that the signature from the usrCer
and the public key of issuerCert
are involved in the process, but could anyone please clue me in on what exactly happens in more detail?
My questions are:
- What is
some data's from the certificate to be signed
"some data's from the certificate to be signed" exactly? I found the following question on SA Which parts of the certificate are signed? but I would like to dig even deeper and take the 'parts' of certificate and sign them myself. (or at least check the hash) - What does the signature consist of? Is it just the public key of the signature creator and the encrypted data? Is the signature all about returning
true/false
for a given public key and the signature itself?