Symmetric, Asymmetric and Key Encryption

Symmetric, Asymmetric and Key Encryption

  • What is encryption?
  • How does encryption work?
  • What is Symmetric Key Encryption?
  • What is Asymmetric Key Encryption?
  • Difference Between Symmetric and Asymmetric Key Encryption?
  • What is Hybrid Encryption
  • What is Signatures

What is encryption?

Encryption is used to provide confidentiality, only intended recipient can interpret the message(data). Encryption requires the use of a cryptographic key: a set of mathematical values that both the sender and the recipient of an encrypted message agree on.

There are two types of key based encryption:

  1. symmetric encryption
  2. asymmetric encryption

How does encryption work?

Alice used an simple encryption algorithm to encode her plain text message "hello" to cipher text "llohe" to Bob. And Bob also know the algorithm to decode the cipher message "llohe" back to plain text message "hello".

The simple encryption comes with some problems. Although encrypted data appears random, encryption proceeds in a logical, predictable way, allowing a party that receives the encrypted data and possesses the right key to decrypt the data, turning it back into plaintext.Truly secure encryption will use keys complex enough that a third party is highly unlikely to decrypt or break the ciphertext by brute force — in other words, by guessing the key. 

What is Symmetric Key Encryption?

In Symmetric-key encryption the message is encrypted by using a key and the same key is used to decrypt the message which makes it easy to use but less secure. It also requires a safe method to transfer the key from one party to another.

What is Asymmetric Key Encryption?

Asymmetric key encryption is one of the most common cryptographic methods that involve using a single key and its pendent, where one key is used to encrypt data and the second one is used to decrypt an encrypted text. The second key is kept highly secret, while the first one which is called a public key can be freely distributed among the service’s users.

If need, watch this video Encryption -Symmetric Encryption vs Asymmetric Encryption - Cryptography to know how Symmetric and Asymmetric Encryption work.

Difference Between Symmetric and Asymmetric Key Encryption



Symmetric

Asymmetric

Key

Same key for encrypt and decrypt

Different keys for encrypt and decrypt (a pair of keys)

Strength

  • Fast- lower CPU cost

  • Cipher text is the same size as plain text

  • More secure- private key is never shared

Weakness

  • Less secure- secret key must be shared

  • Slower- requires much larger key sizes

  • Cipher text expansion

Ideal usages

For Bulk data

Restricted fo limited data

Encryption Algorithms Example

  • DES

  • RC4

  • 3DES

  • AES

  • chacha20

  • DSA

  • RSA

  • Diffie-Hellman

  • ECDSA

  • ECDH

What is Hybrid Encryption?


The Hybrid Encryption primitive combines the efficiency of symmetric encryption with the convenience of public key (asymmetric) cryptography.Anyone can encrypt data using the public key, but only users with the private key can decrypt the data.
A pair of asymmetric keys is generated – a public key and a private keyAlso a single symmetric key is generated for encrypting the data.The symmetric key used to encrypt the data is then encrypted using the recipient’s public key. This ensures that only the recipient, who possesses the corresponding private key, can decrypt the symmetric key.The actual data (plaintext) is encrypted using the symmetric key. This process is fast and suitable for encrypting large amounts of data.The encrypted data (ciphertext) and the encrypted symmetric key are sent to the recipient.The recipient uses their private key to decrypt the symmetric key.And the recipient then uses the decrypted symmetric key to decrypt the actual data.
  • Use Asymmetric Encryption to securely establish Symmetric Keys
  • Symmetric Keys can then be used with Symmetric Encryption to protect bulk data.

What is Signatures?

Signatures is a cryptographic method used to verify the authenticity and integrity of a message or document.

The original document is run through a mathematical algorithm to create a unique "fingerprint" called a hash.The signer uses their private key to encrypt this hash. This encrypted hash is the digital signature.The recipient uses the signer’s public key to decrypt the signature and recover the original hash.The recipient calculates a new hash of the received document. If the new hash matches the decrypted one, the document is authentic and untampered. Signatures can prove the document's integrity and authentication. 

Reference:

Comments