src/HOL/Auth/TLS.thy
changeset 3757 7524781c5c83
parent 3745 4c5d3b1ddc75
child 3759 3d1ac6b82b28
equal deleted inserted replaced
3756:5617a5698345 3757:7524781c5c83
   163 	       : set evsCF;
   163 	       : set evsCF;
   164              Says B' A {|Nonce NB, Number SID, Number PB|} : set evsCF;
   164              Says B' A {|Nonce NB, Number SID, Number PB|} : set evsCF;
   165              Notes A {|Agent B, Nonce PMS|} : set evsCF;
   165              Notes A {|Agent B, Nonce PMS|} : set evsCF;
   166 	     M = PRF(PMS,NA,NB) |]
   166 	     M = PRF(PMS,NA,NB) |]
   167           ==> Says A B (Crypt (clientK(NA,NB,M))
   167           ==> Says A B (Crypt (clientK(NA,NB,M))
   168 			(Hash{|Nonce M, Number SID,
   168 			(Hash{|Number SID, Nonce M,
   169 			       Nonce NA, Number PA, Agent A, 
   169 			       Nonce NA, Number PA, Agent A, 
   170 			       Nonce NB, Number PB, Agent B|}))
   170 			       Nonce NB, Number PB, Agent B|}))
   171               # evsCF  :  tls"
   171               # evsCF  :  tls"
   172 
   172 
   173     ServerFinished
   173     ServerFinished
   178 	       : set evsSF;
   178 	       : set evsSF;
   179 	     Says B  A  {|Nonce NB, Number SID, Number PB|} : set evsSF;
   179 	     Says B  A  {|Nonce NB, Number SID, Number PB|} : set evsSF;
   180 	     Says A'' B (Crypt (pubK B) (Nonce PMS)) : set evsSF;
   180 	     Says A'' B (Crypt (pubK B) (Nonce PMS)) : set evsSF;
   181 	     M = PRF(PMS,NA,NB) |]
   181 	     M = PRF(PMS,NA,NB) |]
   182           ==> Says B A (Crypt (serverK(NA,NB,M))
   182           ==> Says B A (Crypt (serverK(NA,NB,M))
   183 			(Hash{|Nonce M, Number SID,
   183 			(Hash{|Number SID, Nonce M,
   184 			       Nonce NA, Number PA, Agent A, 
   184 			       Nonce NA, Number PA, Agent A, 
   185 			       Nonce NB, Number PB, Agent B|}))
   185 			       Nonce NB, Number PB, Agent B|}))
   186               # evsSF  :  tls"
   186               # evsSF  :  tls"
   187 
   187 
   188     ClientAccepts
   188     ClientAccepts
   191           needed to resume this session.  The "Notes A ..." premise is
   191           needed to resume this session.  The "Notes A ..." premise is
   192           used to prove Notes_master_imp_Crypt_PMS.*)
   192           used to prove Notes_master_imp_Crypt_PMS.*)
   193          "[| evsCA: tls;
   193          "[| evsCA: tls;
   194 	     Notes A {|Agent B, Nonce PMS|} : set evsCA;
   194 	     Notes A {|Agent B, Nonce PMS|} : set evsCA;
   195 	     M = PRF(PMS,NA,NB);  
   195 	     M = PRF(PMS,NA,NB);  
   196 	     X = Hash{|Nonce M, Number SID,
   196 	     X = Hash{|Number SID, Nonce M,
   197 	               Nonce NA, Number PA, Agent A, 
   197 	               Nonce NA, Number PA, Agent A, 
   198 		       Nonce NB, Number PB, Agent B|};
   198 		       Nonce NB, Number PB, Agent B|};
   199              Says A  B (Crypt (clientK(NA,NB,M)) X) : set evsCA;
   199              Says A  B (Crypt (clientK(NA,NB,M)) X) : set evsCA;
   200              Says B' A (Crypt (serverK(NA,NB,M)) X) : set evsCA |]
   200              Says B' A (Crypt (serverK(NA,NB,M)) X) : set evsCA |]
   201           ==> 
   201           ==> 
   207           needed to resume this session.  The "Says A'' B ..." premise is
   207           needed to resume this session.  The "Says A'' B ..." premise is
   208           used to prove Notes_master_imp_Crypt_PMS.*)
   208           used to prove Notes_master_imp_Crypt_PMS.*)
   209          "[| evsSA: tls;
   209          "[| evsSA: tls;
   210              Says A'' B (Crypt (pubK B) (Nonce PMS)) : set evsSA;
   210              Says A'' B (Crypt (pubK B) (Nonce PMS)) : set evsSA;
   211 	     M = PRF(PMS,NA,NB);  
   211 	     M = PRF(PMS,NA,NB);  
   212 	     X = Hash{|Nonce M, Number SID,
   212 	     X = Hash{|Number SID, Nonce M,
   213 	               Nonce NA, Number PA, Agent A, 
   213 	               Nonce NA, Number PA, Agent A, 
   214 		       Nonce NB, Number PB, Agent B|};
   214 		       Nonce NB, Number PB, Agent B|};
   215              Says B  A (Crypt (serverK(NA,NB,M)) X) : set evsSA;
   215              Says B  A (Crypt (serverK(NA,NB,M)) X) : set evsSA;
   216              Says A' B (Crypt (clientK(NA,NB,M)) X) : set evsSA |]
   216              Says A' B (Crypt (clientK(NA,NB,M)) X) : set evsSA |]
   217           ==> 
   217           ==> 
   223          "[| evsSR: tls;  A ~= B;  Nonce NB ~: used evsSR;  NB ~: range PRF;
   223          "[| evsSR: tls;  A ~= B;  Nonce NB ~: used evsSR;  NB ~: range PRF;
   224              Notes B {|Number SID, Agent A, Agent B, Nonce M|} : set evsSR;
   224              Notes B {|Number SID, Agent A, Agent B, Nonce M|} : set evsSR;
   225 	     Says A' B {|Agent A, Nonce NA, Number SID, Number PA|}
   225 	     Says A' B {|Agent A, Nonce NA, Number SID, Number PA|}
   226 	       : set evsSR |]
   226 	       : set evsSR |]
   227           ==> Says B A (Crypt (serverK(NA,NB,M))
   227           ==> Says B A (Crypt (serverK(NA,NB,M))
   228 			(Hash{|Nonce M, Number SID,
   228 			(Hash{|Number SID, Nonce M,
   229 			       Nonce NA, Number PA, Agent A, 
   229 			       Nonce NA, Number PA, Agent A, 
   230 			       Nonce NB, Number PB, Agent B|})) # evsSR
   230 			       Nonce NB, Number PB, Agent B|})) # evsSR
   231 	        :  tls"
   231 	        :  tls"
   232 
   232 
   233     ClientResume
   233     ClientResume
   237 	     Says A  B {|Agent A, Nonce NA, Number SID, Number PA|}
   237 	     Says A  B {|Agent A, Nonce NA, Number SID, Number PA|}
   238 	       : set evsCR;
   238 	       : set evsCR;
   239              Says B' A {|Nonce NB, Number SID, Number PB|} : set evsCR;
   239              Says B' A {|Nonce NB, Number SID, Number PB|} : set evsCR;
   240              Notes A {|Number SID, Agent A, Agent B, Nonce M|} : set evsCR |]
   240              Notes A {|Number SID, Agent A, Agent B, Nonce M|} : set evsCR |]
   241           ==> Says A B (Crypt (clientK(NA,NB,M))
   241           ==> Says A B (Crypt (clientK(NA,NB,M))
   242 			(Hash{|Nonce M, Number SID,
   242 			(Hash{|Number SID, Nonce M,
   243 			       Nonce NA, Number PA, Agent A, 
   243 			       Nonce NA, Number PA, Agent A, 
   244 			       Nonce NB, Number PB, Agent B|}))
   244 			       Nonce NB, Number PB, Agent B|}))
   245               # evsCR  :  tls"
   245               # evsCR  :  tls"
   246 
   246 
   247     Oops 
   247     Oops