Security Engineering. Ross Anderson

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

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

Security Engineering - Ross  Anderson

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

alt="upper A right-arrow upper S colon"/> upper A comma upper B upper S right-arrow upper A colon StartSet upper A comma upper B comma upper K Subscript upper A upper B Baseline comma upper T EndSet Subscript upper K Sub Subscript upper A upper S Subscript Baseline comma StartSet upper A comma upper B comma upper K Subscript upper A upper B Baseline comma upper T EndSet Subscript upper K Sub Subscript upper B upper S Subscript Baseline upper A right-arrow upper B colon StartSet upper A comma upper B comma upper K Subscript upper A upper B Baseline comma upper T EndSet Subscript upper K Sub Subscript upper B upper S Subscript Baseline comma StartSet upper M EndSet Subscript upper K Sub Subscript upper A upper B Subscript Baseline

      Expanding the notation, Alice calls Sam and says she'd like to talk to Bob. Sam makes up a message consisting of Alice's name, Bob's name, a session key for them to use, and a timestamp. He encrypts all this under the key he shares with Alice, and he encrypts another copy of it under the key he shares with Bob. He gives both ciphertexts to Alice. Alice retrieves the session key from the ciphertext that was encrypted to her, and passes on to Bob the ciphertext encrypted for him. She now sends him whatever message she wanted to send, encrypted using this session key.

      4.7.3 The Needham-Schroeder protocol

      Many things can go wrong, and here is a famous historical example. Many existing key distribution protocols are derived from the Needham-Schroeder protocol, which appeared in 1978 [1428]. It is somewhat similar to the above, but uses nonces rather than timestamps. It runs as follows:

Message 1 upper A right-arrow upper S colon upper A comma upper B comma upper N Subscript upper A Baseline
Message 2 upper S right-arrow upper A colon StartSet upper N Subscript upper A Baseline comma upper B comma upper K Subscript upper A upper B Baseline comma StartSet 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
Message 3 upper A right-arrow upper B colon StartSet upper K Subscript upper A upper B Baseline comma upper A EndSet Subscript upper K Sub Subscript upper B upper S
Message 4 upper B right-arrow upper A colon left-brace upper N Subscript upper B Baseline right-brace Subscript upper K Sub Subscript upper A upper B
Message 5 upper A right-arrow upper B colon left-brace upper N Subscript upper B Baseline minus 1 right-brace Subscript upper K Sub Subscript upper A upper B

      Here Alice takes the initiative, and tells Sam: ‘I'm Alice, I want to talk to Bob, and my random nonce is upper N Subscript upper A.’ Sam provides her with a session key, encrypted using the key she shares with him. This ciphertext also contains her nonce so she can confirm it's not a replay. He also gives her a certificate to convey this key to Bob. She passes it to Bob, who then does a challenge-response to check that she is present and alert.

      There is a subtle problem with this protocol – Bob has to assume that the key upper K Subscript upper A upper B he receives from Sam (via Alice) is fresh. This is not necessarily so: Alice could have waited a year between steps 2 and 3. In many applications this may not be important; it might even help Alice to cache keys against possible server failures. But if an opponent – say Charlie – ever got hold of Alice's key, he could use it to set up session keys with many other principals. And if Alice ever got fired, then Sam had better have a list of everyone in the firm to whom he issued a key for communicating with her, to tell them not to believe it any more. In other words, revocation is a problem: Sam may have to keep complete logs of everything he's ever done, and these logs would grow in size forever unless the principals' names expired at some fixed time in the future.

      Almost 40 years later, this example is still controversial. The simplistic view is that Needham and Schroeder just got it wrong; the view argued by Susan Pancho and Dieter Gollmann (for which I have some sympathy) is that this is a protocol failure brought on by shifting assumptions [781, 1493]. 1978 was a kinder, gentler world; computer security then concerned itself with keeping ‘bad guys’ out, while nowadays we expect the ‘enemy’ to be among the users of our system. The Needham-Schroeder paper assumed that all principals behave themselves, and that all attacks came from outsiders [1428]. Under those assumptions, the protocol remains sound.