Speaker 1: Welcome to the deep dive. Today, we're venturing into the
Speaker 1: really fascinating realm of cryptography and computer security.
Speaker 2: Indeed, we've got quite a bit of material here, covering
Speaker 2: everything from the sort of deep mathematical roots of encryption
Speaker 2: all the way to how it protects us every day.
Speaker 1: Right, and our mission really is to sift through all this,
Speaker 1: pull out the key insights and maybe show you some
Speaker 1: connections you hadn't thought of. Because cryptography, it sounds technical,
Speaker 1: but it's everywhere.
Speaker 2: Oh absolutely, think about secure websites, messaging apps, even your phone, security,
Speaker 2: your car. It all relies on the stuff working behind
Speaker 2: the scenes.
Speaker 1: And the consequences if it doesn't work are pretty serious.
Speaker 2: Yeah, we're talking email hacks, bank accounts getting breached, identity theft.
Speaker 2: It's not just theory. These are real threats, which.
Speaker 1: Makes you wonder who's doing the attacking right. The motivations
Speaker 1: vary a lot.
Speaker 2: Totally, from criminals after money to while more organized groups
Speaker 2: with bigger targets. It really highlights why being proactive about
Speaker 2: security is so vital.
Speaker 1: For this deep dive, we're kind of splitting in two.
Speaker 2: Yeah, first, we'll tackle the basics, the foundational concepts of cryptography,
Speaker 2: how it all works at its.
Speaker 1: Core and done.
Speaker 2: Then we'll look at the practical side, how these ideas
Speaker 2: actually get built into the technologies you use.
Speaker 1: Okay, sounds good. Let's start with the big picture then
Speaker 1: computer security itself.
Speaker 2: Right. So, at as heart, information security is about protecting
Speaker 2: information and systems. It comes down to three key things
Speaker 2: often called the CIA.
Speaker 1: Triad CIA not the agency I assume.
Speaker 2: Huh No, not that CIA. It stands for confidentiality, integrity,
Speaker 2: and availability.
Speaker 1: Okay, confidentiality, keeping secret, secret, integrity, making sure data isn't
Speaker 1: messed with. What about availability?
Speaker 2: Availability is crucial. It means authorized users can actually get
Speaker 2: to the information and services when they need them. Security
Speaker 2: isn't just about locking things down. It's also about ensuring access.
Speaker 1: That's a great point. We often focus on the secrecy.
Speaker 2: Part exactly, but think about attacks that target availability. Sabotaging
Speaker 2: a system like say car breaks control to lectonically or
Speaker 2: deleting critical data, or just blocking access to servers. Those
Speaker 2: are all serious security breaches.
Speaker 1: So information security is the umbrella term, and cybersecurity fits
Speaker 1: underneath it.
Speaker 2: Pretty much. Cybersecurity focuses specifically on protecting that digital world, networks, devices, data,
Speaker 2: everything in cyberspace from attacks.
Speaker 1: Got it. Now, let's zoom in on cryptography itself. What's
Speaker 1: its main job?
Speaker 2: Fundamentally, cryptography is about enabling secure communication and building trust
Speaker 2: even when people don't know each other. It's about privacy
Speaker 2: and security and a connected world. And you know this
Speaker 2: isn't a new problem.
Speaker 1: Ah, right. The historical examples I saw those in the notes.
Speaker 2: Yeah, people have wanted to send secret messages for ages.
Speaker 2: Think about the ancient Greeks with their side tail a
Speaker 2: cylinder for scrambling messages, or even Thomas Jefferson's wheel cipher.
Speaker 1: Much more complex, I imagine a bit.
Speaker 2: Yeah, mechanical shows that drive for secrecy. These were early steps.
Speaker 1: And then we get to things like the Enigma machine
Speaker 1: in World War Two.
Speaker 2: Right, Enigma a huge leap in complexity for its time,
Speaker 2: electro mechanical, very sophisticated.
Speaker 1: Codes famously broken by Alan Turing and.
Speaker 2: His team exactly, which perfectly illustrates this constant cat and
Speaker 2: mouse game in cryptography. Code makers build something, code breakers
Speaker 2: try to crack it. It's always evolving.
Speaker 1: Now here's something interesting. Attacks on the algorithms themselves, they're
Speaker 1: not usually about tricking the user, are they?
Speaker 2: That's a key distinction. Things like phishing they prey on
Speaker 2: human error, but cryptanalysis attacking the crypto algorithm aims to
Speaker 2: find weaknesses in the math or the design itself, not
Speaker 2: trying to fool you into giving up your password.
Speaker 1: So how does cryptanalysis work? Then? Sounds complicated?
Speaker 2: It can be, but the core idea is using knowledge
Speaker 2: of how the algorithm is built, and often these designs
Speaker 2: are public. Plus looking for patterns in the original message,
Speaker 2: the plain.
Speaker 1: Text, using the ciphertext the encrypted.
Speaker 2: Message right, analyzing the ciphertech, knowing the algorithms structure, maybe
Speaker 2: knowing something about the likely plaintext, you use computation to
Speaker 2: try and figure out the secret key or the message.
Speaker 1: Okay, the notes mentioned unconditional versus computational security. What's the difference.
Speaker 2: Unconditional security is like the theoretical ideal. It means, even
Speaker 2: with infinite computing power, you couldn't break the cipher. The
Speaker 2: one time pad is.
Speaker 1: An example, but not very practical.
Speaker 2: Not usually, No, you need a key as long as
Speaker 2: the message perfectly random used only once securely shared. Tricky.
Speaker 2: Computational security is what we rely on, meaning it's theoretically breakable,
Speaker 2: but it would take an absurd amount of time and
Speaker 2: computing power, far beyond anything feasible. Our everyday crypto relies
Speaker 2: on this.
Speaker 1: Gotcha and quickly pseudorandom number generators PR andngs. They sound random,
Speaker 1: but they're not quite exactly.
Speaker 2: They're algorithms that produce sequences that look random, but they're deterministic.
Speaker 2: If you know the starting point, the.
Speaker 1: Seed, you can predict the whole sequence.
Speaker 2: Yeah, that's the risk. If an attacker gets the seed,
Speaker 2: the randomness collapses and any security relying on it is
Speaker 2: potentially gone. So true randomness for seating is vital.
Speaker 1: Okay, makes sense. So strong algorithms plus real randomness. Now,
Speaker 1: let's get into some of the math behind this. Modular arithmetic, right.
Speaker 2: Think of clock arithmetic. After twelve, you're back to one
Speaker 2: that's modulo twelve. Cryptography uses this a lot, working with
Speaker 2: numbers within a specific range a modulus. Concepts like Fermat's
Speaker 2: little theorem, modular square roots their tools in the crypto toolbox.
Speaker 1: And groups in fields. Sounds like abstract algebra class.
Speaker 2: It is a bit, but structures like ZP, integers modulo
Speaker 2: a prime P, or finite fields FP define how addition
Speaker 2: and multiplication work in these limited sets. They provide the
Speaker 2: mathematical playground for many crypto operations. The order of an element,
Speaker 2: for instance, is important for security in some systems.
Speaker 1: The notes show examples in finite fields, like F twenty three.
Speaker 1: That looks different.
Speaker 2: Yeah, it's math with polynomials over binary fields. We're working
Speaker 2: with strings of bits, and the rules for adding and
Speaker 2: multiplying are based on polynomial math modulo some irreducible polynomial
Speaker 2: sounds complex, but it gives a well defined structure for operations.
Speaker 2: Generators are elements that can create all others through repeated multiplications.
Speaker 1: Okay, I'll trust you on that one. And the Chinese
Speaker 1: remainder theorem, what's its role?
Speaker 2: Ugh crt. It's a clever theorem for solving systems of congruences,
Speaker 2: finding a number that leaves specific remainders when divided by
Speaker 2: different numbers. In crypto, especially RSA, it's used to speed
Speaker 2: things up. You can break a big calculation down into smaller,
Speaker 2: faster ones modulo the factors of the main number.
Speaker 1: Right optimization. Okay, mad foundations late, let's talk symmetric ciphers.
Speaker 1: The basic idea.
Speaker 2: Simple concept, one shared secret key, same key to encrypt
Speaker 2: the plaintext into ciphertext, same key to decrypt it back.
Speaker 2: Security hinges entirely on keeping that key secret.
Speaker 1: Like the vigenera cipher that's a step up from the
Speaker 1: basic Cazar shift right.
Speaker 2: Instead of shifting every letter the same amount, Vgenia uses
Speaker 2: a keyword. The keyword letter tells you how much to
Speaker 2: shift the corresponding plaintex.
Speaker 1: Letter, so you repeat the keyword yeap, repeat the.
Speaker 2: Keyword to match the message length, then use a Visionaire
Speaker 2: table to do the look up. It was much harder
Speaker 2: to break than Caesar for a long time because it
Speaker 2: uses multiple alphabets. Still breakable, though, especially now.
Speaker 1: And reusing keys and stream ciphers is a big no, no.
Speaker 2: Huge mistake. Stream ciphers often generate a keystream from the key.
Speaker 2: If you encrypt two different messages with the exact same
Speaker 2: keystream problems, big problems. An attacker can xor the two
Speaker 2: cipher texts together, the KEYSTRM cancels out, and they're left
Speaker 2: with the xor of the two original plaintexts. If they
Speaker 2: know or can guess part one message, they can often recover.
Speaker 1: Both, like using the same combo on two safes.
Speaker 2: Good analogy yeah.
Speaker 1: Which leads to crib based tax sounds like spying.
Speaker 2: It kind of is. A crib is just a piece
Speaker 2: of plaintext you guess might be in the message, like
Speaker 2: weather report in Enigma messages.
Speaker 1: How does guessing help?
Speaker 2: You? Try a line your guest crib against the cyphertext
Speaker 2: at different positions. If your guess is right, it can
Speaker 2: help you deduce parts of the key or confirm your guess.
Speaker 2: It was vital for breaking Enigma, combining language knowledge with cryptoanalysis.
Speaker 1: However, and the XR operation itself simple logic gate but fundamental.
Speaker 2: Here absolutely xor is its own inverse a XR B
Speaker 2: xr B gets you back to a so plaintext, XR
Speaker 2: key stream ciphertext ciphertext XR keystream plaintext very efficient.
Speaker 1: But the key reuse issue comes back to xor.
Speaker 2: Yes, because certext one xo R so for text two
Speaker 2: equals plaintext one, XR keystream, XR plaintext two, XR key stream.
Speaker 2: The keystreams cancel leaving plaintext one xo R plaintext.
Speaker 1: Two, and that leaks information.
Speaker 2: It can, yeah, especially with things like AC encoding. The
Speaker 2: bit patterns for letters versus spaces are different. XOR and
Speaker 2: ciphertext might reveal if one character was likely a space,
Speaker 2: which is a common character. It gives the attack or
Speaker 2: a starting point.
Speaker 1: Okay, fascinating how simple operations have big impacts. Let's switch
Speaker 1: to hash functions, m as and digital signatures different goals.
Speaker 2: Here, totally different. Symmetric crypto is about confidentiality. These are
Speaker 2: more about integrity and authenticity.
Speaker 1: So hash functions first, like a digital fingerprint.
Speaker 2: Exactly takes any input data, produces a fixed size output
Speaker 2: the hash. Good ones are one way, easy to compute
Speaker 2: the hash, hard to go from hashback to input and
Speaker 2: collision resistant. Hard to find two different inputs that give
Speaker 2: the same hash.
Speaker 1: Saha algorithms are common examples Saha one, Saha two, Saha
Speaker 1: three Right.
Speaker 2: Saha one is weak now, but SAHA two and SAHA
Speaker 2: three are widely used. They have different structures and output sizes.
Speaker 2: SAHA three uses something called the sponge construction.
Speaker 1: Sponge.
Speaker 2: Yeah, think of absorbing the input data into an internal
Speaker 2: state than squeezing the hash output out. It's a flexible
Speaker 2: design with good security properties.
Speaker 1: Okay, and MAA key's message authentication codes? How are they
Speaker 1: different from hashes?
Speaker 2: Hashes verify integrity? Was the data changed? MAA keys do
Speaker 2: that plus authentication. They use a secret key shared between
Speaker 2: sender and res How you compute the MA using the
Speaker 2: message and the secret key. Send the message and the
Speaker 2: mt tag. The receiver uses their copy of the key
Speaker 2: to recompute the MC on the receive message. If the
Speaker 2: tags matched, the message is intact and it came from
Speaker 2: someone with the.
Speaker 1: Key, So it uses a shared secret like symmetric encryption.
Speaker 2: Yes, HMAC is a common way to build up MC
Speaker 2: using a hash function and a key.
Speaker 1: Then digital signatures, they offer non repudiation.
Speaker 2: Exactly digital signatures use public key crypto. The sender signs
Speaker 2: the message or hash of it using their private key.
Speaker 2: Anyone can verify the signature using the sender's public key,
Speaker 2: and that proves it proves integrity, message wasn't changed, and authenticity.
Speaker 2: Only the private key owner could create that signature. Crucially,
Speaker 2: it provides non repudiation. The sender can't deny signing it
Speaker 2: because only they have the private key. That's a key
Speaker 2: difference from MAC got it.
Speaker 1: The notes mentioned generic attacks on hashes, pre image, second
Speaker 1: pre image collision. What are those?
Speaker 2: They target? The core properties pre image given a hash,
Speaker 2: find any input that produces it. Second pre image given
Speaker 2: an input and its hash. Find a different input with
Speaker 2: the same hash. Collision find any two different inputs with
Speaker 2: the same hash.
Speaker 1: All bad news for security, definitely.
Speaker 2: They undermine the integrity and authenticity guarantees. A collision, for example,
Speaker 2: could let someone create a malicious file with the same
Speaker 2: hash as a legitimate one.
Speaker 1: Okay, back to cipher's for a moment. Stream cipher is
Speaker 1: the synchronous model.
Speaker 2: Right In synchronist stream ciphers, both sender and receiver generate
Speaker 2: the exact same keystream independently based on a shared key
Speaker 2: and usually an IV initialization.
Speaker 1: Vector, and the keystream generation is separate from the message
Speaker 1: completely separate.
Speaker 2: Keystream generation doesn't depend on the plaintext or ciphertext. You
Speaker 2: just XR the plaintext with the generated keystream.
Speaker 1: Bits and linear feedbackshift registers LFSRs are used for making keystreams.
Speaker 2: They're a basic building block, simple hardware shift bits along
Speaker 2: calculate the next bit using XORs of previous bits based
Speaker 2: on a feedback polynomial.
Speaker 1: But they have weaknesses.
Speaker 2: Yeah, they're linearity algorithms like burlycamp Massy can figure out
Speaker 2: the feedback polynomial if they see enough of the output stream.
Speaker 2: So real world stream ciphers use more complex nonlinear methods
Speaker 2: on top of or instead of basic LFSRs.
Speaker 1: Okay, let's shift to block ciphers. Now, how are they different.
Speaker 2: Block ciphers work on fixed sized chunks of data like
Speaker 2: one hundred and twenty eight bits for as stream ciphers
Speaker 2: work bit by bit or bite by byte. Block ciphers
Speaker 2: use the same key for each block, but apply complex
Speaker 2: transformation within each block, usually.
Speaker 1: Over multiple rounds, and they're fundamental.
Speaker 2: Very use for encrypting bulk data and also as components
Speaker 2: in other crypto things like hash functions or even stream
Speaker 2: ciphers when used in certain modes.
Speaker 1: kDa and AES are the main standards mentioned right.
Speaker 2: TDA or triple DS was a way to strengthen the
Speaker 2: older DS by applying it three times. DS itself has
Speaker 2: two small a key size fifty six bits now, as
Speaker 2: is the modern standard keys one hundred and twenty eight
Speaker 2: hundred and ninety two two hundred fifty six bits. Stronger
Speaker 2: design the.
Speaker 1: Old DEES process, and it intricate permutations key schedules that
Speaker 1: f function.
Speaker 2: It was initial permutation scrambles the block, then sixteen rounds.
Speaker 2: Each round splits the block uses the round key derived
Speaker 2: via the key schedule in the F function on one
Speaker 2: half xrs the result with the other half than swaps halves. Finally,
Speaker 2: an inverse initial permutation. The F function itself involved expansion,
Speaker 2: s box substitutions, and permutation.
Speaker 1: Complex and the meat and the middle attack worked against
Speaker 1: double des yes.
Speaker 2: And it reduces the security significantly. Instead of trying all
Speaker 2: key pairs huge number, you encrypt the plain text with
Speaker 2: all possible first keys and decrypt the ciphertext of all
Speaker 2: possible second keys. You store the results and look for
Speaker 2: a match in the middle.
Speaker 1: Cuts down the work dramatically massively.
Speaker 2: It makes double des not much stronger than single ds
Speaker 2: against this attack. TDA is structured to resist this better,
Speaker 2: but it's still not ideal.
Speaker 1: Compared to AES, AES has its own steps.
Speaker 2: Like SI subbites right, AES uses a state matrix sub
Speaker 2: bytes replaces each byte using an s box lookup. Unlike
Speaker 2: DESS boxes, the ads F box has a clear mathematical
Speaker 2: structure based on finite field arithmetic. It provides nonlinearity, and
Speaker 2: mixed columns uses polynomial math YEP. Mixed columns mixes the
Speaker 2: bytes within each column of the state matrix. Treating columns
Speaker 2: as polynomials over a finite field. This provides diffusion changes
Speaker 2: spread quickly.
Speaker 1: Across the block and ad round key.
Speaker 2: That's the simpler step. Just xor the current state with
Speaker 2: the round key derived from the main key via the
Speaker 2: key schedule. This introduces the key material into the process
Speaker 2: each round.
Speaker 1: Okay, so that's encrypting one block. But for longer messages
Speaker 1: we need modes of operation exactly.
Speaker 2: A mode tells you how to use the block cipher
Speaker 2: repeatedly for a longer message. Different modes have different security
Speaker 2: properties and uses.
Speaker 1: Like ECB Electronic Codebook, simple but flawed.
Speaker 2: Very flawed for most uses, encrypts each block independently with
Speaker 2: the same key. The big problem identical p plain text
Speaker 2: blocks produce identical sofa text.
Speaker 1: Block, which reveals patterns.
Speaker 2: Totally encrypt an image with large areas of the same
Speaker 2: color using ECB, and you can often still see the
Speaker 2: outline of the original image in the ciphertext. Generally avoid
Speaker 2: ECB unless you have very specific, short, non repeating data.
Speaker 1: CBC cipher blockchaining is.
Speaker 2: Better, much better. Before encrypting a plaintext block, you XORR
Speaker 2: it with the previous ciphertext block for the first block,
Speaker 2: you use a random IV, so.
Speaker 1: Each ciphertext block depends on all previous plaintexts.
Speaker 2: Right, it hides patterns, but the IV needs to be unpredictable.
Speaker 2: If an attacker knows the IV, it can cause problems.
Speaker 1: Then OFB and CTR modes they act like stream ciphers.
Speaker 2: Yeah, they turn a block cipher into a stream cipher
Speaker 2: OFB feeds the cipher's output back as input for the
Speaker 2: next stage. CTR encrypts a counter value for each block
Speaker 2: and xrrs that result. With the plaintext advantages, CTR especially
Speaker 2: is efficient, can be parallelized, and doesn't need padding if
Speaker 2: the message isn't a perfect multiple of the block size,
Speaker 2: it's quite popular.
Speaker 1: And the birthday paradox vulnerability, how does that apply?
Speaker 2: The birthday paradox shows you don't need that many people
Speaker 2: in a room to have a good chance of to
Speaker 2: sharing a birthday. In crypto, with block size in after
Speaker 2: about two en blocks, you have a decent chance of
Speaker 2: seeing two identical ciphertext blocks a collision. What does that
Speaker 2: collision mean depends on the mode. In ECB, it means
Speaker 2: identical plaintext blocks. In other modes, it might leak some
Speaker 2: information or enable certain attacks. It tells us the block
Speaker 2: size needs to be large enough like EES is one
Speaker 2: hundred and twenty eight bits to make two and two
Speaker 2: a huge unachievable number of blocks.
Speaker 1: Okay, moving beyond just confidentiality, authenticated encryption right.
Speaker 2: This provides confidentiality and integrity authenticity together. Standard modes like
Speaker 2: CBC don't inherently stop someone from tampering with the ciphertext.
Speaker 1: How does authenticated encryption work?
Speaker 2: Modes like GCM glows countermode combine an encryption mode like
Speaker 2: CTR with a way to generate an authentication tag like GMAC.
Speaker 2: This tag is calculated over the ciphertext and optionally some
Speaker 2: associated data you want to protect but not encrypt like headers. Exactly.
Speaker 2: The receiver decrypts and also recalculates the tag. If the
Speaker 2: calculated tag doesn't match the received tag, they know the
Speaker 2: data was tampered with or is an authentic GCM uses
Speaker 2: a nonce number used ones for each encryption.
Speaker 1: And GMC is just the authentication part.
Speaker 2: Yes, if you only need integrity and authenticity and not confidentiality.
Speaker 1: These modes using nonzs like GCM CCM ASGCM SIV. They
Speaker 1: help against replay attacks too.
Speaker 2: Yes, because the nonce should be unique for each message
Speaker 2: under the same key. Replaying an old message with its
Speaker 2: nons would likely be detected or processed differently, and using
Speaker 2: nonzas means encrypting the same plaintext twice gives different ciphertexts,
Speaker 2: hiding repetitions.
Speaker 1: And they can resist chosen ciphertext attacks.
Speaker 2: That's a major goal. In a chosen ciphertext attack, the
Speaker 2: attacker gets to see plaintext for ciphertexts they choose authenticated
Speaker 2: encryption modes boil this because if the attacker submits a
Speaker 2: tampered ciphertext, the integrity check the tag verification fails, and
Speaker 2: the decryption process refuses to output plaintext or signals and error.
Speaker 2: It stops the attacker from learning through manipulated ciphertexts.
Speaker 1: Okay, so we have all these tools, how do we
Speaker 1: actually analyze if they're secure?
Speaker 2: Good question. Modern crypto relies on computational security. We assume
Speaker 2: the attacker has limited computing power. Security and analysis tries
Speaker 2: to prove that breaking the system would take an infeasible
Speaker 2: amount of computation.
Speaker 1: Using theoretical models like adversaries with access.
Speaker 2: To oracles exactly. An oracle is a hypothetical black box
Speaker 2: the attacker can query like an encryption oracle, give it plaintext,
Speaker 2: it returns ciphertext using the secret key. By seeing how
Speaker 2: the oracle responds to chosen inputs, the attacker tries to
Speaker 2: learn the key or break the system. Different oracles model
Speaker 2: different attack capabilities, and we.
Speaker 1: Talk about permutation families and function families.
Speaker 2: Yeah, that's mathematical modeling. A block cipher with a fixed
Speaker 2: key acts like a permutation, a scrambling of all possible blocks.
Speaker 2: The family is the set of all possible permutations you
Speaker 2: get by using all possible keys. We analyze how close
Speaker 2: this family is to a family of truly random permutations
Speaker 2: or functions. HMAC is an example where this analysis is used.
Speaker 1: The goal is to limit the adversaries advantage. Right.
Speaker 2: The advantage is how much better the adversary can do
Speaker 2: at breaking the system, like distinguishing cipher output from random
Speaker 2: or finding the key, compared to just guessing randomly. A
Speaker 2: secure system keeps the maximum possible advantage negligibly small, even
Speaker 2: for powerful adversaries.
Speaker 1: The notes give an example of an insecure PRP Yeah.
Speaker 2: A pseudorandom permutation. If the output is predictable from the input,
Speaker 2: it's not behaving randomly, so it's insecure. A simple linear
Speaker 2: relationship would be an example.
Speaker 1: And double encryption isn't always much better if the underlying
Speaker 1: cipher isn't a secure PRP.
Speaker 2: Correct We saw that with meat in the middle on
Speaker 2: double dies. If the cipher has exploitable structure just layering,
Speaker 2: it might not help as much you'd hope. But if
Speaker 2: it is a secure PIP, double encryption is generally.
Speaker 1: Strong and predictable ivs in CBC mode a big.
Speaker 2: Problem, huge problem. If the attacker can predict the iv
Speaker 2: they can potentially control parts of the plaintext after decryption,
Speaker 2: especially the first block. It breaks the confidentiality goals. Ivs
Speaker 2: must be unpredictable, usually random.
Speaker 1: There's even a formula shown for calculating adversary advantage in
Speaker 1: aes GCMSIV based on nonce usage and message lengths. Looks
Speaker 1: complicated it is.
Speaker 2: Those formulas come from deep security proofs. They quantify the
Speaker 2: security based on usage parameters, how many messages, how long
Speaker 2: nonce collisions which should never happen. They give concrete security bounds.
Speaker 1: Okay, let's switch to the attacker side. Cryptanalysis attacks on symmetric.
Speaker 2: Ciphers, right, how do people try to break.
Speaker 1: These things, route force is the obvious one.
Speaker 2: Simplest idea, try every possible key feasible For small key
Speaker 2: spaces like old dees fifty six bits, but for as
Speaker 2: one twenty eight or higher, the number of keys is astronomical.
Speaker 2: Twenty one to twenty eight is just impossibly large to search,
Speaker 2: so brute force is usually not a practical threat for
Speaker 2: modern ciphers. Dictionary attacks that target's weak passwords used to
Speaker 2: derive keys. Attacker tries common words, names variations from a
Speaker 2: dictionary list, hashes them, and compares against stolen password hashes.
Speaker 2: Not an attack on the cipher itself, but on poor
Speaker 2: key generation from passwords.
Speaker 1: Meet and that'll be covered. What about time memory trade
Speaker 1: offs like rainbow.
Speaker 2: Tables clever idea. You pre compute a lot of data
Speaker 2: to speed up the actual attack leader. Rainbow tables are
Speaker 2: often used against password hashes. You precalculate chains of hashes
Speaker 2: starting from possible passwords. You store only the start and
Speaker 2: end points of these chains.
Speaker 1: How does that help crack a specific hash?
Speaker 2: You take the target hash, run it backwards through the
Speaker 2: chain logic, and see if you hit an endpoint stored
Speaker 2: in your table. If you do, you can regenerate the
Speaker 2: chain from the corresponding start point to find the original password.
Speaker 2: It trades storage space for the table for attack.
Speaker 1: Time fifty than the really advanced stuff.
Speaker 2: Yeah.
Speaker 1: Linear and differential cryptanalysis.
Speaker 2: Yeah, these are powerful techniques against the internal structure of
Speaker 2: block ciphers. Linear cryptanalysis looks for statistical linear approximations relationships
Speaker 2: involving XO R sums of plaintext bits, ciphertext bits, and
Speaker 2: key bits that hold slightly more often than random chance.
Speaker 2: And differential differential cryptanalysis studies how differences between pairs of
Speaker 2: inputs propagate through the cipher rounds. You choose input pairs
Speaker 2: with a specific difference and look at the probability distribution
Speaker 2: of the output differences. Certain differences might occur more often
Speaker 2: than expected, leaking information about the key. The difference distribution
Speaker 2: table DDT analyzes this for the s boxes.
Speaker 1: And even more advanced versions exist.
Speaker 2: Yes, higher ordered differential looks at differences of differences. Algebraic
Speaker 2: cryptanalysis tries to write the whole cipher as a system
Speaker 2: of algebraic equations, often using boolean polynomials, and then solve
Speaker 2: for the key. Superpoles are specific algebra of structures used
Speaker 2: in some of these attacks.
Speaker 1: Wow, okay, deep stuff. Let's witch paradigms completely. Now public
Speaker 1: key cryptosystems, what's the big idea here?
Speaker 2: The game changer is having two keys, a public key
Speaker 2: you can share with anyone and a private key you
Speaker 2: keep secret. No need to securely share a secret beforehand.
Speaker 1: How does that work for sending a message?
Speaker 2: Alice wants to send a secret message to Bob. She
Speaker 2: encrypts it using Bob's public key. Only Bob with his
Speaker 2: corresponding private key it can decrypt. It solves the key
Speaker 2: distribution headache of symmetric.
Speaker 1: Crypto and RSA is the classic example based on factoring
Speaker 1: large numbers exactly.
Speaker 2: Security relies on it being really hard to factor a
Speaker 2: large number n into its two large prime factors P
Speaker 2: and Q. Key generation involves picking P and q, calculating mpq,
Speaker 2: and finding exponents E public and D private that have
Speaker 2: a special mathematical relationship involving P and Q.
Speaker 1: Encryption is message m to the power of E mod n.
Speaker 2: Yep cels me mod n, and.
Speaker 1: Decryption is ciphertech C to the power of D mod en.
Speaker 2: Correct mlcd mod n. The math just works.
Speaker 1: Out elegant and cot DRSA speeds up decryption.
Speaker 2: Yes, using the Chinese remainder theorem, it breaks the CD
Speaker 2: mod end calculation into smaller calculations modp and mod q
Speaker 2: than combines the results much faster.
Speaker 1: Is basic RSA secure enough on its own? The notes
Speaker 1: mentioned semantic security issues.
Speaker 2: Right, plaintextbook, RSA isn't semantically secure. Encrypting the same message
Speaker 2: twice gives the same ciphertext. An attacker could guess possible messages,
Speaker 2: encrypt them with the public key, and see if they
Speaker 2: match the intercepted ciphertext.
Speaker 1: So how do we fix that?
Speaker 2: Padding schemes? You add randomness to the message before RSA encryption.
Speaker 2: RSAPSS is a modern standard for this. It ensures encrypting
Speaker 2: the same message twice gives different results, crucial for real
Speaker 2: world security.
Speaker 1: And RSA can do digital signatures too.
Speaker 2: Yes, you just reverse the keys to sign You hash
Speaker 2: the message, then encrypt the hash with your private key.
Speaker 2: Anyone can verify by decrypting the signature with your public
Speaker 2: key and checking if it matches the hash of the
Speaker 2: message they received.
Speaker 1: Other public key systems mentioned are elgamol and DSA.
Speaker 2: Elgamol is another option often for encryption based on a
Speaker 2: different hard problem, the discrete logarithm problem DLP in a
Speaker 2: finite field DSA digital signature algorithm is specifically for signatures.
Speaker 2: Also based on DLP, Schnor signatures are another DLP based
Speaker 2: signature scheme known for efficiency.
Speaker 1: Are there specific attacks against RSA itself.
Speaker 2: Yes, things like choosing a small private exponent can sometimes
Speaker 2: make it vulnerable, or the common modulus attack. If two
Speaker 2: people use the same n but different ease, and you
Speaker 2: encrypt the same message to both, it might be breakable.
Speaker 2: Proper key generation avoids these.
Speaker 1: Okay, diffy Hillman key exchange that's about agreeing on.
Speaker 2: A key exactly allows two parties, Alice and Bob to
Speaker 2: establish a shared secret key over a public channel without
Speaker 2: setting the key itself. It's amazing, also based on the
Speaker 2: discrete logarithm problem.
Speaker 1: How does it work? Roughly?
Speaker 2: They agree publicly on a prime P and a generator G.
Speaker 2: Alice pick secret A, Bob picks secret B. Alice sends
Speaker 2: gay mod P to Bob. Bob sends gb MODP to Alice.
Speaker 2: Alice calculates do B MODP both get the same results
Speaker 2: GB MODP. That's their shared secret.
Speaker 1: Ingenius but vulnerable demand in the middle.
Speaker 2: The basic protocol is yes. If Mallory sits between Alice
Speaker 2: and Bob, she can intercept their public values j JB
Speaker 2: and substitute her own GM. She does a separate dage
Speaker 2: exchange with Alice getting secret GAM, and another with Bob
Speaker 2: getting secret tobm Alice thinks she's talking to Bob, Bob
Speaker 2: thinks he's talking to Alice, but both are actually talking
Speaker 2: to Mallory, who relays messages reading everything.
Speaker 1: So authentication is needed.
Speaker 2: Absolutely critical. You need to verify who you're doing the
Speaker 2: exchange with, usually using digital signatures or pre shared keys,
Speaker 2: before you trust the resulting shared secret.
Speaker 1: Okay, Now, Elliptic curve cryptography ECC, what's the big deal? There?
Speaker 2: Main advantage much smaller keys for the same level of
Speaker 2: security compared to RSA or traditional Diffie Hellman.
Speaker 1: Why.
Speaker 2: It's based on the math of elliptic curves over finite fields.
Speaker 2: The hard problem is the elliptic curve discrete logarithm problem ECDLP,
Speaker 2: which seems to be harder than factoring or the standard
Speaker 2: DLP for the same key size.
Speaker 1: So smaller keys mean faster operations, less bandwidth, good for mobile.
Speaker 2: Devices exactly big benefits and resource constrained environments.
Speaker 1: An elyptic curve isn't like a geometric ellipse.
Speaker 2: No, it's defined by a specific cubic equation like y
Speaker 2: two equals three plus x plus b. The points xy
Speaker 2: satisfying this over a finite field plus a point at
Speaker 2: infinity form a group. You can define point addition and
Speaker 2: scaler multiplication repeated edition on these points, and.
Speaker 1: That math forms the basis for ECC crypto.
Speaker 2: Yes, you can do diffy Hellman on elliptic curves ECDH,
Speaker 2: Digital Signatures e CDSA and integrated encryption schemes ecees same
Speaker 2: concepts as before, but using elliptic curve point operations instead
Speaker 2: of modular exponentiation.
Speaker 1: The notes even show point doubling on a curve looks involved.
Speaker 2: The formulas can look messy, but they're just the rules
Speaker 2: for the group operation on the curve.
Speaker 1: Points.
Speaker 2: Point doubling, adding a point to itself, and point addition
Speaker 2: are the core operations needed for scaler multiplication, which is
Speaker 2: how you use the private key.
Speaker 1: Okay, we've covered a ton of crypto concepts. Let's move
Speaker 1: to part two. Practical implementation. Starting with key management seems crucial,
Speaker 1: but maybe overlooked hugely crucial.
Speaker 2: You can have the best algorithms in the world, but
Speaker 2: if your keys are handled badly generated, weekly stored, and
Speaker 2: securely lost stolen, the whole system fails. Key management is
Speaker 2: the entire life cycle generation, storage, distribution, use, backup, revocation, destruction.
Speaker 1: And there are many types of keys.
Speaker 2: Oh yeah, symmetric encryption keys, key wrapping keys to encrypt
Speaker 2: other keys, master keys, key derivation keys, and mac keys,
Speaker 2: key agreement keys, signature keys, verification keys. Each has a
Speaker 2: specific job and needs managing properly.
Speaker 1: Key derivation functions kdfs help general.
Speaker 2: Yes, KDS takes some initial secret material like a password
Speaker 2: or a Divvyhulman shared secret, and derive one or more
Speaker 2: strong cryptographic keys from it. They often add salt and
Speaker 2: use iteration to make the derived keys resistant to attacks,
Speaker 2: even if the initial secret isn't perfectly random. The note
Speaker 2: showed different KDF modes like counter feedback double pipelined, so.
Speaker 1: Kdfs are used for establishing symmetric keys too often.
Speaker 2: Yes, you might establish a shared secret using DH, then
Speaker 2: run that secret through a KDF to get the actual
Speaker 2: encryption and MSS keys for your session.
Speaker 1: And generating RSA or ECC key pairs.
Speaker 2: RSA involves finding those large primes P and q, then
Speaker 2: calculating N, E and D. ECC involves picking curve parameters
Speaker 2: in a base point, then choosing a random private key
Speaker 2: an integer, and computing the public KeyPoint via scalar multiplication.
Speaker 2: Both need good randomness and careful parameter selection.
Speaker 1: Key distribution Centers KDCs, like Curbaro's centralized key management.
Speaker 2: In a network setting. Yes, Carbero's uses a trusted KDC.
Speaker 2: A client authenticates to the kdc's authentication server AS using
Speaker 2: a long term secret like derived from a password. The
Speaker 2: AS gives back a ticket granting ticket TGT to access
Speaker 2: a specific service. The client presents the TGT to the
Speaker 2: kdc's ticket granting server TGS, asking for a service ticket.
Speaker 2: The TGS issues a ticket encrypted for the service, plus
Speaker 2: a session key for the client and service. The client
Speaker 2: presents the ticket to the service. They both extract a
Speaker 2: session key and can communicate securely.
Speaker 1: Streamlines things reduces password sending, but still needs authentication. For
Speaker 1: Diffie Helman if used.
Speaker 2: Yes, even if you use static Diffie Hellman keys DH static,
Speaker 2: you must authenticate the exchange somehow, maybe with certificates or
Speaker 2: signatures to prevent those man in the middle attacks. Basic
Speaker 2: DH isn't enough on its own, which.
Speaker 1: Brings us to digital certificates and PKI public key infrastructure.
Speaker 1: How do they establish trust?
Speaker 2: Certificates Link a public key to an identity, person, server, etc.
Speaker 2: A Certificate authority CAA verifies the identity and then digitally
Speaker 2: signs the certificate containing the public key and identity info
Speaker 2: using the CAA's private key.
Speaker 1: So I trust the CAA.
Speaker 2: You can verify the CAA's signature on the certificate using
Speaker 2: the CAA's public key. If it's valid, you trust that
Speaker 2: the public key in the certificate really belongs to the
Speaker 2: entity named in it. It builds a web of.
Speaker 1: Trust, and they're different CAA structures single, two tier, three
Speaker 1: tier right.
Speaker 2: Single tier is simple but risky. Root CAA compromises catastrophic.
Speaker 2: Two tier has intermediate CAAs issuing certificates protected by the
Speaker 2: root CAA. Three tier adds more layers, often for policy enforcement.
Speaker 2: More tiers give more flexibility and limit the root CAA's exposure,
Speaker 2: but add complexity.
Speaker 1: How do we know if a certificate is still good
Speaker 1: even before it expires? What if the key got stolen?
Speaker 2: Good point. CAAs maintain certificate revocation lists CRLs, lists of
Speaker 2: serial numbers of certificates that are no longer valid. Browsers
Speaker 2: or applications are supposed to check these CRLs.
Speaker 1: That sounds slow downloading big lists.
Speaker 2: It can be The alternative is OCSP Online Certificate Status protocol.
Speaker 2: The application directly queries an OCSP responder run by the
Speaker 2: CAA about a specific certificate status. It's faster for checking
Speaker 2: one cert.
Speaker 1: And TLS for secure web connections. HTTPS uses all this heavily.
Speaker 2: When your browser connects to an HTTPS site, the server
Speaker 2: sends its certificate. Your browser verifies the signature, tracing it
Speaker 2: back to a trusted root. CAA checks the expiration date,
Speaker 2: checks for revocation CROCSP, and make sure the name matches.
Speaker 2: If all checks out, the browser trusts the server's.
Speaker 1: Public key and uses that public key for for the.
Speaker 2: Key exchange part of the TLS handshake. They use the
Speaker 2: server's public key or Diffie Hellman, authenticated by the certificate
Speaker 2: to establish a symmetric session p for encrypting the actual
Speaker 2: website data. The key share extension helps negotiate the specifics
Speaker 2: of this exchange and cerberos.
Speaker 1: Besides key distribution is also just a general authentication system.
Speaker 2: Yes, its main goal is authentication in its network centralized secrets.
Speaker 2: Ticket based access avoid sending passwords repeatedly. Strong system, but
Speaker 2: depends heavily on the KDC being available and secure and
Speaker 2: requires unique names.
Speaker 1: Okay, last practical area. Generating pseudorandom and prime numbers. We
Speaker 1: need randomness everywhere and primes for.
Speaker 2: RSA absolutely good randomness. High entropy is the foundation. PRNGs
Speaker 2: need to be seated with entropy. We need drbg's deterministic
Speaker 2: random bit generators based on cryptoprimitives like hashes or block
Speaker 2: ciphers to generate long sequences from a good seed, and.
Speaker 1: The period of a PRNG needs to be long.
Speaker 2: Very long, ideally astronomical. If the sequence repeats too soon,
Speaker 2: it's predictable and insecure.
Speaker 1: Entropy measures the unpredictability.
Speaker 2: Yes, more entropy in your random source means more unpredictability.
Speaker 2: Drbgs have a security strength related to the entropy of their.
Speaker 1: Seed and prime number generation. Not just picking random numbers.
Speaker 2: No, you generate a large random odd number, then test
Speaker 2: if its prime trial division is too slow. We use
Speaker 2: probabilistic tests like.
Speaker 1: Mil Rabin probabilistic, not guaranteed.
Speaker 2: Miler raven gives very high probability run at enough times,
Speaker 2: and the chance of a composite number slipping through is
Speaker 2: prime becomes vanishingly small, small enough for cryptographic purposes. There
Speaker 2: are deterministic tests like aks, but often slower. Sometimes specific
Speaker 2: strong primes are generated for extra resilience.
Speaker 1: Okay. The source material also has review questions and an
Speaker 1: index helpful for learning.
Speaker 2: Definitely, exercises help solidify understanding questions about key usage, hash
Speaker 2: collisions diffy Hellman. They test if you grasp with the concepts,
Speaker 2: and a good index is invaluable for quickly finding details
Speaker 2: on specific topics like AES or boot force attacks.
Speaker 1: Well, this has been quite the journey through cryptography and
Speaker 1: security from the core math to real world systems.
Speaker 2: It really has, and it's amazing how these concepts, often invisible,
Speaker 2: underpins so much of our digital safety.
Speaker 1: It's complex, no doubt, but hopefully listeners now have a
Speaker 1: better feel for what's going on behind the scenes, what
Speaker 1: makes these technologies secure or potentially insecure?
Speaker 2: Right, Which leads to maybe a final thought for you,
Speaker 2: the listener. Given how fast threats and defenses evolve in
Speaker 2: this space, what's our responsibility as individuals as organizations to
Speaker 2: keep learning and adapting our own security practices.
Speaker 1: That's a really important question something to think about. We
Speaker 1: definitely encourage you to dig deeper into the source materials
Speaker 1: if specific topics caught your interest.
Speaker 2: Yeah, this deep dive is really just scratching the surface
Speaker 2: of a fascinating and vital field. There's always more to learn.