Network Security
1. Symmetric vs. Asymmetric Encryption
Encryption is the process of encoding data so it cannot be read without a specific key.
Symmetric
Uses a single, identical key for both encryption and decryption.
Pros: Very fast; ideal for large files.
Cons: "Key Exchange Problem"—how do you get the key to the recipient securely?
Asymmetric
Uses a mathematically linked pair of keys: a Public Key and a Private Key.
Pros: Solves the key exchange problem; no need to share private keys.
Cons: Computationally slow.
2. The Asymmetric Process (PKI)
- Public Key: Can be shared with anyone. Used to encrypt data.
- Private Key: Kept strictly secret by the owner. Used to decrypt data.
Example: If Alice wants to send a secret message to Bob, she encrypts it using Bob's Public Key. Only Bob's Private Key can unlock it. Even if Alice's own keys are stolen, the message remains safe.
3. SSL vs. TLS: The Distinction
| Feature | SSL (Secure Sockets Layer) | TLS (Transport Layer Security) |
|---|---|---|
| History | The older, original protocol. | The modern successor to SSL. |
| Security | Vulnerable to many modern attacks. | Stronger encryption and better authentication. |
| Handshake | Uses explicit port connections. | Implicit; can work over any port. |
Note: We still call them "SSL Certificates," but almost all modern websites actually use TLS 1.2 or 1.3.
4. The TLS Handshake (Detailed Process)
This is how your browser establishes a secure connection to a server (like e-consult.co.ke):
5. Digital Certificates
A Digital Certificate is an electronic "passport" issued by a trusted third party. It contains:
- The Public Key of the owner.
- The Name/Organization of the owner.
- The Digital Signature of the Certificate Authority (CA).
- The Expiry Date and Serial Number.
In an exam, remember that TLS uses Asymmetric encryption to securely exchange a key, and then switches to Symmetric encryption for the actual data transfer. This provides both security (from asymmetric) and speed (from symmetric).