Basic Cryptography
What is Cryptography?
Cryptography is the science of securing information by transforming it into a form that is unreadable to unauthorized users.
It ensures that information is:
- Confidential – only intended recipients can read it
- Authentic – sender’s identity is verified
- Intact – data is not altered during transmission
Goals of Cryptography
Cryptography is used to achieve:
- Confidentiality – Keeping data secret using encryption.
- Integrity – Ensuring data is not tampered with (using hashes, checksums).
- Authentication – Verifying the identity of sender/receiver.
- Non-repudiation – Preventing the sender from denying the action.
Key Terminology
| Term |
Definition |
| Plaintext |
Original readable data or message |
| Ciphertext |
Encrypted, unreadable data |
| Encryption |
Converting plaintext into ciphertext |
| Decryption |
Converting ciphertext back to plaintext |
| Key |
Secret value used for encryption/decryption |
| Cryptanalysis |
The art of breaking or analyzing cryptographic systems |
Types of Cryptography
1. Symmetric Key Cryptography (Private Key)
- Same key is used for encryption and decryption.
- Faster but key distribution is a challenge.
Examples:
- AES (Advanced Encryption Standard)
- DES (Data Encryption Standard)
- 3DES (Triple DES)
Use Cases:
- File encryption, secure storage, internal communications
2. Asymmetric Key Cryptography (Public Key)
- Uses a pair of keys: public key (encrypt) and private key (decrypt).
- Solves the key distribution problem but slower than symmetric encryption.
Examples:
- RSA (Rivest–Shamir–Adleman)
- ECC (Elliptic Curve Cryptography)
- Diffie-Hellman (key exchange protocol)
Use Cases:
- Digital signatures, secure email, online banking
3. Hash Functions
- Converts data into a fixed-length value (hash).
- Cannot be reversed (one-way function).
- Used for data integrity verification.
Examples:
- MD5 (deprecated for security reasons)
- SHA-1, SHA-256
Use Cases:
- Password storage, digital signatures, file integrity checks
Basic Cryptography Operations
-
Encryption:
Ciphertext = Encryption(Plaintext, Key)
-
Decryption:
Plaintext = Decryption(Ciphertext, Key)
-
Hashing:
Hash = HashFunction(Data)
-
Digital Signatures:
- Sender signs the message with private key
- Receiver verifies signature using sender’s public key
Applications of Cryptography
- Secure online transactions (HTTPS/SSL)
- Digital payments and banking
- Password protection
- Secure email (PGP, S/MIME)
- VPNs and network security
- Blockchain and cryptocurrency
Conclusion
Cryptography is the backbone of modern cybersecurity. By using encryption, hashing, and digital signatures, organizations and individuals can protect sensitive information, ensure authenticity, and maintain trust in digital communications.