Every time you log into your online banking account, enter a password on a website, or make an online purchase, you are relying on a protocol that scrambles your data so that nobody snooping on the network can read it. That protocol is HTTPS, and the technology working underneath it is called TLS (Transport Layer Security), the successor to the older SSL (Secure Sockets Layer).
This article explains, from first principles, which internet protocols facilitate encrypted data transmission, how they work, why they matter, and how to configure, test, and troubleshoot them using Linux, Cisco, and Python examples.
Table of Contents
- What Does “Encrypted Data Transmission” Mean?
- The Short Answer: HTTPS and TLS/SSL
- How Unencrypted HTTP Puts Data at Risk
- What Is TLS/SSL and How Does It Work?
- The TLS Handshake Explained Step by Step
- Other Protocols That Facilitate Encryption
- Symmetric vs. Asymmetric Encryption in TLS
- Comparison Table of Encrypted Protocols
- Real-World Examples
- Linux Examples
- Cisco Examples
- Python Example: A Simple TLS Client
- Best Practices
- Troubleshooting Common TLS/SSL Issues
- Conclusion
1. What Does “Encrypted Data Transmission” Mean?
When data travels across a network, it usually passes through multiple intermediate devices — routers, switches, and ISP equipment — that are not owned or controlled by either the sender or receiver. If that data is sent in plain text, anyone with access to those intermediate points (or anyone performing a man-in-the-middle attack) can read, capture, or even modify it.
Encryption solves this by transforming readable data (plaintext) into scrambled, unreadable data (ciphertext) using a mathematical algorithm and a secret key. Only someone with the correct key can reverse this process (decryption) and read the original data. Encrypted data transmission means this scrambling and unscrambling happens automatically as data travels across the internet, so it stays private and unreadable to anyone intercepting it in transit.
2. The Short Answer: HTTPS and TLS/SSL
The primary protocol responsible for transmitting encrypted data over the internet is HTTPS (HyperText Transfer Protocol Secure), which is simply the standard HTTP protocol running on top of TLS (Transport Layer Security), formerly known as SSL (Secure Sockets Layer).
- HTTP operates at the Application Layer (Layer 7) and handles web page requests/responses, but sends data in plaintext.
- TLS/SSL operates between the Application Layer and Transport Layer, adding a security layer that encrypts the data before it is handed off to TCP for transmission.
- HTTPS is the combination: HTTP requests and responses are encrypted using TLS before being sent over the network.
In short: TLS is the protocol that actually performs the encryption, and HTTPS is HTTP delivered securely using TLS.
3. How Unencrypted HTTP Puts Data at Risk
To understand why TLS matters, it helps to see what happens without it. When you visit a website over plain HTTP, all data — including any passwords, credit card numbers, or personal messages you submit — is sent as readable plaintext across every hop between your device and the server.
sequenceDiagram
participant User as Your Browser
participant Attacker as Attacker (on the network path)
participant Server as Website Server
User->>Attacker: HTTP Request (plaintext: username=alice&password=1234)
Attacker->>Server: Forwards request (can read/modify it)
Server->>Attacker: HTTP Response (plaintext)
Attacker->>User: Forwards response (can read/modify it)Anyone positioned on the network path — a malicious actor on public Wi-Fi, a compromised router, or an ISP — can capture this traffic using simple packet-sniffing tools and read the sensitive data directly. This is exactly the vulnerability that TLS/SSL and HTTPS were designed to eliminate.
4. What Is TLS/SSL and How Does It Work?
TLS (Transport Layer Security) is a cryptographic protocol that provides three critical security guarantees for data in transit:
- Confidentiality — Data is encrypted, so eavesdroppers cannot read it.
- Integrity — Data cannot be silently modified in transit without detection, using cryptographic checksums (MACs).
- Authentication — The client can verify it is really talking to the legitimate server (and optionally vice versa) using digital certificates issued by trusted Certificate Authorities (CAs).
TLS has evolved through several versions:
| Version | Status |
|---|---|
| SSL 2.0 / 3.0 | Deprecated, insecure, should never be used |
| TLS 1.0 / 1.1 | Deprecated by major browsers due to known weaknesses |
| TLS 1.2 | Widely used, secure when configured correctly |
| TLS 1.3 | Current standard, faster handshake, stronger default security |
5. The TLS Handshake Explained Step by Step
Before any encrypted data is sent, the client and server perform a TLS handshake to agree on encryption methods and exchange keys securely.
sequenceDiagram
participant Client as Client (Browser)
participant Server as Web Server
Client->>Server: ClientHello (supported TLS versions, cipher suites)
Server->>Client: ServerHello + Digital Certificate + Public Key
Client->>Client: Verify certificate with trusted CA
Client->>Server: Encrypted pre-master secret (using server's public key)
Server->>Server: Decrypt pre-master secret with private key
Client->>Server: Finished (encrypted using derived session key)
Server->>Client: Finished (encrypted using derived session key)
Note over Client,Server: Secure encrypted channel establishedStep-by-step breakdown:
- ClientHello: The browser tells the server which TLS versions and cipher suites (encryption algorithms) it supports.
- ServerHello + Certificate: The server responds with its chosen cipher suite and sends its digital certificate, which contains its public key and is signed by a trusted Certificate Authority (CA).
- Certificate Verification: The browser checks the certificate against a list of trusted CAs to confirm the server’s identity is genuine (this prevents impersonation attacks).
- Key Exchange: The client and server use asymmetric cryptography (or a key exchange algorithm like Diffie-Hellman) to securely agree on a shared session key without ever transmitting that key in plaintext.
- Symmetric Encryption Begins: Once both sides have the shared session key, all further communication is encrypted using fast symmetric encryption (like AES).
6. Other Protocols That Facilitate Encryption
While HTTPS/TLS is the most common answer, several other protocols also facilitate encrypted data transmission over the internet, each suited for different use cases.
- SSH (Secure Shell): Encrypts remote terminal sessions and file transfers between computers, commonly used for server administration.
- SFTP/FTPS: Secure variants of FTP for encrypted file transfers (SFTP runs over SSH; FTPS uses TLS).
- IPsec (Internet Protocol Security): Encrypts data at the Network Layer (Layer 3), commonly used to build secure VPN tunnels between sites.
- WireGuard / OpenVPN: Modern VPN protocols that encrypt all traffic between a client and a VPN server.
- DNS over HTTPS (DoH) / DNS over TLS (DoT): Encrypts DNS queries, preventing ISPs or attackers from seeing which websites you’re looking up.
- SMTPS/IMAPS/POP3S: Encrypted versions of email protocols that protect email content in transit.
7. Symmetric vs. Asymmetric Encryption in TLS
TLS uses a clever combination of two types of encryption to balance security and performance:
| Type | How It Works | Speed | Used For |
|---|---|---|---|
| Asymmetric Encryption | Uses a public key to encrypt and a different private key to decrypt | Slow | Initial handshake, key exchange, certificate verification |
| Symmetric Encryption | Uses the same shared key to encrypt and decrypt | Fast | Actual bulk data transfer after the handshake |
Asymmetric encryption (like RSA or Elliptic Curve Cryptography) is computationally expensive, so it’s only used briefly during the handshake to safely establish a shared secret. Once that shared secret (session key) is established, the much faster symmetric encryption (like AES-256) takes over for the actual data transmission.
8. Comparison Table of Encrypted Protocols
| Protocol | Layer | Purpose | Port |
|---|---|---|---|
| HTTPS (HTTP + TLS) | Application | Encrypted web browsing | 443 |
| SSH | Application | Encrypted remote login/file transfer | 22 |
| SFTP | Application (over SSH) | Encrypted file transfer | 22 |
| FTPS | Application (over TLS) | Encrypted file transfer | 990 (implicit) |
| IPsec | Network | Encrypted VPN tunnels | N/A (uses ESP/AH protocols) |
| DoT (DNS over TLS) | Application | Encrypted DNS queries | 853 |
| DoH (DNS over HTTPS) | Application | Encrypted DNS queries over HTTPS | 443 |
| SMTPS | Application | Encrypted email sending | 465 |
| IMAPS | Application | Encrypted email retrieval | 993 |
9. Real-World Examples
- Online banking: Uses HTTPS with strong TLS 1.3 encryption and Extended Validation (EV) certificates to protect financial transactions.
- Remote server administration: System administrators use SSH to securely log into Linux servers instead of unencrypted Telnet.
- Corporate VPN: Employees working remotely use IPsec or WireGuard VPNs to encrypt all their traffic back to the corporate network.
- Secure email: Gmail and most modern email providers use TLS to encrypt email in transit between mail servers.
- Private browsing: Privacy-conscious users enable DNS over HTTPS (DoH) in their browser settings to prevent their ISP from logging which websites they visit.
10. Linux Examples
Check the TLS certificate details of a website:
openssl s_client -connect example.com:443 -servername example.comCheck which TLS version a server supports:
openssl s_client -connect example.com:443 -tls1_3Test HTTPS connectivity with curl and view the negotiated TLS version:
curl -v https://example.com 2>&1 | grep -i "SSL connection"Generate a self-signed TLS certificate (for testing):
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodesConnect to a remote server securely using SSH:
ssh username@remote-server.example.com11. Cisco Examples
Cisco devices support IPsec VPNs for encrypting site-to-site traffic. Below is a simplified example of configuring an IPsec VPN tunnel on a Cisco router.
Step 1: Define the encryption policy (Phase 1 — IKE):
Router(config)# crypto isakmp policy 10
Router(config-isakmp)# encryption aes 256
Router(config-isakmp)# hash sha256
Router(config-isakmp)# authentication pre-share
Router(config-isakmp)# group 14
Router(config-isakmp)# exit
Router(config)# crypto isakmp key MySecretKey123 address 203.0.113.5Step 2: Define the encrypted transform set (Phase 2 — IPsec):
Router(config)# crypto ipsec transform-set MYSET esp-aes 256 esp-sha256-hmacStep 3: Apply the crypto map to the outgoing interface:
Router(config)# crypto map MYMAP 10 ipsec-isakmp
Router(config-crypto-map)# set peer 203.0.113.5
Router(config-crypto-map)# set transform-set MYSET
Router(config-crypto-map)# match address 100
Router(config-crypto-map)# exit
Router(config)# interface GigabitEthernet0/0
Router(config-if)# crypto map MYMAPThis configuration establishes an encrypted IPsec tunnel between two Cisco routers at different sites, ensuring all traffic passing between them is encrypted using AES-256.
12. Python Example: A Simple TLS Client
Python’s built-in ssl library makes it easy to demonstrate how a TLS-encrypted connection is established programmatically.
import socket
import ssl
hostname = "example.com"
port = 443
# Create a default SSL context that verifies the server's certificate
context = ssl.create_default_context()
with socket.create_connection((hostname, port)) as sock:
with context.wrap_socket(sock, server_hostname=hostname) as ssock:
print("TLS version negotiated:", ssock.version())
print("Cipher suite used:", ssock.cipher())
cert = ssock.getpeercert()
print("Server certificate subject:", cert.get("subject"))
Sample Output:
TLS version negotiated: TLSv1.3
Cipher suite used: ('TLS_AES_256_GCM_SHA384', 'TLSv1.3', 256)
Server certificate subject: ((('countryName', 'US'),), (('organizationName', 'Example, Inc.'),), (('commonName', 'example.com'),))This script connects to a real HTTPS server, performs a full TLS handshake, and prints out exactly which TLS version and cipher suite were negotiated — a practical way to see TLS in action.
13. Best Practices
- Always use TLS 1.2 or TLS 1.3 — disable support for outdated SSL 2.0/3.0 and TLS 1.0/1.1 on servers.
- Use certificates from trusted Certificate Authorities (e.g., Let’s Encrypt, DigiCert) and renew them before expiry.
- Enforce HTTPS everywhere using HTTP Strict Transport Security (HSTS) headers to prevent downgrade attacks.
- Disable weak cipher suites (e.g., RC4, DES) and prefer modern ones like AES-GCM and ChaCha20.
- Use SSH key-based authentication instead of passwords for remote server access.
- Encrypt DNS queries using DoH or DoT where privacy matters.
- Regularly scan your servers with tools like
testssl.shor Qualys SSL Labs to catch misconfigurations.
14. Troubleshooting Common TLS/SSL Issues
| Issue | Likely Cause | Fix |
|---|---|---|
| “Certificate expired” error | Server certificate wasn’t renewed | Renew certificate, automate renewal (e.g., Certbot) |
| “Certificate not trusted” | Self-signed or misconfigured certificate chain | Install proper intermediate certificates, use a trusted CA |
| Browser shows “Not Secure” | Site still uses HTTP instead of HTTPS | Redirect all HTTP traffic to HTTPS, enable HSTS |
| TLS handshake failure | Mismatched TLS versions/cipher suites between client and server | Update server TLS config to support modern versions |
| Slow HTTPS page loads | Inefficient TLS session resumption | Enable TLS session caching/tickets, use TLS 1.3 (0-RTT) |
Diagnosing a certificate issue on Linux:
openssl s_client -connect example.com:443 -showcerts | openssl x509 -noout -datesThis command shows the certificate’s validity dates (notBefore and notAfter), which is the first thing to check when troubleshooting expired-certificate errors.
15. Advanced Concepts: Perfect Forward Secrecy and Certificate Pinning
Perfect Forward Secrecy (PFS)
Perfect Forward Secrecy is a property of certain key exchange algorithms (like Ephemeral Diffie-Hellman, abbreviated DHE or ECDHE) that ensures each TLS session uses a unique, temporary key that is never reused and never stored long-term. The security benefit is significant: even if an attacker later steals a server’s private key, they cannot use it to decrypt previously captured encrypted traffic, because each past session’s key was ephemeral and is now permanently gone.
graph LR
Session1[Session 1: Unique Ephemeral Key] --> Discarded1[Key Discarded After Session]
Session2[Session 2: Unique Ephemeral Key] --> Discarded2[Key Discarded After Session]
ServerKey[Server's Long-Term Private Key] -.->|Used only to authenticate, not to derive session keys| Session1
ServerKey -.-> Session2
Modern TLS 1.3 mandates forward secrecy for every connection, which is one of the reasons it’s considered significantly more secure than TLS 1.2, where forward secrecy was optional and depended on the chosen cipher suite.
Certificate Pinning
Certificate pinning is a technique, often used in mobile apps, where an application is hardcoded to trust only a specific certificate or public key for a given server, rather than trusting any certificate signed by any recognized Certificate Authority. This defends against scenarios where an attacker manages to obtain a fraudulent but technically “valid” certificate (for example, through a compromised or coerced CA). The tradeoff is operational complexity: if the pinned certificate needs to be rotated, the application itself may need to be updated.
Mutual TLS (mTLS)
In standard TLS, only the server presents a certificate, and the client verifies it. Mutual TLS (mTLS) extends this so that the client also presents a certificate, which the server verifies. This is common in service-to-service communication within a microservices architecture or zero-trust network, where both parties need to cryptographically prove their identity before any data is exchanged.
16. Encrypted Data in Motion vs. Encrypted Data at Rest
It’s important to distinguish between two related but distinct concepts:
- Data in transit (in motion): Data actively traveling across a network — this is what TLS, IPsec, and SSH protect.
- Data at rest: Data stored on a disk, database, or backup medium — protected by technologies like full-disk encryption (BitLocker, LUKS) or database-level encryption, which are unrelated to network transmission protocols.
A common security mistake is assuming that because data is encrypted at rest, it doesn’t also need to be encrypted in transit, or vice versa. A robust security posture requires both: TLS/SSH ensures nobody can intercept the data mid-journey, while disk/database encryption ensures that even if physical storage media is stolen, the data remains unreadable.
17. Frequently Asked Questions
Is HTTPS completely unbreakable?
No security measure is absolute. HTTPS/TLS, when properly configured with modern protocol versions and strong cipher suites, is currently considered computationally infeasible to break through brute-force cryptanalysis. However, misconfiguration (weak ciphers, expired certificates, missing HSTS), social engineering, or compromise of an endpoint (rather than the encrypted channel itself) remain practical attack vectors that don’t require “breaking” TLS at all.
Why do some websites show a padlock but still feel insecure?
The padlock icon in a browser only confirms that the connection between your browser and that specific server is encrypted (TLS is active) — it says nothing about whether the website itself is trustworthy, whether it handles your data responsibly, or whether it might still contain malicious content. Encryption in transit and overall site trustworthiness are two separate concerns.
Does using a VPN make HTTPS unnecessary?
No. A VPN encrypts traffic between your device and the VPN provider’s server, but from the VPN server onward to the destination website, the traffic still needs its own encryption — typically HTTPS/TLS — to remain protected. Relying on a VPN alone does not replace the need for HTTPS on the sites you visit.
Can encrypted traffic still be analyzed by network administrators?
Yes, though not by reading its content. Techniques like traffic analysis can reveal metadata — packet sizes, timing patterns, destination IP addresses, and Server Name Indication (SNI) fields — even when the payload itself is fully encrypted. This is why some privacy-focused technologies, like Encrypted Client Hello (ECH) in TLS 1.3, aim to hide even the SNI field to reduce this kind of metadata leakage.
18. Conclusion
The protocol that facilitates the transmission of encrypted data over the internet is fundamentally TLS (Transport Layer Security), most commonly experienced through HTTPS for secure web browsing. TLS combines asymmetric encryption for a secure initial handshake with fast symmetric encryption for bulk data transfer, ensuring confidentiality, integrity, and authentication for virtually every sensitive interaction on the internet — from banking to messaging to remote server access. Alongside TLS, protocols like SSH, IPsec, and DNS over HTTPS extend encryption to other corners of network communication, together forming the backbone of a secure internet.
Whether you’re a beginner setting up your first web server or a professional auditing an enterprise network, understanding exactly which protocol handles encryption — and how it establishes trust before a single byte of real data is exchanged — is one of the most valuable pieces of networking knowledge you can carry forward into any security-conscious role.
