Cybersecurity

Cybersecurity Awareness: A Developer's Perspective

Understanding threats, building safer habits, and developing secure apps.

Cybersecurity Awareness: A Developer's PerspectiveView only
ABOUT THIS TOPIC

Cybersecurity

Understanding threats, building safer habits, and developing secure apps.

  • Cryptographic Hashing vs. Two-Way Encryption
  • The Avalanche Effect & Diffusion
  • Defense in Depth & Session Isolation
KEY TAKEAWAYS & NOTES

Key takeaways

01

Cryptographic Hashing vs. Two-Way Encryption

Hashes are one-way mathematical transformations. While encryption allows plaintext recovery with a private key, a hash digest can never be reversed algebraically. Use hashes for credential validation and data integrity checks.

02

The Avalanche Effect & Diffusion

In secure hash algorithms like SHA-256, changing even a single bit of input flips approximately half of the output bits randomly. This property ensures an adversary cannot deduce how close a guess is to the actual password.

03

Defense in Depth & Session Isolation

Never rely on a single defensive layer. Use HttpOnly session cookies to guard against XSS token theft, strict SameSite policies to prevent CSRF, and sliding-window rate limiters to deflect automated credential stuffing.

TAKE IT WITH YOU

Download PDF notes.

Enter your details to download the notes and subscribe to my newsletter.

Labs

Better on bigger screen

Choose an experiment

LAB 01 / THE PASSWORD BLENDER

The Password Blender (SHA-256 Hashing)

Think of cryptographic hashing like a one-way digital blender. You put any word in, and it gets chopped into an unreadable 64-character code. Notice how changing even a single letter completely scrambles the output.

Blended Output (SHA-256):Computing...
Blended Output (SHA-256):Computing...

Websites add random characters to passwords so that even if two users have the same password, their stored hashes look completely different.

0 / 256Bits Flipped
0.0%Avalanche Effect (Target: ~50%)
One-WayCannot Be Unblended
WHERE DID THE CODE CHANGE?

Blue blocks highlight where the two scrambled outputs differ. Changing just 1 letter flips half the code!