2

I have gone over:

I am new to cryptography and security. I am trying to understand the point of self-signed certificates.

I understand the point of certificates as a means to distribute the public keys where a trusted CA (issuer) "signs" (=>encrypts) the public key of the subject and the client that trusts this CA uses the public key of the issuer (CA) to decrypt (un-sign) the certificate and get the public key of the subject (server). I have understood this from Data Communication and Networking by Behrouz.A.Forouzan 4th.edition Page 987. enter image description here

Now, if my understanding is right, how do I extend this logic to a self-signed certificate! If the subject matches the issuer and the overall purpose for the client is to obtain the public key of the subject (server), how does the client decrypt (un-sign/open) the certificate using the public key of the issuer to get the public key of the subject as the public key of the issuer is the public key of the subject? How does the client get the public key of the subject (server) that it ultimately wants to establish an SSL session with?

The fact that this question has not been asked anywhere tells me that there must be something really basic that I have not understood. Please help me in understanding this.

  • 1
    The certificate is not encrypted, it is signed. That is, it has a huge block of plaintext, followed by a checksum that can only be generated from the private key, and can be verified from the public key. – Ghedipunk Jul 13 at 17:19
  • 1
    You use signing and encrypting as if they were synonyms. However, they are 2 different concepts. Also, the concept of "un-signing" does not exist. I guess that you mean signature verification. – lab9 Jul 13 at 17:19
  • I have uploaded a snap of why this was confusing me thus far..The text and the corresponding diagram from the book gives me a hint of encryption and signing being synonyms. – Sheel Pancholi Jul 13 at 17:26
  • 1
    That latest edit certainly helps to explain why you have the idea that you do.—That snippet is as technically correct and as useless as saying "A hard drive's head is read by its head." There is subtle jargon here that is best to ignore until you learn more. For now, forget that anyone equates signing to encrypting, unless you're doing the maths yourself. Signing is generating a snippet that goes at the end of your (otherwise fully plaintext) document, that can only be created by the private key, but that can be verified by the public key. – Ghedipunk Jul 13 at 17:30
  • Alright..thank you – Sheel Pancholi Jul 13 at 17:34
0

I believe the confusion is coming from some oversimplifications on the quoted diagram. Let me refer to what you have highlighted in red.

Asymmetric cryptography relies on a pair of keys:

  • private key, which is known only to the owner
  • public key, which the owner is free to distribute

Asymmetric keys can be used for signing/signature verification or encryption/decryption.

Signing

For signing, owner of the private key uses this key to sign the message. For signature verification, anyone with access to the message and the public key can use this key to verify the signature.

Encryption

For encryption, whoever has access to the public key can encrypt the message. Due to the nature of asymmetric cryptography, only the recipient, aka the person who owns the private key, will be able to decrypt it using their private key.

Conceptually, signing and decryption are similar in a sense that both use private key.

One thing worth pointing out is that signing and decryption are more closely aligned in the plain RSA meaning, where basic RSA is used as-is. Which I don't think is the case in modern software any more. More often you'll come across encryption schemes like RSA-OAEP or signing like RSA-PSS, which build on top of plain RSA to provide additional security. In which case saying that signing and decryption are the same, or signature verification and encryption are the same, is even more incorrect.

| improve this answer | |
  • "whoever has access to the public key can sign the message" s/sign/encrypt/ – Z.T. Jul 13 at 17:43
  • "Conceptually, signing and encryption are similar in a sense that both use private key." s/encryption/decryption/ – Z.T. Jul 13 at 17:43
  • Many thanks for pointing out cut&paste mistakes. I corrected the answer. – automatictester Jul 13 at 17:56

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.