Everything you should know about Transport Layer Security (TLS)



Ever noticed that little lock icon 🔒 next to a website URL or the difference between http:// and https://?Those extra letters and that lock mean your connection is protected by a security layer known as TLS (previously called SSL).

But what exactly does TLS do? And how does it make your data safe while you browse, log in, or shop online?

Let's find out 👇

Fig 1:  An image of lock icon depicting secure web connection

When Data Travels Without TLS — The Insecure Web

Let’s start with a world without security layers.

When an application uses the HTTP protocol, it sends and receives data as plain text what we call HTTP requests and responses.

Every time you submit a form or log in, that information (like your username and password) gets converted into a stream of bits and bytes so it can travel through the wired/wireless network as signals.

 Fig 2:  Transfer of data over insecure web connection

Now imagine if someone manages to capture those signals.
They could easily reconstruct your data back into readable text your name, password, or even credit card details.

That’s a serious confidentiality breach, exactly what we discussed in the CIA Triad post.

👉 And that’s why we need encryption.

What is Encryption?

Encryption is like locking your message in a coded box before sending it.
Even if someone intercepts it, all they’ll see is gibberish.

It’s the process of turning plain text into cipher text using a special key a secret value that decides how data is scrambled.

But that leads us to a few big questions:

  • Which key do we use?
  • How do we share it securely?
  • And how do we make sure only the right person can unlock it?

To answer that, we need to understand two types of encryption.

⚙️ Symmetric Encryption

In symmetric encryption, the same key is used to both encrypt and decrypt data.
It’s fast and simple but there’s one big risk: if someone steals that key, they can read everything.

Popular symmetric algorithms: AESDES3DES

🧩 Asymmetric Encryption

Asymmetric encryption uses two keys — a public key and a private key.

  • You share your public key with everyone.
  • You keep your private key secret.
  • Anything encrypted with one key can only be decrypted with the other.

Popular asymmetric algorithms: RSAECC

🔐 How TLS Uses Encryption to Secure HTTP

TLS (Transport Layer Security) combines the best of both encryption types to make the web safe.
It’s the technology that upgrades HTTP into HTTPS — where the “S” stands for Secure.

Here’s what happens behind the scenes when you open an HTTPS website:

🔗 How TLS Communication establish

When your browser connects to a website over HTTPS, this happens:

  1. Server Sends the TLS Certificate
    The website presents its certificate to the browser.
  2. Browser Verifies the Certificate
    It checks if the certificate:
    • Was issued by a trusted Certificate Authority (CA)
    • Hasn’t expired
    • Matches the domain you’re visiting
  3. Secure Connection Established
    Once verified, the browser and server exchange encryption keys and set up a secure TLS session.

From that moment, all data  like your passwords or form inputs is encrypted before leaving your device.

🔐 What is a TLS Certificate?

TLS certificate (sometimes still called an SSL certificate) is a digital identity card for a website.
It’s issued by a trusted Certificate Authority (CA) and helps your browser confirm that the site you’re visiting is authentic and secure.

Think of it as a digital passport that proves:

“Yes, this website is really who it claims to be — and you can safely send your data to it.”

🧩 What Does a TLS Certificate Contain?

A TLS certificate includes several key details:

Field

Description

Domain Name

The exact website address it’s issued for (e.g., www.hercybertalks.blogspot.com)

Organization Details

The name, location, and sometimes registration info of the website owner (for verified orgs)

Public Key

Used by browsers to establish encrypted communication

Issuer (CA)

The Certificate Authority that issued and digitally signed the certificate

Validity Period

Start and expiry date (usually 90 days to 1 year)

Signature

A digital signature by the CA to verify authenticity


 Fig 3:  Visual Representation of  a SSL/TLS Certificate

🧾 Types of TLS Certificates

Type

Description

Domain Validated (DV)

Verifies only domain ownership; quick and free (e.g., Let’s Encrypt)

Organization Validated (OV)

Verifies the organization’s identity; adds more trust

Extended Validation (EV)

Highest level; displays company name in the address bar (used by banks, major websites)

🚨 What Happens if There’s No Valid TLS Certificate?

If a site’s certificate is expired, self-signed, or untrusted, browsers show a warning like:

⚠️ “Your connection is not private.”

It’s the browser’s way of saying:

“I can’t verify this website’s identity proceed only if you’re sure.”

🤝 The TLS Handshake: How a Secure Connection is Born

Now that we know what TLS and certificates are, let’s see how your browser and a website actually “agree” on a secure connection before sending any data.

This process is called the TLS Handshake — and it’s basically the moment when your browser (the client) and the website’s server say:

“Hey, let’s talk securely. Here’s how we’ll do it.”

Let’s break it down step-by-step in simple terms 👇


