Latest / CyberCode Academy / Course 37 - Building Web Apps with Ruby On Rails | Episode 8: Mastering Sessions, Encrypted Cookies, and CSRF Protection
Transcript
- 0:00Speaker 1: If you have ever built a web application, are you're
- 0:04Speaker 1: probably intimately familiar with the massive headache of statelessness.
- 0:08Speaker 2: Oh absolutely, the amnesia.
- 0:10Speaker 1: Problem, Yes, exactly. You authenticate a user, right, they get
- 0:14Speaker 1: their username and password perfectly right, But then they click
- 0:17Speaker 1: a link to view their dashboard, and the server immediately
- 0:21Speaker 1: forgets who they are. You're logged out again, right.
- 0:24Speaker 2: Because the HTTP protocol treats every single request as a
- 0:28Speaker 2: completely isolated event, it has severe immediate amnesia.
- 0:33Speaker 1: It's so frustrating when you first encounter it. Knowing a
- 0:36Speaker 1: password is correct is entirely useless if the website can't
- 0:39Speaker 1: actually remember it as you move around. So today's deep
- 0:42Speaker 1: dive is all about the invisible machinery that keeps you
- 0:45Speaker 1: logged in across the web.
- 0:46Speaker 2: It's a really fascinating architecture once you get under the hood,
- 0:49Speaker 2: it really is.
- 0:50Speaker 1: We're going to explore sessions, uncover how encrypted cookies actually work,
- 0:54Speaker 1: and reveal the hidden tokens keeping ackers at bay.
- 0:57Speaker 2: And to make this really practical to ground in reality,
- 1:01Speaker 2: we will conceptually walk step by step through how a
- 1:04Speaker 2: framework like Rubyon Rails, for example, handles this memory. The
- 1:07Speaker 2: specific syntax varies between you know, Django or layravel or express,
- 1:12Speaker 2: but the underlying architecture for maintaining state it remains universally applicable.
- 1:18Speaker 2: We're basically mapping a permanent database record to the ephemeral
- 1:22Speaker 2: activity of a client clicking around a website.
- 1:24Speaker 1: Okay, so before we even look at the state mechanism itself,
- 1:28Speaker 1: we need to talk about the database layer, because if
- 1:30Speaker 1: we're mapping a browser session to a user record, we
- 1:33Speaker 1: need absolute certainty about identity exactly. Identity is paramount, so
- 1:38Speaker 1: that means enforcing uniqueness constraints directly on the database schema,
- 1:43Speaker 1: like for fields like email and username. You can't just
- 1:46Speaker 1: do it at the application model layer.
- 1:48Speaker 2: No, you really can't. If you rely solely on application
- 1:50Speaker 2: level validations, you open yourself up to race.
- 1:53Speaker 1: Conditions where concurrent requests basically create duplicate records at the
- 1:56Speaker 1: exact same millisecond.
- 1:58Speaker 2: Yeah, and if two users end up with the same
- 2:01Speaker 2: identifier in the database, the session mechanism fundamentally breaks the server.
- 2:05Speaker 2: It cannot definitively map the state to the correct permission set.
- 2:09Speaker 1: Right. So once that data integrity is locked in at
- 2:11Speaker 1: the database level, we introduce the session and in a
- 2:15Speaker 1: model view controller architecture. Establishing this state usually revolves around
- 2:20Speaker 1: a master controller.
- 2:21Speaker 2: Right like the application controller in rails exactly.
- 2:25Speaker 1: Since Ruby class's inherent behavior, every other controller in the
- 2:28Speaker 1: application derives from this single point of truth, it's the
- 2:32Speaker 1: perfect place to put our authentication logic.
- 2:35Speaker 2: It functions as the primary gate keeper for the whole app.
- 2:38Speaker 1: I always like to picture it like a head bouncer
- 2:40Speaker 1: at a club. Instead of putting a bouncer at the
- 2:42Speaker 1: door of every single room, like the dashboard, the settings page,
- 2:46Speaker 1: the billing module, you just put a head bouncer at
- 2:48Speaker 1: the front door.
- 2:49Speaker 2: That's a great analogy. You define a before action filter
- 2:52Speaker 2: right at the.
- 2:53Speaker 1: Root right you check for VIP status before anything else happens.
- 2:56Speaker 1: You use methods like before action authorize logged inurrent user exactly.
- 3:01Speaker 2: The current user method basically interrogates the incoming request for
- 3:05Speaker 2: a session identifier, and then it queries the database and.
- 3:08Speaker 1: If that query returns nil.
- 3:10Speaker 2: Then the subsequent authorized method intercepts the routing life cycle entirely.
- 3:14Speaker 2: It forces an HTTP three H two redirect right back
- 3:18Speaker 2: to the log in page.
- 3:19Speaker 1: Bam bouncer says no, right, It stops.
- 3:22Speaker 2: The execution before the specific controller action is ever even instantiated.
- 3:26Speaker 2: But that centralized gatekeeping actually introduces a classic architectural trap.
- 3:32Speaker 1: Oh, the infinite loop.
- 3:33Speaker 2: Yes, the infinite redirect loop. It's a rite of passage
- 3:36Speaker 2: for developers.
- 3:37Speaker 1: True.
- 3:37Speaker 2: If you tell the base controller to demand authentication before
- 3:40Speaker 2: processing literally any request, you create a recursive failure, because
- 3:45Speaker 2: what happens when an unauthenticated client requests the log in
- 3:49Speaker 2: page itself.
- 3:49Speaker 1: The bouncer stops them, the browser issues a get request
- 3:53Speaker 1: to the log in page. The server realizes they lack
- 3:55Speaker 1: a session, so it responds with a redirect back to
- 3:58Speaker 1: the log in page, and.
- 3:59Speaker 2: The browse or dutifully follows the redirect, issuing another get request.
- 4:03Speaker 1: Which hits the bouncer again, over and over. It's a
- 4:06Speaker 1: recursive spiral that only ends when the browser's internal limit
- 4:09Speaker 1: is tripped and you get that beautiful air too many
- 4:12Speaker 1: redirects network failure.
- 4:13Speaker 2: So how do we fix it? We have to carve
- 4:15Speaker 2: out public exception.
- 4:16Speaker 1: Right using a skip before action property, you basically tell
- 4:19Speaker 1: the bouncer, hey, let people into the lobby so they
- 4:22Speaker 1: can show you their ID. You allow exceptions for the
- 4:24Speaker 1: log in page and the public homepage exactly.
- 4:27Speaker 2: And once you fix that, the routing logic stabilizes upon
- 4:31Speaker 2: a successful credential check, the application assigns the database ID
- 4:36Speaker 2: to the session object.
- 4:37Speaker 1: The user is authenticated.
- 4:39Speaker 2: Yeah, and the server can now use conditional rendering logic
- 4:43Speaker 2: like a simple ternary operator with a question mark in
- 4:45Speaker 2: the code to dynamically serve distinct views like.
- 4:49Speaker 1: Showing a logout button and account settings only to users
- 4:52Speaker 1: with an active session, and logging out just deletes that
- 4:55Speaker 1: user ID from the session.
- 4:56Speaker 2: Right, But establishing that state forces a massive infrastructural decision
- 5:01Speaker 2: where does the session actually live exactly? The data representing
- 5:05Speaker 2: that session has to be stored somewhere, and the choice
- 5:07Speaker 2: of storage medium basically dictates the saleability of the entire application.
- 5:11Speaker 1: Okay, let's unpack the storage dilemma. There are three primary methods, right,
- 5:15Speaker 1: starting with memory storage.
- 5:17Speaker 2: Yeah, memory storage. This is where the session data resides
- 5:20Speaker 2: in the active RAM of the application.
- 5:22Speaker 1: Server, which is incredibly fast.
- 5:24Speaker 2: Super fast reading and writing to local memory avoids any
- 5:27Speaker 2: network latency or disco but it introduces a catastrophic bottleneck
- 5:32Speaker 2: the moment you scale beyond a single server.
- 5:35Speaker 1: Because if the server restarts boom, everyone is logged out right.
- 5:39Speaker 2: And worse, when traffic necessitates horizontal scaling, where you distribute
- 5:43Speaker 2: the load across multiple servers in memory. Storage just shatters
- 5:47Speaker 2: the state.
- 5:47Speaker 1: Ah, because of the load balancer.
- 5:49Speaker 2: Exactly, you have a load balancer sitting in front distributing requests.
- 5:53Speaker 2: If you authenticate on server A, your session is in
- 5:56Speaker 2: server a's memory.
- 5:57Speaker 1: Then you click a link and the load balancer sends
- 5:59Speaker 1: the next request to server B.
- 6:02Speaker 2: And server B has no idea who you are. You
- 6:04Speaker 2: appear entirely unauthenticated.
- 6:06Speaker 1: I know. Some legacy systems try to fix that with
- 6:08Speaker 1: sticky sessions, right, Yeah, like configuring the router to always
- 6:11Speaker 1: send a specific IP back to the original server.
- 6:15Speaker 2: Yeah, but that creates severe uneven load distribution. It kind
- 6:18Speaker 2: of defeats the whole purpose of horizontal scaling. Plus, if
- 6:21Speaker 2: server A goes down, every single user pin to it
- 6:24Speaker 2: is instantly logged out anyway.
- 6:26Speaker 1: So memory is out for big apps. What about database storage?
- 6:30Speaker 2: Database storage solves the sharing problem. You persist session records
- 6:34Speaker 2: in your primary relational database like postgres School or my school.
- 6:39Speaker 2: Every application server queries the exact same central hub.
- 6:43Speaker 1: But the trade off is performance. Yeah, database queries are expensive.
- 6:46Speaker 2: Very expensive. Hitting the database on every single page load
- 6:49Speaker 2: just to verify a session identifier. It introduces heavy read
- 6:53Speaker 2: latency and totally unnecessary.
- 6:55Speaker 1: Overhead, which is why you see big production environments using
- 6:58Speaker 1: external in MAMA marine key value stores like rehttis or mamcash.
- 7:02Speaker 1: You get the speed of RAM with centralized.
- 7:04Speaker 2: Persistence, right, But managing a REDUS cluster is a whole
- 7:07Speaker 2: extra layer of infrastructure, which brings us to the third option,
- 7:10Speaker 2: and this is the default for RAILS and many modern frameworks,
- 7:14Speaker 2: cookie based storage. Instead of using server side infrastructure to
- 7:17Speaker 2: store the data, the application pushes the payload to the client,
- 7:21Speaker 2: it stores it entirely within the user's browser.
- 7:23Speaker 1: Wait, hold on, let's really unpack this. Okay, we are
- 7:26Speaker 1: storing sensitive session data on the client's device. What if
- 7:30Speaker 1: we have sensitive user info in there? Isn't trusting the
- 7:34Speaker 1: user's browser a massive security risk? I mean, if the
- 7:38Speaker 1: app is storing my user ID locally on my machine,
- 7:41Speaker 1: it's effectively trusting me with the keys to the authorization system.
- 7:45Speaker 2: It sounds counterintuitive, I know, yeah.
- 7:48Speaker 1: If the payload is just serialized JSON data, I could
- 7:51Speaker 1: just intercept the cookie, change my user ID to one
- 7:54Speaker 1: which is usually the admin account, and basically compromise the
- 7:57Speaker 1: entire system.
- 7:58Speaker 2: You absolutely could if the framework were utilizing plaintext or
- 8:01Speaker 2: just Base sixty four encoding, but that's not what's happening.
- 8:04Speaker 1: Okay, so how is it secured?
- 8:06Speaker 2: Modern cookie storage relies on authenticated encryption. The server isn't
- 8:10Speaker 2: just handing over raw data. It passes the payload through
- 8:13Speaker 2: a cryptographic protocol using a secret key that never ever
- 8:16Speaker 2: leaves the server environment. Think of it like the framework
- 8:20Speaker 2: locking the data inside a digital vault and handing the
- 8:24Speaker 2: vault to the browser.
- 8:25Speaker 1: So the browser can hold the vault, but it can't
- 8:28Speaker 1: open it or tamper with what's.
- 8:29Speaker 2: Inside precisely, And there's an important distinction here between sign
- 8:33Speaker 2: cookies and encrypted cookies, right.
- 8:35Speaker 1: A signed cookie uses a hash based message authentication code
- 8:39Speaker 1: or HMEC.
- 8:40Speaker 2: Yes, the server takes the session payload, runs it through
- 8:44Speaker 2: a hashing algorithm combined with the master secret key, and
- 8:48Speaker 2: generates a unique signature.
- 8:49Speaker 1: Then it says the plaintext payload alongside that signature to.
- 8:52Speaker 2: The browser exactly So, with a sign cookie, the client
- 8:56Speaker 2: can actually read the contents, they can see their user ID,
- 8:59Speaker 2: but if they try to alter it, the signature becomes invalid.
- 9:02Speaker 1: Because when that modified cookie comes back, the server recalculates
- 9:06Speaker 1: the hash using its secret key and the new payload,
- 9:09Speaker 1: and the hashes.
- 9:10Speaker 2: Won't match, right, The server instantly rejects the whole session
- 9:13Speaker 2: as tampered data.
- 9:14Speaker 1: That's clever well, but still exposing the internal state of
- 9:17Speaker 1: the session even if it's read only is kind of undesirable.
- 9:21Speaker 2: It is, which is why the modern default is full encryption,
- 9:25Speaker 2: usually with algorithms like as two fifty six GCM, so instead.
- 9:29Speaker 1: Just a signature, the server uses the master key to
- 9:32Speaker 1: completely scramble.
- 9:33Speaker 2: The payload exactly. The client just receives a string of
- 9:36Speaker 2: cryptographic gibberish.
- 9:38Speaker 1: Now, the mathematical foundation here relies on salts and initialization vectors,
- 9:42Speaker 1: doesn't it.
- 9:42Speaker 2: It does, as salt is a randomly generated sequence of
- 9:46Speaker 2: data injected into the hashing process. It defends against pre
- 9:50Speaker 2: computed dictionary attacks like rainbow tables, because if you just.
- 9:53Speaker 1: Hash a common string like password one twenty three, it
- 9:56Speaker 1: always produces the exact same ciphertext. A hacker with a
- 9:59Speaker 1: ma assive table of hashes can just reverse engineer.
- 10:02Speaker 2: It, right, but by injecting a unique random salt before hashing,
- 10:07Speaker 2: the resulting ciphertext becomes entirely unique. Even if two distinct
- 10:11Speaker 2: users have the exact same session payload, and.
- 10:13Speaker 1: The framework usually manages this using a highly protected file
- 10:17Speaker 1: like a secrets dot ymlll file right.
- 10:19Speaker 2: Yeah or credentials dot yml dot nx. That file holds
- 10:25Speaker 2: the master key base because the math requires this specific
- 10:28Speaker 2: key to run and reverse. An attacker with the encrypted
- 10:31Speaker 2: cookie is totally powerless unless they also have shell access
- 10:35Speaker 2: to the server's environment variables.
- 10:37Speaker 1: So the trust model is just elegantly inverted. The server
- 10:40Speaker 1: offloads the memory storage to the client, but retains absolute
- 10:44Speaker 1: cryptographic authority exactly.
- 10:46Speaker 2: When the browser initiates a request, it returns the ciphertext.
- 10:49Speaker 2: The server intercepts it, usually at the middle where a
- 10:51Speaker 2: layer before it even hits the controller decrypts, it, verifies
- 10:54Speaker 2: the integrity, and instantiates the session object.
- 10:58Speaker 1: It's brilliant, okay, So that cryptographic integrity solves the local
- 11:01Speaker 1: state problem. The payload is tamper proof. But there's still
- 11:05Speaker 1: a massive vulnerability here, isn't there? Oh?
- 11:07Speaker 2: There is, because the whole architecture relies on the browser
- 11:09Speaker 2: automatically attaching that cookie to every outgoing request destined for
- 11:13Speaker 2: the issuing domain.
- 11:14Speaker 1: Right ambient credentials. The browser just blindly attaches the cookie.
- 11:18Speaker 1: So what happens when request is initiated from a malicious.
- 11:21Speaker 2: Origin, and here we arrive at the phantom threat cross
- 11:24Speaker 2: site request forgery or CSRF the classic. It's a huge
- 11:28Speaker 2: issue because it exploits the browser's own helpfulness. Imagine you
- 11:32Speaker 2: log into your financial institution, bank dot com. The bank
- 11:36Speaker 2: server issues your encrypted session cookie.
- 11:38Speaker 1: Okay, I'm logged in.
- 11:40Speaker 2: Then you leave that tab open and you navigate to
- 11:42Speaker 2: a malicious domain, let's call it hacker dot com. That
- 11:46Speaker 2: malicious site contains a hidden HTML form that targets an
- 11:50Speaker 2: endpoint on bank dot com, maybe the endpoint for wiring
- 11:53Speaker 2: money or changing an account password.
- 11:55Speaker 1: And JavaScript on the hackers page automatically submits this form
- 11:58Speaker 1: in the background. You don't even have to click anything exactly.
- 12:01Speaker 2: And when your browser executes that post request to bank
- 12:05Speaker 2: dot com, it sees the destination domain because it holds
- 12:08Speaker 2: a valid sessioncookie for bank dot com, it just automatically
- 12:11Speaker 2: attaches it to the outbound request.
- 12:13Speaker 1: Wow. So the bank server receives the request, decrypts the cookie,
- 12:18Speaker 1: validates the session, and executes the transfer. Assuming you intentionally
- 12:22Speaker 1: made the request.
- 12:23Speaker 2: The cryptography function perfectly, but the context of the request
- 12:26Speaker 2: was completely forged.
- 12:28Speaker 1: That is terrifying. So how do we defend against this?
- 12:31Speaker 1: I know the industry introduced layers of defense, starting at
- 12:34Speaker 1: the browser level with the same site cookie attribute right.
- 12:38Speaker 2: Same site allows developers to instruct the browser on how
- 12:40Speaker 2: to handle cookies and cross origin contexts. If you flag
- 12:44Speaker 2: a cookie with same site equals strict, the browser will
- 12:47Speaker 2: flatly refuse to attach the cookie to any request coming
- 12:50Speaker 2: from a third party domain.
- 12:51Speaker 1: Which completely neutralizes CSRF.
- 12:54Speaker 2: It does, but it introduces massive user experience friction.
- 12:58Speaker 1: Oh right, because if I click legitimate link to your
- 13:01Speaker 1: app from say my email client or slack, the browser
- 13:05Speaker 1: suppresses the cookie.
- 13:06Speaker 2: Yeah, you arrive at the application and you appear logged out,
- 13:09Speaker 2: even if you just logged in five minutes ago, just
- 13:11Speaker 2: because you clicked a link from an external origin.
- 13:13Speaker 1: It's super annoying. That's why same site equals lax was created, right,
- 13:16Speaker 1: which is the default now in modern browsers.
- 13:18Speaker 2: Exactly lax is a middle ground. It lets the browser
- 13:20Speaker 2: attach the cookie for safe top level navigations like following
- 13:24Speaker 2: a standard get link, but it suppresses it for unsafe
- 13:28Speaker 2: state changing requests like third party form posts or background
- 13:33Speaker 2: fetch requests.
- 13:34Speaker 1: Okay, so lax mitigates the majority of simple CSRF vectors,
- 13:39Speaker 1: but relying entirely on client side browser policies still feels
- 13:43Speaker 1: like a dangerous security posture.
- 13:44Speaker 2: It is browsers behave inconsistently, users run outdated versions, and
- 13:49Speaker 2: sometimes complex web apps actually require cross origin resource sharing
- 13:53Speaker 2: that forces developers to use same site equals none anyway, So.
- 13:57Speaker 1: We need a server side mitigation strategy, something that works
- 14:00Speaker 1: no matter what the.
- 14:01Speaker 2: Browser is doing, and that is the authenticity token, commonly
- 14:05Speaker 2: known as the CSRF token.
- 14:07Speaker 1: Since the app can't trust the session cookie alone, it
- 14:10Speaker 1: demands a secondary piece of evidence, right.
- 14:12Speaker 2: It needs proof that the request originated from the legitimate
- 14:15Speaker 2: application interface and not some hidden form on a third
- 14:18Speaker 2: party site.
- 14:19Speaker 1: I like to think of it like a daily secret handshake.
- 14:21Speaker 1: You can't just mail in a request. You have to
- 14:23Speaker 1: physically walk into the bank, meaning you load the actual
- 14:26Speaker 1: legitimate web page to learn today's handshake.
- 14:29Speaker 2: That's exactly how it operates. It's a cryptographic challenge response.
- 14:33Speaker 2: When the server renders an HTML form, it generates a
- 14:36Speaker 2: secure random string.
- 14:38Speaker 1: That's the token, and it embeds this token directly into
- 14:42Speaker 1: the HTML as a hidden input field. Within the form itself.
- 14:46Speaker 2: Simultaneously, the server stores a corresponding record of that exact
- 14:49Speaker 2: token inside the user's encrypted session cookie.
- 14:52Speaker 1: So when the user submits the form, the browser packages
- 14:55Speaker 1: the input data, including that hidden token, and sends it
- 14:58Speaker 1: via a POC reques appending the session cookie alongside.
- 15:02Speaker 2: It, and the server intercepts it. It performs a strict
- 15:05Speaker 2: comparative analysis. It extracts the token from the form body
- 15:08Speaker 2: and compares it against the expected token securely stored in
- 15:11Speaker 2: the decrypted session payload.
- 15:13Speaker 1: If they match boom cryptographic proof that the user actually
- 15:16Speaker 1: loaded the legitimate HTML.
- 15:18Speaker 2: Form, yes, And if hacker dot com attempts an attack,
- 15:21Speaker 2: they hit an insurmannable hurdle.
- 15:24Speaker 1: Because they can force the browser to send the session cookie,
- 15:26Speaker 1: but they cannot read the hidden CSRF token embedded in
- 15:30Speaker 1: the bank's HTML exactly.
- 15:32Speaker 2: The browser's same origin policy prevents hacker dot com from
- 15:35Speaker 2: using JavaScript to scrape data from Bank dot Com.
- 15:38Speaker 1: Operating blind, the forged payst request arrives at the server
- 15:42Speaker 1: lacking the correct token. The server detects the mismatch and
- 15:45Speaker 1: instantly terminates the request with a four to twenty two
- 15:48Speaker 1: unprocessable entity error.
- 15:50Speaker 2: Attack neutralized totally neutralized, and advanced frameworks even take this
- 15:54Speaker 2: a step further to defend against really sophisticated compression vulnerabilities
- 15:59Speaker 2: like the breach attack.
- 16:00Speaker 1: Oh right, because if a CSRF token stays static across
- 16:03Speaker 1: multiple page loads, an attacker observing encrypted HTTPS traffic could
- 16:07Speaker 1: manipulate the payload size, analyze the compression ratios, and eventually
- 16:11Speaker 1: guess the token.
- 16:12Speaker 2: It's wild, but mathematically possible, So to prevent this, RAILS
- 16:16Speaker 2: employs XR masking.
- 16:18Speaker 1: XR masking. How does that work?
- 16:20Speaker 2: The server generates a random one time pad for every
- 16:23Speaker 2: single page render. It takes the actual static CSRF token,
- 16:26Speaker 2: applies an XR bitwise operation using that one time pad,
- 16:30Speaker 2: and embeds the resulting mask string into the HTML form.
- 16:34Speaker 1: So the embedded token physically changes on every single refresh,
- 16:37Speaker 1: even though the underlying core token is the exact same.
- 16:40Speaker 2: Right. When the server receives the masked token, it just
- 16:44Speaker 2: reverses the xor operation to retrieve the core value and
- 16:47Speaker 2: compares it to the session. It's a brilliant layer of
- 16:50Speaker 2: cryptographic obfuscation.
- 16:52Speaker 1: That is incredible. The combination of all these technologies unique
- 16:55Speaker 1: database constraints. The application controller inheritance authenticated encryption using secret
- 17:01Speaker 1: keys and mathematically masked authenticity tokens. It creates this invisible
- 17:07Speaker 1: architecture that allows a fundamentally stateless protocol to securely manage
- 17:12Speaker 1: billions of complex user interactions every second.
- 17:15Speaker 2: It really is an elegant system once you see all
- 17:17Speaker 2: the pieces working together.
- 17:19Speaker 1: Absolutely so for everyone listening to really solidify your understanding
- 17:22Speaker 1: of these mechanisms, I highly recommend running a quick practical exercise.
- 17:26Speaker 2: Oh definitely do this.
- 17:27Speaker 1: Next time you're interacting with a complex web application. Just
- 17:30Speaker 1: open your browser's developer tools, navigate to the network or
- 17:33Speaker 1: storage tap and locate the session cookie. Notice the same
- 17:36Speaker 1: site attribute asigned to it, is it lacks strict or none.
- 17:39Speaker 2: And then inspect the dam of any state changing input form.
- 17:44Speaker 2: Look past the visible fields and try to locate that
- 17:47Speaker 2: hidden input tag containing the heavily masked CSRF token.
- 17:52Speaker 1: Yes, actually seeing the infrastructure in the wild totally demystifies
- 17:56Speaker 1: the theory.
- 17:57Speaker 2: Examining the physical artifacts bridges that gas between abstract cryptography
- 18:02Speaker 2: and practical implementation.
- 18:03Speaker 1: It's eye opening now. To leave you with a final thought,
- 18:07Speaker 1: the architecture we explore today relies entirely on the premise
- 18:10Speaker 1: that our encryption algorithms like AES two fifty six, and
- 18:13Speaker 1: these complex hashing functions are computationally infeasible to break. They
- 18:18Speaker 1: formed the literal bedrock of digital trust for now, at
- 18:21Speaker 1: least exactly with the rapid acceleration of quantum computing, researchers
- 18:25Speaker 1: anticipate a threshold were quantum algorithms, specifically, Shor's algorithm could
- 18:29Speaker 1: theoretically shatter these classical cryptographic foundations in a matter of hours.
- 18:33Speaker 2: It's a looming threat for the whole industry.
- 18:35Speaker 1: So when the math securing our secret keys is finally broken,
- 18:39Speaker 1: how will the web have to reinvent the humble session
- 18:41Speaker 1: cookie to keep our digital lives safe and prevent total
- 18:45Speaker 1: systemic amnesia. Something to chew on until next time.