Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 37 ยท Getting Started

The CIA Triad and Security Goals

Understand the CIA triad plus authentication, authorisation and non-repudiation, with runnable Python examples of integrity checks and availability maths.

Almost every security discussion starts with three words: confidentiality, integrity and availability, usually shortened to the CIA triad. They describe what "secure" means for data and services. When you evaluate a control, ask which of the three it protects and which it might weaken. A control that boosts one property often costs another, and knowing the trade-off is half of good design.

Around the triad sit a few supporting ideas, authentication, authorisation, accounting and non-repudiation, that turn the abstract goals into things a system can actually check. This lesson defines each, shows what an attack against each looks like on a network, and lets you run small programs that demonstrate them.

Confidentiality

Confidentiality means only the people and systems that are allowed to read information can read it. On a network, the threat is eavesdropping: someone on the path, such as a shared Wi-Fi network or a compromised switch, copies your traffic. The main defence is encryption in transit (TLS, VPNs, SSH) plus access control on the endpoints. Confidentiality also covers metadata: even if the content is encrypted, an observer may still learn who talks to whom and how much.

Integrity

Integrity means data is not changed in ways that were not authorised. A man-in-the-middle who edits a bank transfer amount breaks integrity even if he never reads the message. Defences are hashes, message authentication codes (MACs) and digital signatures. A plain hash detects accidental corruption; a keyed MAC detects deliberate tampering, because an attacker without the key cannot produce a valid tag.

Python Detect tampering with a keyed MAC

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The attacker can change the text, but the tag no longer matches, and a tag computed without the key is rejected. Always compare tags with hmac.compare_digest, which takes the same time whether the first byte or the last differs.

Availability

Availability means authorised users can reach the service when they need it. Attacks here are denial of service (flooding links or servers), but availability also fails from plain faults: a cut cable, a full disk, an expired certificate. Defences are redundancy, capacity planning, rate limiting, filtering and tested recovery. Availability is usually expressed as a percentage of uptime, and the numbers are more sobering than they sound.

Python What does 'nines' of availability mean?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Redundancy multiplies the failure probabilities, which is why two modest links beat one expensive one. The catch is that the links must really be independent: two cables in the same trench are one failure waiting to happen.

Balancing the triad

The three properties pull against each other:

  • Encrypting everything helps confidentiality but can blind your intrusion detection, hurting your ability to notice attacks (integrity and availability).
  • A strict firewall protects confidentiality and integrity but may block legitimate users (availability).
  • Heavy redundancy improves availability but increases the number of systems that must be patched and watched (confidentiality and integrity risks).

The CIA triad

Confidentiality Only the right people read it
Integrity Nobody changes it unseen
Availability It works when needed

Every control helps one and may cost another

1 / 2

The supporting ideas

Authentication proves identity: a password, a key, a certificate, a one-time code. Authorisation decides what an authenticated identity may do. Confusing the two is a classic mistake: logging in does not mean you may read every file. Accounting (or auditing) records who did what and when, which is what makes investigations possible. Non-repudiation means a sender cannot credibly deny having sent something; it needs digital signatures, because a shared-key MAC could have been created by either side.

On a network these ideas show up everywhere. A VPN authenticates the user and then authorises access to specific subnets. A firewall log is accounting. A TLS certificate proves the server's identity to the client.

Mapping attacks to goals

When you meet a new attack, place it on the triad. The mapping is rarely exclusive, but it tells you which defence to look for first.

Python Classify attacks by the goal they threaten

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

When you read a vulnerability report, ask in one sentence: "Which of C, I or A is affected, and for whom?" The answer drives how urgent the fix is.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. An attacker silently changes the amount in a payment message but cannot read other messages. Which goal is broken?

    Changing data in transit without authorisation breaks integrity. MACs and signatures exist to detect exactly this.
  2. 2. Why is a plain SHA-256 hash not enough to stop an active attacker from tampering with a message?

    A hash has no secret. Anyone can recompute it for altered data. A keyed MAC or a signature needs a secret key the attacker does not have.
  3. 3. Two independent links, each 99% available, are used in parallel. Roughly what is the combined availability?

    The service fails only if both fail: 0.01 x 0.01 = 0.0001, so availability is 99.99%, assuming the links fail independently.
  4. 4. Which property needs digital signatures rather than a shared-key MAC?

    With a shared key, either party could have produced the tag, so neither can prove the other did. A signature made with a private key points to one signer.
  5. 5. What is the difference between authentication and authorisation?

    You authenticate first, then the system authorises specific actions for that identity.

Summary

  • The CIA triad: confidentiality (secrecy), integrity (no unseen change), availability (works when needed).
  • Encryption protects confidentiality, MACs and signatures protect integrity, redundancy and filtering protect availability.
  • Authentication, authorisation, accounting and non-repudiation make the goals checkable.
  • Controls trade one property against another; know what you give up.
  • Classify every attack on the triad to decide which defence to reach for first.

Next: A Defender's Map of the Network Layers