diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hazmat/primitives/test_rsa.py | 1 | ||||
-rw-r--r-- | tests/test_utils.py | 134 | ||||
-rw-r--r-- | tests/utils.py | 46 |
3 files changed, 171 insertions, 10 deletions
diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index a413f10b..e7787bdb 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -123,6 +123,7 @@ class TestRSA(object): ) def test_load_pss_vect_example_keys(self, pkcs1_example): secret, public = pkcs1_example + secret.pop("examples") skey = rsa.RSAPrivateKey(**secret) assert skey diff --git a/tests/test_utils.py b/tests/test_utils.py index 013d491e..8a168929 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -580,8 +580,63 @@ def test_load_pkcs1_vectors(): # RSA-PSS signing of 6 random messages with random salts # ------------------------------------------------------- - - <snip> + # PSS Example 8.1 + + # ----------------- + + # Message to be signed: + 81 33 2f 4b e6 29 48 41 5e a1 d8 99 79 2e ea cf + 6c 6e 1d b1 da 8b e1 3b 5c ea 41 db 2f ed 46 70 + 92 e1 ff 39 89 14 c7 14 25 97 75 f5 95 f8 54 7f + 73 56 92 a5 75 e6 92 3a f7 8f 22 c6 99 7d db 90 + fb 6f 72 d7 bb 0d d5 74 4a 31 de cd 3d c3 68 58 + 49 83 6e d3 4a ec 59 63 04 ad 11 84 3c 4f 88 48 + 9f 20 97 35 f5 fb 7f da f7 ce c8 ad dc 58 18 16 + 8f 88 0a cb f4 90 d5 10 05 b7 a8 e8 4e 43 e5 42 + 87 97 75 71 dd 99 ee a4 b1 61 eb 2d f1 f5 10 8f + 12 a4 14 2a 83 32 2e db 05 a7 54 87 a3 43 5c 9a + 78 ce 53 ed 93 bc 55 08 57 d7 a9 fb + + # Salt: + 1d 65 49 1d 79 c8 64 b3 73 00 9b e6 f6 f2 46 7b + ac 4c 78 fa + + # Signature: + 02 62 ac 25 4b fa 77 f3 c1 ac a2 2c 51 79 f8 f0 + 40 42 2b 3c 5b af d4 0a 8f 21 cf 0f a5 a6 67 cc + d5 99 3d 42 db af b4 09 c5 20 e2 5f ce 2b 1e e1 |