Example #1
0
 def test_rsassa_pss_verify_vect(self):
     for example in self.vect_data.examples:
         public_key = example.public_key
         for sample in example.samples:
             result = rsassa_pss.verify(public_key, sample.message,
                                        sample.signature)
             self.assertTrue(result)
def test_generate_and_sign():
    pub, priv = keys.generate_key_pair(number=5, size=1024)
    message = b'hello world'
    signature = rsassa_pss.sign(priv, message)
    assert rsassa_pss.verify(pub, message, signature)
def test_rsassa_pss_verify_vect():
    for example in vect_data.examples:
        public_key = example.public_key
        for sample in example.samples:
            result = rsassa_pss.verify(public_key, sample.message, sample.signature)
            assert result
def test_rsassa_pss_verify_int():
    result = rsassa_pss.verify(int_data.public_key, int_data.message, int_data.signature)
    assert result
Example #5
0
 def test_rsassa_pss_verify_int(self):
     result = rsassa_pss.verify(self.int_data.public_key,
                                self.int_data.message,
                                self.int_data.signature)
     self.assertTrue(result)
Example #6
0
 def test_generate_and_sign(self):
     pub, priv = primitives.generate_key_pair(number=5, size=1024)
     message = 'hello world'
     signature = rsassa_pss.sign(priv, message)
     self.assertTrue(rsassa_pss.verify(pub, message, signature))
Example #7
0
 def test_rsassa_pss_verify_vect(self):
     for example in self.vect_data.examples:
         public_key = example.public_key
         for sample in example.samples:
             result = rsassa_pss.verify(public_key, sample.message, sample.signature)
             self.assertTrue(result)
Example #8
0
 def test_rsassa_pss_verify_int(self):
     result = rsassa_pss.verify(self.int_data.public_key,
             self.int_data.message, self.int_data.signature)
     self.assertTrue(result)