Computer Science › Software + Distributed Computing
Confidentiality, integrity, and availability as the three properties any security mechanism is ultimately built to protect — and why a system that trades away one to strengthen another has usually made a real, sometimes entirely correct, engineering tradeoff rather than a mistake.
Authentication answers "who are you"; authorization answers "what are you allowed to do" — two genuinely separate questions a system can get right on one axis while failing catastrophically on the other, plus mandatory vs. discretionary access control as two different answers to who gets to grant permissions in the first place.
A systematic way to ask "what could go wrong" before writing a line of code — six attacker-goal categories, Spoofing/Tampering/Repudiation/Information disclosure/Denial of service/Elevation of privilege, walked concretely against a small login feature.
XOR a message with a truly random key exactly as long as the message, use that key exactly once, and the result is mathematically proven unbreakable — Shannon's perfect secrecy, and the two impractical conditions, true randomness and single use, that keep the one-time pad from being how any real system actually encrypts.
AES encrypts one fixed-size block at a time; a mode of operation is the separate, independent rule for stitching many blocks into a real message — and ECB, the naive mode, leaks every repeated block of plaintext in the ciphertext, the famous "ECB penguin", which is exactly why CBC and CTR exist.
Preimage resistance, second-preimage resistance, and collision resistance are the three properties SHA-256 promises — a genuinely different, much stronger contract than the hash functions already covered for hash tables, which only ever promised speed and a low collision rate, never resistance to a deliberate, computationally-bounded attacker.
Encryption alone hides a message's content but says nothing about whether it was tampered with in transit — a MAC built from a hash function (HMAC) adds an integrity guarantee, and authenticated encryption (AEAD) bundles confidentiality and integrity into one primitive so a program can't accidentally use one without the other.
Every public-key scheme in this discipline is built on a small, fixed set of facts about arithmetic modulo a prime — modular exponentiation, multiplicative inverses via the extended Euclidean algorithm, and Fermat's little theorem — already covered as pure number theory, now doing the actual work of encryption.
Two parties who have never met and share no secret can agree on one in full view of an eavesdropper who sees every message — a worked example with small, real numbers, and the discrete logarithm problem that makes recovering the shared secret from the public exchange computationally hard.
A full worked key-generation, encryption, and decryption example with genuinely small primes — small enough to compute by hand, and explicitly nowhere near the 2048-bit primes a real deployment requires — built directly on Fermat's little theorem and the modular inverses already covered.
Signing with RSA is encryption run in reverse — the private key proves authorship, the public key lets anyone verify it — and a certificate is just a trusted third party's own digital signature vouching that a given public key really belongs to the name printed on it.
A stack buffer overflow, already covered as a memory bug, and a SQL injection are structurally the exact same mistake surfacing in two different layers of a system — untrusted input treated as if it could never be anything but inert data, when in both cases it can be crafted to be interpreted as code or commands instead.
Stack canaries, non-executable memory (W^X / DEP), and address-space layout randomization each close off one specific step of the classic buffer-overflow-to-code-execution attack — and no single one is a complete fix by itself, which is exactly why real systems layer all three and attackers still occasionally get past them with techniques like return-oriented programming.
Cross-site scripting smuggles an attacker's JavaScript into a page another user trusts; cross-site request forgery tricks a logged-in user's own browser into sending a request the attacker chose — two different vulnerability classes that both exploit the same underlying fact, that a browser attaches a user's cookies to a request regardless of which site asked for it.
A firewall enforces a policy about which packets are allowed to cross a boundary at all — a genuinely earlier line of defense than anything else covered in this discipline, which mostly assumed an attacker's traffic had already been allowed to arrive.
Every primitive covered in this discipline — Diffie-Hellman key exchange, RSA/certificate-based authentication, AES in an authenticated mode, and a hash function inside an HMAC — working together, step by step, in the exact protocol that secures the padlock icon in a browser's address bar.
Part of the Computer Science curriculum.
Confidentiality, integrity, and availability as the three properties any security mechanism is ultimately built to protect — and why a system that trades away one to strengthen another has usually made a real, sometimes entirely correct, engineering tradeoff rather than a mistake.
Authentication answers "who are you"; authorization answers "what are you allowed to do" — two genuinely separate questions a system can get right on one axis while failing catastrophically on the other, plus mandatory vs. discretionary access control as two different answers to who gets to grant permissions in the first place.
A systematic way to ask "what could go wrong" before writing a line of code — six attacker-goal categories, Spoofing/Tampering/Repudiation/Information disclosure/Denial of service/Elevation of privilege, walked concretely against a small login feature.
XOR a message with a truly random key exactly as long as the message, use that key exactly once, and the result is mathematically proven unbreakable — Shannon's perfect secrecy, and the two impractical conditions, true randomness and single use, that keep the one-time pad from being how any real system actually encrypts.
AES encrypts one fixed-size block at a time; a mode of operation is the separate, independent rule for stitching many blocks into a real message — and ECB, the naive mode, leaks every repeated block of plaintext in the ciphertext, the famous "ECB penguin", which is exactly why CBC and CTR exist.
Preimage resistance, second-preimage resistance, and collision resistance are the three properties SHA-256 promises — a genuinely different, much stronger contract than the hash functions already covered for hash tables, which only ever promised speed and a low collision rate, never resistance to a deliberate, computationally-bounded attacker.
Encryption alone hides a message's content but says nothing about whether it was tampered with in transit — a MAC built from a hash function (HMAC) adds an integrity guarantee, and authenticated encryption (AEAD) bundles confidentiality and integrity into one primitive so a program can't accidentally use one without the other.
Every public-key scheme in this discipline is built on a small, fixed set of facts about arithmetic modulo a prime — modular exponentiation, multiplicative inverses via the extended Euclidean algorithm, and Fermat's little theorem — already covered as pure number theory, now doing the actual work of encryption.
Two parties who have never met and share no secret can agree on one in full view of an eavesdropper who sees every message — a worked example with small, real numbers, and the discrete logarithm problem that makes recovering the shared secret from the public exchange computationally hard.
A full worked key-generation, encryption, and decryption example with genuinely small primes — small enough to compute by hand, and explicitly nowhere near the 2048-bit primes a real deployment requires — built directly on Fermat's little theorem and the modular inverses already covered.
Signing with RSA is encryption run in reverse — the private key proves authorship, the public key lets anyone verify it — and a certificate is just a trusted third party's own digital signature vouching that a given public key really belongs to the name printed on it.
A stack buffer overflow, already covered as a memory bug, and a SQL injection are structurally the exact same mistake surfacing in two different layers of a system — untrusted input treated as if it could never be anything but inert data, when in both cases it can be crafted to be interpreted as code or commands instead.
Stack canaries, non-executable memory (W^X / DEP), and address-space layout randomization each close off one specific step of the classic buffer-overflow-to-code-execution attack — and no single one is a complete fix by itself, which is exactly why real systems layer all three and attackers still occasionally get past them with techniques like return-oriented programming.
Cross-site scripting smuggles an attacker's JavaScript into a page another user trusts; cross-site request forgery tricks a logged-in user's own browser into sending a request the attacker chose — two different vulnerability classes that both exploit the same underlying fact, that a browser attaches a user's cookies to a request regardless of which site asked for it.
A firewall enforces a policy about which packets are allowed to cross a boundary at all — a genuinely earlier line of defense than anything else covered in this discipline, which mostly assumed an attacker's traffic had already been allowed to arrive.
Every primitive covered in this discipline — Diffie-Hellman key exchange, RSA/certificate-based authentication, AES in an authenticated mode, and a hash function inside an HMAC — working together, step by step, in the exact protocol that secures the padlock icon in a browser's address bar.