Encryption vs Signing.

β€’1 min read

Encryption:Think of this as your native language

Only people who know your native language can understand the message.

Encryption process

Plaintext Message|Encryption with private key|Encrypted message-------------------------------------------Decryption process

Encrypted message|Decryption with public key|Plaintext Message

Only person with the key can read the message.

---------------x----------------x----------------------x-------**Signing:**Think of this as actual signature in your native language script at the end of actual message.

Like writing your name in your native language.

Only people who know your native language script can read your name and know that it's from you.

Signing process:

Plaintext Message|Calculate Hash of plaintext message|Encrypt calculated Hash with private key|Signature

This Signature gets appended at the end of original plaintext message and sent over.

-------------------------------------------Authentication process

Signature |Decryption with public key|Hash of plaintext message|Compare this with hash of original message(by calculating from the message recieved)

If they don't match that means authentication failed.

Please refer below images, hash is also know as digest

Enjoyed this article?

Subscribe to get the latest deep dives on Linux and Security delivered to your inbox.

Subscribe to Newsletter

Get the latest articles on Linux, cryptography, and security delivered to your inbox.

No spam, unsubscribe anytime.

Comments Coming Soon

We are building a privacy-focused, secure commenting system. Stay tuned!