diff options
-rw-r--r-- | docs/development/test-vectors.rst | 3 | ||||
-rw-r--r-- | docs/faq.rst | 18 | ||||
-rw-r--r-- | docs/index.rst | 4 | ||||
-rw-r--r-- | docs/spelling_wordlist.txt | 1 | ||||
-rw-r--r-- | tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/key1.pem | 12 | ||||
-rw-r--r-- | tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/key2.pem | 12 | ||||
-rw-r--r-- | tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/testrsa-encrypted.pem | 12 | ||||
-rw-r--r-- | tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/testrsa.pem | 9 |
8 files changed, 71 insertions, 0 deletions
diff --git a/docs/development/test-vectors.rst b/docs/development/test-vectors.rst index f47f08de..1aa71106 100644 --- a/docs/development/test-vectors.rst +++ b/docs/development/test-vectors.rst @@ -15,6 +15,7 @@ Asymmetric Ciphers * RSA PKCS1 from the RSA FTP site (ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/ and ftp://ftp.rsa.com/pub/rsalabs/tmp/). +* OpenSSL PEM serialization vectors from the `OpenSSL test suite`_ and `GnuTLS test suite`_. Hashes ~~~~~~ @@ -100,3 +101,5 @@ header format (substituting the correct information): .. _`Whirlpool website`: http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html .. _`Specification repository`: https://github.com/fernet/spec .. _`errata`: http://www.rfc-editor.org/errata_search.php?rfc=6238 +.. _`OpenSSL test suite`: http://git.openssl.org/gitweb/?p=openssl.git;a=blob;f=test/testrsa.pem;h=aad21067a8f7cb93a52a511eb9162fd83be39135;hb=66e8211c0b1347970096e04b18aa52567c325200 +.. _`GnuTLS test suite`: https://gitorious.org/gnutls/gnutls/commit/f16ef39ef0303b02d7fa590a37820440c466ce8d diff --git a/docs/faq.rst b/docs/faq.rst new file mode 100644 index 00000000..cbbb74ad --- /dev/null +++ b/docs/faq.rst @@ -0,0 +1,18 @@ +Frequently Asked Questions +========================== + +How does ``cryptography`` compare to NaCl (Networking and Cryptography Library)? +-------------------------------------------------------------------------------- + +While ``cryptography`` and `NaCl`_ both share the goal of making cryptography +easier, and safer, to use for developers, ``cryptography`` is designed to be a +general purpose library, interoperable with existing systems, while NaCl +features a collection of hand selected algorithms. + +``cryptography``'s :ref:`recipes <cryptography-layout>` layer has similar goals +to NaCl. + +If you prefer NaCl's design, we highly recommend `PyNaCl`_. + +.. _`NaCl`: http://nacl.cr.yp.to/ +.. _`PyNaCl`: https://pynacl.readthedocs.org diff --git a/docs/index.rst b/docs/index.rst index c8ef41b6..176405b5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -33,6 +33,9 @@ existing libraries: * Poor introspectability, and thus poor testability. * Extremely error prone APIs, and bad defaults. + +.. _cryptography-layout: + Layout ------ @@ -60,6 +63,7 @@ The recipes layer fernet random-numbers exceptions + faq glossary The hazardous materials layer diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt index 14b0b773..9bc84e50 100644 --- a/docs/spelling_wordlist.txt +++ b/docs/spelling_wordlist.txt @@ -18,6 +18,7 @@ fernet Fernet hazmat indistinguishability +interoperable introspectability invariants iOS diff --git a/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/key1.pem b/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/key1.pem new file mode 100644 index 00000000..3618f60c --- /dev/null +++ b/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/key1.pem @@ -0,0 +1,12 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,82B2F7684A1713F8 + +1zzOuu89dfFc2UkFCtSJBsBeEFxV8wE84OSxoWu4aYkPhl1LR08BchaTbjeLTP0b +t961vVpva0ekJkwGDEgmqlGjmhJq9y2sJfq7IeYa8OdTilfGrG1xeJ1QGBi6SCfR +s/PhkMxwGBtrZ2Z7bEcLT5dQKmKRqsthnClQggmngvk7zX7bPk0hKQKvf+FDxt6x +hzEaF3k9juU6vAVVSakrZ4QDqk9MUuTGHx0ksTDcC4EESS0l3Ybuum/rAzR4lQKR +4OLmAeYBDl+l/PSMllfd5x/z1YXYoiAbkpT4ix0lyZJgHrvrYIeUtJk2ODiMHezL +9BbK7EobtOGmrDLUNVX5BpdaExkWMGkioqzs2QqD/VkKu8RcNSsHVGqkdWKuhzXo +wcczQ+RiHckN2uy/zApubEWZNLPeDQ499kaF+QdZ+h4RM6E1r1Gu+A== +-----END RSA PRIVATE KEY----- diff --git a/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/key2.pem b/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/key2.pem new file mode 100644 index 00000000..6bd476d7 --- /dev/null +++ b/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/key2.pem @@ -0,0 +1,12 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: AES-128-CBC,2A57FF97B701B3F760145D7446929481 + +mGAPhSw48wZBnkHOhfMDg8yL2IBgMuTmeKE4xoHi7T6isHBNfkqMd0iJ+DJP/OKb +t+7lkKjj/xQ7w/bOBvBxlfRe4MW6+ejCdAFD9XSolW6WN6CEJPMI4UtmOK5inqcC +8l2l54f/VGrVN9uavU3KlXCjrd3Jp9B0Mu4Zh/UU4+EWs9rJAZfLIn+vHZ3OHetx +g74LdV7nC7lt/fjxc1caNIfgHs40dUt9FVrnJvAtkcNMtcjX/D+L8ZrLgQzIWFcs +WAbUZj7Me22mCli3RPET7Je37K59IzfWgbWFCGaNu3X02g5xtCfdcn/Uqy9eofH0 +YjKRhpgXPeGJCkoRqDeUHQNPpVP5HrzDZMVK3E4DC03C8qvgsYvuwYt3KkbG2fuA +F3bDyqlxSOm7uxF/K3YzI44v8/D8GGnLBTpN+ANBdiY= +-----END RSA PRIVATE KEY----- diff --git a/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/testrsa-encrypted.pem b/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/testrsa-encrypted.pem new file mode 100644 index 00000000..cacab087 --- /dev/null +++ b/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/testrsa-encrypted.pem @@ -0,0 +1,12 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: AES-128-CBC,5E22A2BD85A653FB7A3ED20DE84F54CD + +hAqtb5ZkTMGcs4BBDQ1SKZzdQThWRDzEDxM3qBfjvYa35KxZ54aic013mW/lwj2I +v5bbpOjrHYHNAiZYZ7RNb+ztbF6F/g5PA5g7mFwEq+LFBY0InIplYBSv9QtE+lot +Dy4AlZa/+NzJwgdKDb+JVfk5SddyD4ywnyeORnMPy4xXKvjXwmW+iLibZVKsjIgw +H8hSxcD+FhWyJm9h9uLtmpuqhQo0jTUYpnTezZx2xeVPB53Ev7YCxR9Nsgj5GsVf +9Z/hqLB7IFgM3pa0z3PQeUIZF/cEf72fISWIOBwwkzVrPUkXWfbuWeJXQXSs3amE +5A295jD9BQp9CY0nNFSsy+qiXWToq2xT3y5zVNEStmN0SCGNaIlUnJzL9IHW+oMI +kPmXZMnAYBWeeCF1gf3J3aE5lZInegHNfEI0+J0LazC2aNU5Dg/BNqrmRqKWEIo/ +-----END RSA PRIVATE KEY----- diff --git a/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/testrsa.pem b/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/testrsa.pem new file mode 100644 index 00000000..aad21067 --- /dev/null +++ b/tests/hazmat/primitives/vectors/asymmetric/OpenSSL_Serialization/testrsa.pem @@ -0,0 +1,9 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIBPAIBAAJBAKrbeqkuRk8VcRmWFmtP+LviMB3+6dizWW3DwaffznyHGAFwUJ/I +Tv0XtbsCyl3QoyKGhrOAy3RvPK5M38iuXT0CAwEAAQJAZ3cnzaHXM/bxGaR5CR1R +rD1qFBAVfoQFiOH9uPJgMaoAuoQEisPHVcZDKcOv4wEg6/TInAIXBnEigtqvRzuy +oQIhAPcgZzUq3yVooAaoov8UbXPxqHlwo6GBMqnv20xzkf6ZAiEAsP4BnIaQTM8S +mvcpHZwQJdmdHHkGKAs37Dfxi67HbkUCIQCeZGliHXFa071Fp06ZeWlR2ADonTZz +rJBhdTe0v5pCeQIhAIZfkiGgGBX4cIuuckzEm43g9WMUjxP/0GlK39vIyihxAiEA +mymehFRT0MvqW5xAKAx7Pgkt8HVKwVhc2LwGKHE0DZM= +-----END RSA PRIVATE KEY----- |