hoheajaunn336
Basic
- Joined
- 19.02.22
- Messages
- 25
- Reaction score
- 2
- Points
- 3

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.

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.

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

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.


Raw data, file, or message.

Processes the input through a defined function.

Fixed-size, unique representation of the input.


• Part of the SHA-2 family.
• Produces a 256-bit hash.
• Commonly used in data integrity verification and cryptocurrency.

• 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.).


• One key for both encryption and decryption.
• Fast and efficient for large amounts of data.

• 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 systems combine symmetric and asymmetric encryption to optimize both performance and security.
How It Works
- Asymmetric Encryption
- Symmetric Encryption
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.

• 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.