Advanced Search
Joined
19.02.22
Messages
25
Reaction score
2
Points
3


🔐 Encryption Part 2 Overview

In this section, we dive deeper into the concept of encryption, building on the basics from Chapter 1.

We’ll focus on hashing, its role in encryption, and explore hybrid cryptographic systems used in real-world applications like HTTPS and PGP.


🔎 What is Hashing?

Hashing is the process of converting data of any length into a fixed-length bit string through a hash function.

Key Terms

Hash Function / Digest Function: The algorithm that converts the data.

Input Array / Message / Key: The original data you want to hash.

Hash / Hash Code / Checksum / Message Digest: The result of the hashing process.

🧠 Remember:

Hashing always produces the same fixed-length output, no matter how big or small the input is.


🔐 Why is Hashing Important?

Hashing ensures data integrity.

If someone alters the original data, the hash will change, signaling that tampering has occurred.

Use Case

• When sending an encrypted message, a hash can be sent along with it.

• If the recipient generates their own hash and compares it to the original hash, they can confirm whether the message was altered or not.


⚙️ How Hashing Works

1️⃣ Input Data


Raw data, file, or message.

2️⃣ Hashing Algorithm

Processes the input through a defined function.

3️⃣ Hash Output

Fixed-size, unique representation of the input.


🔧 Popular Cryptographic Hash Functions

🔹 SHA-256


• Part of the SHA-2 family.

• Produces a 256-bit hash.

• Commonly used in data integrity verification and cryptocurrency.

🔹 MD5

• Older hash function, faster, but insecure.

• Vulnerable to hash collisions (two different inputs generating the same hash).

• Still used for non-critical applications (checksums, etc.).


🧩 Encryption Techniques

🔐 Symmetric Encryption


One key for both encryption and decryption.

• Fast and efficient for large amounts of data.

🔐 Asymmetric Encryption

• Uses two keys:

Public Key: Used to encrypt data.

Private Key: Used to decrypt data.

• More secure for key exchange, but slower for large data transfers.


🔗 Hybrid Cryptographic Systems

Hybrid systems combine symmetric and asymmetric encryption to optimize both performance and security.

How It Works

  1. Asymmetric Encryption
• Securely exchange a symmetric key.

  1. Symmetric Encryption
• Use the shared key for fast, secure data transmission.

Real-World Examples

HTTPS (SSL/TLS protocols):

• Asymmetric encryption during the handshake.

• Symmetric encryption for ongoing communication.

PGP (Pretty Good Privacy):

• Secure email encryption using hybrid methods.


✅ Key Takeaways

Hashing ensures integrity but is not the same as encryption.

• Use cryptographic hash functions like SHA-256 for security.

• Combine symmetric and asymmetric encryption in hybrid systems for optimal results.
 
Top Bottom