Ejemplo n.º 1
0
 def test_base_fingerprint_creation(self):
     scheme = AKScheme(gamma=2)
     secret_key = 123
     recipient = 0
     fingerprint = scheme.create_fingerprint(recipient_id=recipient,
                                             secret_key=secret_key)
     self.assertIsNotNone(fingerprint)
Ejemplo n.º 2
0
 def test_base_no_suspect(self):
     scheme = AKScheme(gamma=2)
     secret_key = 123
     recipient = 0
     fingerprint = scheme.create_fingerprint(recipient_id=recipient,
                                             secret_key=secret_key)
     suspect = scheme.detect_potential_traitor(fingerprint=fingerprint,
                                               secret_key=secret_key + 1)
     self.assertEqual(suspect, -1)