Exemple #1
0
 def set_auditee_secret(self):
     '''Sets up the auditee's half of the preparatory
     secret material to create the master secret.'''
     assert self.client_random and self.server_random, "one of client or server random not set"
     label = 'master secret'
     seed = self.client_random + self.server_random
     pms1 = tlsn_common.tlsver + self.auditee_secret
     self.p_auditee = tls_10_prf(label + seed, first_half=pms1)[0]
     #encrypted PMS has already been calculated before the audit began
     return (self.p_auditee)
Exemple #2
0
 def set_auditee_secret(self):
     '''Sets up the auditee's half of the preparatory
     secret material to create the master secret.'''
     assert self.client_random and self.server_random,"one of client or server random not set"
     label = 'master secret'
     seed = self.client_random + self.server_random
     pms1 = tlsn_common.tlsver + self.auditee_secret
     self.p_auditee = tls_10_prf(label+seed,first_half = pms1)[0]
     #encrypted PMS has already been calculated before the audit began
     return (self.p_auditee)
Exemple #3
0
 def set_auditor_secret(self):
     '''Sets up the auditor's half of the preparatory
     secret material to create the master secret, and
     the encrypted premaster secret.
     'secret' should be a bytearray of length n_auditor_entropy'''
     assert (self.client_random and self.server_random), "one of client or server random not set"
     label = 'master secret'
     seed = self.client_random + self.server_random
     pms2 = self.auditor_secret
     self.p_auditor = tls_10_prf(label+seed,second_half = pms2)[1]
     return (self.p_auditor)    
Exemple #4
0
 def set_auditor_secret(self):
     '''Sets up the auditor's half of the preparatory
     secret material to create the master secret, and
     the encrypted premaster secret.
     'secret' should be a bytearray of length n_auditor_entropy'''
     assert (self.client_random and
             self.server_random), "one of client or server random not set"
     label = 'master secret'
     seed = self.client_random + self.server_random
     pms2 = self.auditor_secret
     self.p_auditor = tls_10_prf(label + seed, second_half=pms2)[1]
     return (self.p_auditor)