title: Digital certificates: What is the difference between encrypting and signing
body: <p>I am relatively new to PKI, certificates and all related stuff.</p>
  
  <p>As far as I understand in public-key cryptography one encrypt with a public key and decrypt with a private key. Only <strong>one</strong> private key can correspond to <strong>any</strong> public key but the opposite is not true. Is it correct? Or is it one to one mapping?</p>
  
  <p>So, the way digital signature works is that the content of a certificate is hashed and then "signed" with a private key. The signature is verified then with the corresponding public key.</p>
  
  <p>So, here is where I get confused. What is the difference between encrypting a message with a public key and signing a message digest with a private key?    </p>