avatarrutbar

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1630

Abstract

urning plaintext into ciphertext.</li><li><b>Decryption</b>: Turning ciphertext back into plaintext.</li></ul><p id="92e2"><b>Questions and Answers</b></p><ol><li>What do you call the encrypted plaintext?</li></ol><ul><li>ciphertext</li></ul><ol><li>What do you call the process that returns the plaintext?</li></ol><ul><li>decryption</li></ul><p id="2b02"><b>Historical Ciphers</b></p><p id="fffd">Cryptography has ancient roots, with simple ciphers like the Caesar Cipher, which shifts each letter by a set number. For example, shifting <b>TRYHACKME</b> by a key of 3 results in <b>WUBKDFNPH</b>. To decrypt, reverse the shift by the same key. This simplicity, however, makes it vulnerable to brute-force attacks since there are only 25 possible keys in the English alphabet.</p><p id="64ed">Other notable historical ciphers:</p><ul><li><b>Vigenère cipher</b> (16th century)</li><li><b>Enigma machine</b> (WWII)</li><li><b>One-time pad</b> (Cold War)</li></ul><p id="4041"><b>Questions and Answers</b></p><ol><li>Knowing that XRPCTCRGNEI was encrypted using Caesar Cipher, what is the original plaintext?</li></ol><ul><li>ICANENCRYPT</li></ul><p id="d8c6"><b>Types of Encryption</b></p><p id="be99">There are two main encryption types: symmetric and asymmetric.</p><ol><li><b>Symmetric Encryption</b>: Uses the same key for both encryption and decryption. Keeping this key secure is crucial as it is shared with intended recipients. Examples include DES, 3DES, and AES.</li></ol><ul><li><b>DES</b>: A 56-bit key, now insecure as it was cracked in under 24 hours in 1999.</li><li><b>3DES</b>: An extension of DES, using a 168-bit

Options

key (effective security of 112 bits); deprecated in 2019.</li><li><b>AES</b>: Adopted in 2001, with key sizes of 128, 192, or 256 bits; the current standard.</li></ul><ol><li><b>Asymmetric Encryption</b>: Uses two keys — public for encryption and private for decryption. Asymmetric encryption includes RSA, Diffie-Hellman, and ECC, where ECC achieves strong security with shorter keys. This type is based on problems that are easy to compute in one direction but hard to reverse, ensuring long-term security.</li></ol><p id="da29"><b>Questions and Answers</b></p><ol><li>Should you trust DES? (Yea/Nay)</li></ol><ul><li>Nay</li></ul><ol><li>When was AES adopted as an encryption standard?</li></ol><ul><li>2001</li></ul><p id="6051"><b>Basic Math</b></p><p id="6070">Cryptography relies on math, especially XOR and modulo operations.</p><ol><li><b>XOR Operation</b>: XOR (exclusive OR) compares binary bits; it returns 1 if bits differ, 0 if they’re the same. XOR is useful in cryptography due to properties like A ⊕ A = 0 and A ⊕ 0 = A. For encryption, XOR can be applied to plaintext and a key to produce ciphertext, and the original text can be recovered by XORing the ciphertext with the key again.</li><li><b>Modulo Operation</b>: The modulo (X%Y) gives the remainder of dividing X by Y. It’s commonly used in cryptographic algorithms. The result of X%Y is always between 0 and Y-1.</li></ol><p id="f744"><b>Questions and Answers</b></p><ol><li>What’s 1001 ⊕ 1010?</li></ol><ul><li>0011</li></ul><ol><li>What’s 118613842%9091?</li></ol><ul><li>3565</li></ul><ol><li>What’s 60%12?</li></ol><ul><li>0</li></ul></article></body>

TryHackMe — Cryptography Basics | Cyber Security 101 (THM)

Importance of Cryptography

Cryptography ensures secure communication, maintaining data confidentiality, integrity, and authenticity in the presence of adversaries. You rely on cryptography daily:

  • Login: Your credentials are encrypted, preventing unauthorized access.
  • SSH: Encrypted tunnels protect your session from eavesdropping.
  • Online Banking: Cryptography verifies the server’s authenticity.
  • Downloads: Hash functions check file integrity.

Cryptography is fundamental for standards like PCI DSS for credit card data and HIPAA/GDPR for medical records, establishing necessary security without direct user interaction.

Questions and Answers

  1. What is the standard required for handling credit card information?
  • PCI DSS

Plaintext to Ciphertext

Plaintext is readable data, like text or images, before encryption. Using a cipher (encryption algorithm) and a key, plaintext is transformed into ciphertext, the unreadable, scrambled output. To revert it back to plaintext, we pass the ciphertext and key through the decryption process.

Key terms:

  • Plaintext: Original, readable data.
  • Ciphertext: Encrypted, unreadable data.
  • Cipher: Algorithm for encryption and decryption.
  • Key: Secret bit sequence used with the cipher.
  • Encryption: Turning plaintext into ciphertext.
  • Decryption: Turning ciphertext back into plaintext.

Questions and Answers

  1. What do you call the encrypted plaintext?
  • ciphertext
  1. What do you call the process that returns the plaintext?
  • decryption

Historical Ciphers

Cryptography has ancient roots, with simple ciphers like the Caesar Cipher, which shifts each letter by a set number. For example, shifting TRYHACKME by a key of 3 results in WUBKDFNPH. To decrypt, reverse the shift by the same key. This simplicity, however, makes it vulnerable to brute-force attacks since there are only 25 possible keys in the English alphabet.

Other notable historical ciphers:

  • Vigenère cipher (16th century)
  • Enigma machine (WWII)
  • One-time pad (Cold War)

Questions and Answers

  1. Knowing that XRPCTCRGNEI was encrypted using Caesar Cipher, what is the original plaintext?
  • ICANENCRYPT

Types of Encryption

There are two main encryption types: symmetric and asymmetric.

  1. Symmetric Encryption: Uses the same key for both encryption and decryption. Keeping this key secure is crucial as it is shared with intended recipients. Examples include DES, 3DES, and AES.
  • DES: A 56-bit key, now insecure as it was cracked in under 24 hours in 1999.
  • 3DES: An extension of DES, using a 168-bit key (effective security of 112 bits); deprecated in 2019.
  • AES: Adopted in 2001, with key sizes of 128, 192, or 256 bits; the current standard.
  1. Asymmetric Encryption: Uses two keys — public for encryption and private for decryption. Asymmetric encryption includes RSA, Diffie-Hellman, and ECC, where ECC achieves strong security with shorter keys. This type is based on problems that are easy to compute in one direction but hard to reverse, ensuring long-term security.

Questions and Answers

  1. Should you trust DES? (Yea/Nay)
  • Nay
  1. When was AES adopted as an encryption standard?
  • 2001

Basic Math

Cryptography relies on math, especially XOR and modulo operations.

  1. XOR Operation: XOR (exclusive OR) compares binary bits; it returns 1 if bits differ, 0 if they’re the same. XOR is useful in cryptography due to properties like A ⊕ A = 0 and A ⊕ 0 = A. For encryption, XOR can be applied to plaintext and a key to produce ciphertext, and the original text can be recovered by XORing the ciphertext with the key again.
  2. Modulo Operation: The modulo (X%Y) gives the remainder of dividing X by Y. It’s commonly used in cryptographic algorithms. The result of X%Y is always between 0 and Y-1.

Questions and Answers

  1. What’s 1001 ⊕ 1010?
  • 0011
  1. What’s 118613842%9091?
  • 3565
  1. What’s 60%12?
  • 0
Tryhackme
Tryhackme Walkthrough
Tryhackme Writeup
Recommended from ReadMedium