While studying X.509 certificates, I've found that

authentication is safer if I associate/combine one or more certificates with each signed message (certificate + signed message). The receiver of the message would like to validate the certificate using the public key of the Certificate Authority and, once he has found the public key of the sender inside the certificate, he would like to validate message's signature with this public key.

What I can't understand is: If I don't add the signature to the message, what could happen? Why it would be less safe?

  • Where did you find this info? – Diti Jun 15 '14 at 14:53

Assuming you wish to know what would happen if a message is sent without a digital signature attached with it.

A digital signature attached with a message allows the receiving party to validate the authenticity and integrity of data received.

If party A send a digitally signed message to party B

  1. Authenticity is when B can be sure that the message was sent by A and is not a forged one. Digital signature techniques involve the use of private key of the sender hence if the signature can be validated by using the sender's public key then one can deduce that it was actually signed by the sending party.

  2. Integrity is when B can make sure that the message sent by A was not altered on its path. The digital signature of a message is also dependent on the contents of the message (this is the major difference between normal signatures and digital signatures). This dependency is present because because a hash of the message is also taken while generating the digital signature. This ensures that if the content is altered the signature validation will fail.

It must be noted that in this scenario the confidentiality of the message sent from A to B is not protected as there is no data encryption used.

Hence if the message is sent without digital signatures the above mentioned properties will not be achieved.

you may wish to have a look at this answer for a better explanation of crypto concepts

  • So, just to do an example, if I don't put the digital signature, somebody would be able to alter my message, change the certificate and the receiver would never know it and he would still think he's talking to me? – MoreOver Jun 15 '14 at 15:05
  • If you are not using signatures there would be no certificate involved. Certificates help you validate the signature. – Shurmajee Jun 15 '14 at 15:09
  • In conclusion, the only reason I put a certificate, is to let the receiver verify my signature, otherwise, as there is no authenticity and integrity, the receiver can't have any certainty about who send the message and the original content of it. Right? – MoreOver Jun 15 '14 at 15:18
  • Yes,A certificate is a container for the public key which is used for validation as explained by Mr.Pornin. – Shurmajee Jun 15 '14 at 15:21

A certificate is public data; people keep showing them to each other. When you talk to a SSL server, one of the first things that the server does is to show his certificate. To anybody.

Thus, showing a certificate does not prove your identity. What matters is the private key. The private key is not in the certificate(*). By computing a signature, you demonstrate mastery of the private key, i.e. you show that you are yourself.

The certificate itself is a container for the public key. When I look at Google's certificate (the one they use for their servers), I can validate it (against CA's public keys) to gain some assurance about the certificate contents, which really amount to: "this public key is owned by that entity". I thus learn Google's public key. However, it does not tell me at all that whoever handed me that certificate is Google ! Everybody can obtain Google's certificate; you can even see it in your Web browser by merely connecting to their server. What tells me that I am indeed talking to Google's server is that the server appears to be able to produce a valid signature on a challenge I am sending to it; and I can verify that signature with Google's public key (and I know Google's public key thanks to the certificate). Being able to produce a valid signature requires knowledge of the private key -- in that case, Google's private key, which, as the name implies, is known to Google only.

(*) There is a considerable amount of confusion implied by some people who call "certificate" what really is the certificate AND the corresponding private key. Terminology sloppiness is unfortunately widespread.

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.