Security Engineering. Ross Anderson

Чтение книги онлайн.

Читать онлайн книгу Security Engineering - Ross Anderson страница 70

Security Engineering - Ross  Anderson

Скачать книгу

she gets the password right, she now controls upper K Subscript upper A upper S and to get access to a resource upper B controlled by the ticket granting server upper S, the following protocol takes place. Its outcome is a key upper K Subscript upper A upper B with timestamp upper T Subscript upper S and lifetime upper L, which will be used to authenticate Alice's subsequent traffic with that resource:

upper A right-arrow upper S colon upper A comma upper B
upper S right-arrow upper A colon StartSet upper T Subscript upper S Baseline comma upper L comma upper K Subscript upper A upper B Baseline comma upper B comma StartSet upper T Subscript upper S Baseline comma upper L comma upper K Subscript upper A upper B Baseline comma upper A EndSet Subscript upper K Sub Subscript upper B upper S Subscript Baseline EndSet Subscript upper K Sub Subscript upper A upper S
upper A right-arrow upper B colon StartSet upper T Subscript upper S Baseline comma upper L comma upper K Subscript upper A upper B Baseline comma upper A EndSet Subscript upper K Sub Subscript upper B upper S Subscript Baseline comma StartSet upper A comma upper T Subscript upper A Baseline EndSet Subscript upper K Sub Subscript upper A upper B Subscript Baseline
upper B right-arrow upper A colon left-brace upper T Subscript upper A Baseline plus 1 right-brace Subscript upper K Sub Subscript upper A upper B

      Translating this into English: Alice asks the ticket granting server for access to upper B. If this is permissible, the ticket StartSet upper T Subscript upper S Baseline comma upper L comma upper K Subscript upper A upper B Baseline comma upper A EndSet Subscript upper K Sub Subscript upper B upper S is created containing a suitable key upper K Subscript upper A upper B and given to Alice to use. She also gets a copy of the key in a form readable by her, namely encrypted under upper K Subscript upper A upper S. She now verifies the ticket by sending a timestamp upper T Subscript upper A to the resource, which confirms it's alive by sending back the timestamp incremented by one (this shows it was able to decrypt the ticket correctly and extract the key upper K Subscript upper A upper B).

      The revocation issue with the Needham-Schroeder protocol has been fixed by introducing timestamps rather than random nonces. But, as in most of life, we get little in security for free. There is now a new vulnerability, namely that the clocks on our various clients and servers might get out of sync; they might even be desynchronized deliberately as part of a more complex attack.

      What's more, Kerberos is a trusted third-party (TTP) protocol in that upper S is trusted: if the police turn up with a warrant, they can get Sam to turn over the keys and read the traffic. Protocols with this feature were favoured during the ‘crypto wars’ of the 1990s, as I will discuss in section 26.2.7. Protocols that involve no or less trust in a third party generally use public-key cryptography, which I describe in the next chapter.

      A rather similar protocol to Kerberos is OAuth, a mechanism to allow secure delegation. For example, if you log into Doodle using Google and allow Doodle to update your Google calendar, Doodle's website redirects you to Google, which gets you to log in (or relies on a master cookie from a previous login) and asks you for consent for Doodle to write to your calendar. Doodle then gives you an access token for the calendar service [864]. I mentioned in section 3.4.9.3 that this poses a cross-site phishing risk. OAuth was not designed for user authentication, and access tokens are not strongly bound to clients. It's a complex framework within which delegation mechanisms can be built, with both short-term and long-term access tokens; the details are tied up with how cookies and web redirects operate and optimised to enable servers to be stateless, so they scale well for modern web services. In the example above, you want to be able to revoke Doodle's access at Google, so behind the scenes Doodle only gets short-lived access tokens. Because of this complexity, the OpenID Connect protocol is a ‘profile’ of OAuth which ties down the details for the case where the only service required is authentication. OpenID Connect is what you use when you log into your newspaper using your Google or Facebook account.

      4.7.5 Practical key management

      So we can use a protocol like Kerberos to set up and manage working keys between users given that each user shares one or more long-term keys with a server that acts as a key distribution centre. But there may be encrypted passwords for tens of thousands of staff and keys for large numbers of devices too. That's a lot of key material. How is it to be managed?

      Key management is a complex and difficult business and is often got wrong because it's left as an afterthought. You need to sit down and think about how many keys are needed, how they're to be generated, how long they need to remain in service and how they'll eventually be destroyed. There is a much longer list of concerns – many of them articulated in the Federal Information Processing Standard for key management [1410]. And things go wrong as applications evolve; it's important to provide headroom to support next year's functionality. It's also important to support recovery from security failure. Yet there are no standard ways of doing either.

      Public-key cryptography, which I'll discuss in Chapter 5, can simplify the key-management task slightly. In banking the usual answer is to use dedicated cryptographic processors called hardware security modules, which I'll describe in detail later. Both of these introduce further complexities though, and even more subtle ways of getting things wrong.

Скачать книгу