6.1 Data Security

Bulk view disabled for Guests. View lessons individually.

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):

1. Client Hello: Browser sends supported encryption versions and a random string.
2. Server Hello & Certificate: Server sends its Digital Certificate (containing its Public Key), signed by a Certificate Authority (CA).
3. Authentication: Browser verifies the certificate with the CA to ensure the server is legitimate.
4. Key Exchange: Browser generates a "Pre-master secret," encrypts it with the Server's Public Key, and sends it back.
5. Session Keys: Both sides use the secret to create identical Symmetric Session Keys. All further data is now encrypted symmetrically for speed.

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.
⚠️ AS-Level Focus: The "Hybrid" Nature of TLS

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