🧱 Step 1: Setting up the TCP Connection

Before TLS even begins, a basic connection must be made using the TCP three-way handshake — the foundation of most web communication.

  1. Client Server: Sends a SYN (synchronize) packet saying “Hey, I’d like to connect.”
  2. Server Client: Replies with SYN-ACK (synchronize + acknowledge) saying “Got it, I’m ready.”
  3. Client Server: Sends ACK (acknowledge) to confirm.

Now that both sides can talk, the real TLS magic begins


🔒 Step 2: The “ClientHello” – Hello, Let’s Be Secure

Your browser starts by sending a ClientHello message, which includes:

  • Supported encryption algorithms (also known as cipher suites)
  • random byte string (used later to generate encryption keys)
  • The TLS version it supports

Think of this like your browser saying:

“Hi, here’s what I know. Let’s pick the best secure language to talk in.”


🖐️ Step 3: The “ServerHello” – I’ll Take This Cipher, Please

The server replies with a ServerHello message containing:

  • The chosen cipher suite (from the client’s list)
  • Another random byte string
  • The server’s digital certificate (the one we discussed earlier — proving its identity!)
  • Optionally, a request for a client certificate (in case mutual authentication is needed)

This is the server’s way of saying:

“Nice to meet you! Here’s how we’ll secure our chat, and here’s proof that I’m legit.”


🧾 Step 4: Certificate Verification and Key Exchange

Now your browser plays detective 🕵️‍♀️
It verifies the server’s TLS certificate using the Chain of Trust (Root CA
Intermediate CA Server).
If everything checks out, the browser continues.

Then comes the ClientKeyExchange message — this includes a random byte string used to create the session’s secret encryption key.

If the server had asked for a client certificate, the browser sends that too.

Finally, the client says:

“All set! From now on, let’s talk secretly.”

This is done through a ChangeCipherSpec message — it means “I’m switching to encrypted mode.”


💬 Step 5: The Server Confirms

The server replies with its own ChangeCipherSpec message, confirming:

“Got it, I’m also switching to encrypted communication.”

From this point forward, both client and server exchange encrypted data — all requests and responses are now protected using symmetric encryption with the key they just agreed upon.


🌐 Step 6: Secure Communication

Now the session is live!
Everything — from your login credentials to your personal data — is encrypted before leaving your device.
Even if someone intercepts it, all they’ll see is gibberish
🔐

Fig 4: TLS Handshaking pictorial representation

💡 Fun fact:

This entire handshake — all these packets, keys, and verifications — usually happens in milliseconds before your page even loads!

🏢 Certificate Authorities (CAs) and the Chain of Trust

TLS certificates are issued by Certificate Authorities such as Let’s Encrypt, DigiCert, or GlobalSign.

Your browser already “trusts” these CAs and keeps a list of their root certificates.
So when a site presents a certificate signed by one of them, your browser says:

🧠 “Okay, I trust this site — because I trust the CA that vouches for it.”

That’s what we call the Chain of Trust:

 Fig 5:  Visual Representation of chain of trust

🏁 Wrapping Up

TLS (and SSL, its older version) quietly protects almost everything we do online from logging into social media to making bank transfers.

It ensures that your data is encrypted, your website is verified, and your connection is trusted through the Chain of Trust.

So next time you see that 🔒 lock icon, you’ll know there’s a whole security system working behind the scenes — CAs, certificates, and cryptography — keeping your data safe from prying eyes.

Keep learning, keep exploring, and keep reading on security.

OWASP Top 10 2025 – What’s New and Why It Matters

🛡️ OWASP Top 10 – 2025: What’s New and What It Means for Web Application Security

The OWASP Top 10 remains the most trusted guide for understanding the biggest risks in web and application security.
The 2025 edition brings two new categories, one consolidation, and a continued focus on addressing root causes instead of just symptoms.

This update reflects how modern software development  with its cloud deployments, open-source dependencies, and complex supply chains has transformed the security landscape.

🔍 The OWASP Top 10 – 2025 Overview

The new list is based on data from hundreds of thousands of applications and over 589 CWEs (Common Weakness Enumerations), alongside feedback from security professionals worldwide.
Here’s a simplified breakdown of each category — what it means, why it matters, and how you can mitigate it.

Fig 1: Mapping OWASP TOP 10 2021 to 2025; Source@owasp.org

A01: Broken Access Control

Definition: Broken Access Control occurs when users can perform actions outside of their intended permissions — such as accessing other users’ data or administrative functions.
2025 Insight: It remains the #1 risk, affecting about 3.73% of tested apps. This category now also includes Server-Side Request Forgery (SSRF).
Why it matters: Mismanaged access rules are one of the most exploited weaknesses.
Mitigation: Enforce least privilege, validate permissions at every layer, and test authorization logic frequently.

