src/HOL/Auth/Recur.thy
changeset 2451 ce85a2aafc7a
parent 2449 d30ad12b1397
child 2481 ee461c8bc9c3
equal deleted inserted replaced
2450:3ad2493fa0e0 2451:ce85a2aafc7a
    75              X: synth (analz (sees lost Spy evs)) |]
    75              X: synth (analz (sees lost Spy evs)) |]
    76           ==> Says Spy B X  # evs : recur lost"
    76           ==> Says Spy B X  # evs : recur lost"
    77 
    77 
    78          (*Alice initiates a protocol run.
    78          (*Alice initiates a protocol run.
    79            "Agent Server" is just a placeholder, to terminate the nesting.*)
    79            "Agent Server" is just a placeholder, to terminate the nesting.*)
    80     NA1  "[| evs: recur lost;  A ~= B;  A ~= Server;
    80     RA1  "[| evs: recur lost;  A ~= B;  A ~= Server;
    81              MA = {|Agent A, Agent B, Nonce(newN(length evs)), Agent Server|}|]
    81              MA = {|Agent A, Agent B, Nonce(newN(length evs)), Agent Server|}|]
    82           ==> Says A B {|Hash{|Key(shrK A),MA|}, MA|} # evs : recur lost"
    82           ==> Says A B {|Hash{|Key(shrK A),MA|}, MA|} # evs : recur lost"
    83 
    83 
    84          (*Bob's response to Alice's message.  C might be the Server.
    84          (*Bob's response to Alice's message.  C might be the Server.
    85            XA should be the Hash of the remaining components with KA, but
    85            XA should be the Hash of the remaining components with KA, but
    86 		Bob cannot check that.
    86 		Bob cannot check that.
    87            P is the previous recur message from Alice's caller.*)
    87            P is the previous recur message from Alice's caller.*)
    88     NA2  "[| evs: recur lost;  B ~= C;  B ~= Server;
    88     RA2  "[| evs: recur lost;  B ~= C;  B ~= Server;
    89              Says A' B PA : set_of_list evs;  
    89              Says A' B PA : set_of_list evs;  
    90              PA = {|XA, Agent A, Agent B, Nonce NA, P|};
    90              PA = {|XA, Agent A, Agent B, Nonce NA, P|};
    91              MB = {|Agent B, Agent C, Nonce (newN(length evs)), PA|} |]
    91              MB = {|Agent B, Agent C, Nonce (newN(length evs)), PA|} |]
    92           ==> Says B C {|Hash{|Key(shrK B),MB|}, MB|} # evs : recur lost"
    92           ==> Says B C {|Hash{|Key(shrK B),MB|}, MB|} # evs : recur lost"
    93 
    93 
    94          (*The Server receives and decodes Bob's message.  Then he generates
    94          (*The Server receives and decodes Bob's message.  Then he generates
    95            a new session key and a response.*)
    95            a new session key and a response.*)
    96     NA3  "[| evs: recur lost;  B ~= Server;
    96     RA3  "[| evs: recur lost;  B ~= Server;
    97              Says B' Server PB : set_of_list evs;
    97              Says B' Server PB : set_of_list evs;
    98              (0,PB,RB) : respond (length evs) |]
    98              (0,PB,RB) : respond (length evs) |]
    99           ==> Says Server B RB # evs : recur lost"
    99           ==> Says Server B RB # evs : recur lost"
   100 
   100 
   101          (*Bob receives the returned message and compares the Nonces with
   101          (*Bob receives the returned message and compares the Nonces with
   102 	   those in the message he previously sent the Server.*)
   102 	   those in the message he previously sent the Server.*)
   103     NA4  "[| evs: recur lost;  A ~= B;  
   103     RA4  "[| evs: recur lost;  A ~= B;  
   104              Says C' B {|Agent B, 
   104              Says C' B {|Agent B, 
   105                          Crypt (shrK B) {|Key KAB, Agent A, Nonce NB|}, 
   105                          Crypt (shrK B) {|Key KAB, Agent A, Nonce NB|}, 
   106                          Agent B, 
   106                          Agent B, 
   107                          Crypt (shrK B) {|Key KAC, Agent C, Nonce NB|}, RA|}
   107                          Crypt (shrK B) {|Key KAC, Agent C, Nonce NB|}, RA|}
   108                : set_of_list evs;
   108                : set_of_list evs;