Post

Symmetric/ Asymmetric key algorithm

Screenshot 2024-08-21 at 22 09 59

✅ Symmetric key algorithm

  1. A sends message encrypted with B’s public key
  2. B recieves and decrypts with B’s private key
  3. B sends message encrypted with A’s public key
  4. A recieves and decrypts with A’s private key
  • Private key encryption
  • Same key for encryption, decryption
  • 👍🏻 faster
  • 👎🏻 lack non-repudiation
  • 👎🏻 large scale use
  • 👎🏻 easy to decrypt

☑️ Symmetric algorithm

  • DES: Data Encryption Standard
  • 3DES
  • IDEA: International Data Encryption Algorithm
  • AES: Advanced Encryption Standard
  • Blowfish
  • Twofish
  • RC Cipher suite
    • RC4: Stream cipher, SSL, WEP(wired equivalent privacy)

✅ Asymmetric key algorithm

  • Public key encryption
  • different key for encryption and decryption
  • 👍🏻 solve key distribution challenge
  • 👎🏻 slower
  • ⭐️ public key: encryption
  • ⭐️ private key: decryption

  • asymmetric algrithm can be done in two ways

☑️ Asymmetric algorithm

  • Diffie-Hellman

    • key exchange over internet
    • VPN tunnel
    • IPSec
    • 👎🏻 on path attacks
    • 👎🏻 person-in-the-middle attacks
  • RSA

    • key exchange= key distribution
    • Encryption
    • Digital Signature
    • Prime numbers
    • Trapdoor function
  • ECC: Ellipic Curve Cryptography

    • modible device
    • require less processing power
    • more efficient that RSA

1️⃣ Encrypt: public key, decrypt: private key

Screenshot 2024-08-21 at 10 34 10

  • public key: encrypt
    • shared with everyone
  • private key: decrypt
    • only host can have the key

2️⃣ Encrypt: private key, decrypt: public key

Screenshot 2024-08-21 at 10 36 33

  • public key: decrypt
    • shared with everyone
  • private key: encrypt

    • only host can have the key
  • Digital Signature: used to verify oneself
    • that it is me who encrypted this file(who made the signature)
  • everyone with public key can verify that it is you who signed the file

✅ Hybrid Encryption

  1. A creates symmetric key
  2. A encrypts and sends symmetric key with B’s public key
  3. B recieves symmetric key and decrypts with B’s private key
  4. B sends message encrypted with A’s public key
  5. A recieves and decrypts with A’s private key
  6. Now A and B can communicate using the symmetric key

✅ Digital Signature

Screenshot 2024-08-21 at 10 57 58

  • Digital Signature is consisted of three algorithm steps
  • Key Creation Algorithm G: create public, private key pair of host
  • Signature Creation Algorithm S: message m and private key to create signature σ
  • Verify Signature Algorithm V: use message m, public key, signature σ to verify host

  • 👍🏻 can verify the host who wrote the message
  • 👍🏻 can function like a signature of the host
  • 👍🏻 non-repudiation
  • 👍🏻 operate against forgery
  • 👍🏻 data integrity(checksum will be different)

☑️ Digital Signature Algorithm

  • DSA: Digital Security Algorithrm
  • RSA
This post is licensed under CC BY 4.0 by the author.