A02: Security Misconfiguration

Definition: This happens when systems or applications are deployed with insecure default settings, unnecessary features, or misapplied permissions.
2025 Insight: Climbs from #5 (2021) to #2. 
Why it matters: As configurations become code-driven (in cloud and containers), small errors can expose entire environments.
Mitigation: Apply secure defaults, disable unused services, and automate configuration reviews.

A03: Software Supply Chain Failures 🆕

Definition: These involve vulnerabilities introduced through dependencies, build systems, or third-party software components.
2025 Insight: A new category that expands the old “Vulnerable and Outdated Components.”
Why it matters: Attackers now target open-source libraries and CI/CD pipelines, as seen in supply chain breaches like SolarWinds.
Mitigation: Use trusted sources, verify integrity of dependencies, and implement SBOM (Software Bill of Materials) tracking.

A04: Cryptographic Failures

Definition: Weak encryption, improper key management, or use of outdated algorithms lead to data exposure and compromised confidentiality.
2025 Insight: Falls from #2 to #4 but still impacts nearly 3.8% of applications.
Why it matters: Cryptographic mistakes can expose sensitive data like passwords and payment info.
Mitigation: Use strong, modern encryption standards and rotate keys securely.

A05: Injection

Definition: Injection flaws occur when untrusted input is sent to an interpreter — such as SQL, OS, or LDAP — leading to unauthorized commands or data manipulation.
2025 Insight: Moves to #5, but remains a frequent and serious issue.
Why it matters: Classic attacks like SQL Injection and Cross-site Scripting (XSS) still cause major breaches.
Mitigation: Sanitize and validate all input, use parameterized queries, and avoid direct string concatenation.

A06: Insecure Design

Definition: This category covers flaws that originate during the design phase before coding even begins. Such as missing threat models or insecure architectural patterns.
2025 Insight: Drops to #6, but the industry shows improvement through better design awareness.
Why it matters: Secure design reduces risk before vulnerabilities can even form.
Mitigation: Integrate threat modeling and security architecture reviews early in development.

A07: Authentication Failures

Definition: These occur when authentication systems are poorly implemented, allowing attackers to impersonate users or bypass logins.
2025 Insight: Holds steady at #7, renamed from Identification and Authentication Failures.
Why it matters: Weak login mechanisms are an easy target for brute force, credential stuffing, and session hijacking.
Mitigation: Use proven frameworks (like OAuth 2.0), implement MFA, and secure session handling.

A08: Software or Data Integrity Failures

Definition: This happens when software, updates, or data are not properly verified for integrity or authenticity.
2025 Insight: Continues at #8, focusing on lower-level trust failures.
Why it matters: Attackers can exploit unverified updates or code modifications to inject malicious logic.
Mitigation: Validate digital signatures, secure update channels, and enforce integrity checks.

A09: Logging & Alerting Failures

Definition: Weak logging or lack of proper alerting prevents detection of attacks and delays incident response.
2025 Insight: Retains #9 but with a new emphasis on alerting, not just logging.
Why it matters: Without actionable alerts, even detailed logs fail to prevent damage.
Mitigation: Implement real-time alerts, monitor critical events, and test your detection capabilities.

A10: Mishandling of Exceptional Conditions 🆕

Definition: A new entry for 2025, this covers improper error handling and system responses to unexpected conditions.
Why it matters: Failing to handle errors securely can lead to data leaks, logic flaws, or denial of service.
Mitigation: Use generic error messages, avoid exposing stack traces, and ensure systems fail securely (fail closed).

🧠 How OWASP Built the 2025 List

For this edition, OWASP analyzed a much larger dataset — jumping from 400 CWEs in 2021 to 589 CWEs in 2025.
Instead of focusing on “symptom-based” categories like Sensitive Data Exposure, OWASP has shifted to root cause categories, such as Misconfiguration and Insecure Design.
This helps teams address vulnerabilities where they begin — during design, configuration, and dependency management.

📊 Data and Community Insights

OWASP’s scoring used data from the National Vulnerability Database (NVD) and CVE mappings under CVSSv2 and CVSSv3 systems.
While CVSSv4 exists, its revised scoring made it incompatible for this year’s analysis.

Because automated testing tools can’t detect every weakness, OWASP also includes community-voted categories to ensure the list reflects real-world issues security professionals are seeing, not just those captured by scanners.

🔐 Final Thoughts: Secure by Design, Not by Chance

The OWASP Top 10 – 2025 reminds us that security must start at the foundation not after deployment.
From cloud misconfigurations to dependency risks, every phase of software development has potential weak points.

