Encryption & Protocols
Data ko scramble karna taaki sirf sahi log padhein — internet ki neev
Plaintext ko ciphertext mein convert karna using an algorithm aur key. Bina key ke — garbage. Key ke saath — original data. Two types: Symmetric (same key) aur Asymmetric (public/private key pair).
Symmetric: AES — same key encrypt aur decrypt karne ke liye. Fast.
Asymmetric: RSA — public key se encrypt, private key se decrypt. Slower but more secure.
Tumhara diary mein secret language likhna — sirf tumhe pata hai "cat = 7, dog = 9". Key yaad ho to padhlo, nahi to gibberish. Encryption exactly aise, par mathematically unbreakable.
Message sirf sender ke device pe encrypt hota hai aur sirf receiver ke device pe decrypt hota hai. Server bhi nahi padh sakta — even WhatsApp apne messages nahi padh sakta.
WhatsApp (Signal Protocol), Signal, iMessage (when blue), Telegram (Secret Chats only — normal chats E2EE nahi hain!). Regular email E2EE nahi hai.
Encrypts
(Server sees 🔒)
Decrypts
US government approved symmetric encryption algorithm. AES-128, AES-192, AES-256 (key size). AES-256 is unbreakable with today's computers — even supercomputer billions of years lagenge.
Wi-Fi (WPA2), HTTPS, file encryption, banking, WhatsApp messages, disk encryption (BitLocker, FileVault). Tum daily AES use karte ho without knowing.
Public key pairs, digital certificates, Certificate Authorities (CA) ka poora framework. Identity verify karta hai online — kaisa pata chale ki google.com actually Google hai aur fake site nahi?
CA (Certificate Authority): Trusted issuer (DigiCert, Let's Encrypt)
Digital Certificate: Identity proof
CRL: Revoked certificates ki list
Electronic document jo ek entity ki identity prove karta hai aur unki public key contain karta hai. CA (Certificate Authority) issue karta hai. Browser ka padlock icon yahi hai.
Owner name, public key, issuing CA, validity dates, domain name, CA's digital signature (tamper proof).
Passport jaisa. Government (CA) ne issue kiya, tumhara photo aur details hain (public key), expiry date hai, aur tamper-proof features hain. Bank ne passport dekha → trust kiya.
Apni private key se document ko "sign" karna. Koi bhi tumhari public key se verify kar sakta hai ki document tumne hi sign kiya aur modify nahi hua. Non-repudiation provide karta hai.
1. Document ka hash generate karo
2. Private key se hash encrypt karo (= signature)
3. Receiver: same hash generate karo, public key se signature decrypt karo, match karo
Secure communication protocol jo browser aur server ke beech encrypted connection establish karta hai. Ab technically deprecated hai — TLS use hota hai, par "SSL" term abhi bhi common hai.
SSL 2.0 (1995) → SSL 3.0 → TLS 1.0 → TLS 1.1 → TLS 1.2 → TLS 1.3 (current). SSL 3.0 mein POODLE vulnerability thi isliye abandon kiya gaya.
Current secure communication protocol. Jab tum HTTPS use karte ho, actually TLS run ho raha hai. Encryption, authentication, integrity — teeno provide karta hai.
1. Client: "Hello, I support TLS 1.3"
2. Server: "OK, here's my certificate"
3. Key exchange
4. Encrypted communication begins
HTTP (web protocol) + TLS (encryption) = HTTPS. Browser ka padlock icon = HTTPS. Data encrypted hai transit mein — MITM attacker garbled text hi dekhega.
HTTPS = secure site NAHI. Sirf matlab hai connection encrypted hai. Fake phishing sites bhi HTTPS use karti hain. Padlock ≠trustworthy website.
Remote server ko securely access karna command line se. Web developers, system admins daily use karte hain. Telnet (unencrypted predecessor) ko replace kiya 1995 mein.
Password ke alawa SSH keys use kar sakte ho — more secure. Public key server pe, private key tumhare paas. Brute force practically impossible.