✅ Key Takeaways:

  • Embed security from design to deployment.

  • Review configurations and dependencies regularly.

  • Use standard frameworks for authentication and encryption.

  • Enable logging and real-time alerts to catch issues early.

  • Educate teams continuously on secure development practices.

The OWASP Top 10 isn’t just a checklist, it’s a mindset. It helps developers and organizations think securely, build resilient systems, and stay one step ahead of attackers.

📚 References

  1. OWASP Foundation
    🔗 https://owasp.org/Top10/

  2. Common Weakness Enumeration (CWE)
    🔗 https://cwe.mitre.org/

  3. National Vulnerability Database (NVD)
    🔗 https://nvd.nist.gov/

  4. MITRE ATT&CK Framework
    🔗 https://attack.mitre.org/

  5. OpenSSF
    🔗 https://openssf.org/

Understanding the CIA Triad: The Pillars of Information Security

 

If you’ve ever wondered how security people measure the impact of a vulnerability, it all comes down to three simple ideas that is Confidentiality, Integrity, and Availability.

Together, they form the CIA Triad, the foundation of everything in cybersecurity.
Whether you’re a developer, tester or ethical hacker, you’ll keep coming back to these three concepts again and again.

Why Every Vulnerability Comes Back to the CIA Triad

Every security issue you’ll ever find from SQL injection to DDoS affects at least one of these:

  • Confidentiality: Does it expose something private?
  • Integrity: Does it change something it shouldn’t?
  • Availability: Does it take something offline or make it slow?

So, the next time you spot a bug, think about which of these three it hurts the most.

1. Confidentiality — Keeping Secrets Safe

Confidentiality means making sure only the right people can see or access data. If someone else sneaks a peek that’s a confidentiality breach.

💥 Common Threats:

  • Sending data over HTTP instead of HTTPS (hello, eavesdroppers 👀)
  • Weak or reused passwords
  • Poor access control
  • Database leaks or insider misuse

🛠️ How to Keep Data Private:

  • Access Control: Give users access only to what they truly need.
  • Encryption: Encrypt data in transit (TLS/HTTPS) and at rest (AES, RSA).
  • Authentication & MFA: Make it harder for attackers to break in.

💡 Example:
If your login page still uses plain HTTP, anyone sniffing the network could see your password. That’s a straight-up confidentiality failure — easily fixed by enabling HTTPS.

2. Integrity — Keeping Data Honest

Integrity is about making sure data stays correct and trustworthy. If someone changes a record or injects fake info, your system loses integrity.

💥 Common Threats:

  • MITM (Man-in-the-Middle) attacks altering data in transit
  • Unauthorized updates in a database
  • Malware that modifies files or logs

🛠️ How to Keep Data Accurate:

  • Hashing: Generate a hash (like SHA-256) to check if data has changed.
  • Digital Signatures: Verify that a message or file really came from the right source.
  • Version Control: Track every change and detect tampering.

💡 Example:
If a software file’s hash doesn’t match the one on the official site — don’t install it. Someone probably tampered with it, and that’s an integrity breach.

3. Availability — Keeping Systems Running

Availability means your data and systems are up when users need them. Even the most secure app is useless if it’s always down.

💥 Common Threats:

  • DDoS attacks that flood your servers
  • Ransomware locking up critical files
  • Hardware failure or no backup plan

🛠️ How to Keep Systems Online:

  • Redundancy & Backups: Always have a Plan B (and C).
  • Monitoring: Detect issues early before users notice.
  • Error Handling & Encoding: Prevent crashes and data loss.

💡 Example:
If your app crashes every time traffic spikes, that’s a hit on availability. Load balancing or backup servers can save you there.

Balancing the Triad

Boosting one pillar can sometimes hurt another.

  • Stronger encryption = better confidentiality, but might slow down availability.
  • Strict access controls = more security, but can frustrate users.

Cybersecurity is all about balance protecting without overcomplicating.

Let’s see how this works in real world

Think of an online banking app:

  • Confidentiality: Your credentials and balance are encrypted.
  • Integrity: Transactions can’t be changed after approval.
  • Availability: You can access your account 24/7 without downtime.

If one of these pillars falls, the whole system becomes unreliable.

Wrapping Up

The CIA Triad might sound basic, but it’s the lens through which every vulnerability is judged.
It tells you what’s broken, how serious it is, and what needs fixing first.

So next time you test or review a system, ask yourself:

“Is this affecting confidentiality, integrity, or availability?”

In the next post, we’ll explore how real-world mechanisms like cookies, TLS, response headers, SOP and CORS protect these three pillars in action.

Until then — keep learning, stay curious and keep reading on security 🧠💻 



Everything you should know about Transport Layer Security (TLS)

Ever noticed that little  lock icon   🔒 next to a website URL or the difference between  http://  and  https:// ?Those extra letters  and ...