Alex Stapleton | c5fffd3 | 2014-03-18 15:29:00 +0000 | [diff] [blame] | 1 | Frequently asked questions |
Alex Gaynor | de06b29 | 2014-02-18 16:40:09 -0800 | [diff] [blame] | 2 | ========================== |
| 3 | |
Alex Gaynor | 59a6bc6 | 2014-02-18 18:13:48 -0800 | [diff] [blame] | 4 | How does ``cryptography`` compare to NaCl (Networking and Cryptography Library)? |
Alex Gaynor | de06b29 | 2014-02-18 16:40:09 -0800 | [diff] [blame] | 5 | -------------------------------------------------------------------------------- |
| 6 | |
| 7 | While ``cryptography`` and `NaCl`_ both share the goal of making cryptography |
| 8 | easier, and safer, to use for developers, ``cryptography`` is designed to be a |
Alex Gaynor | c37adab | 2014-02-18 16:46:58 -0800 | [diff] [blame] | 9 | general purpose library, interoperable with existing systems, while NaCl |
| 10 | features a collection of hand selected algorithms. |
Alex Gaynor | de06b29 | 2014-02-18 16:40:09 -0800 | [diff] [blame] | 11 | |
Alex Gaynor | 5809d48 | 2014-02-19 13:33:18 -0800 | [diff] [blame] | 12 | ``cryptography``'s :ref:`recipes <cryptography-layout>` layer has similar goals |
| 13 | to NaCl. |
Alex Gaynor | de06b29 | 2014-02-18 16:40:09 -0800 | [diff] [blame] | 14 | |
| 15 | If you prefer NaCl's design, we highly recommend `PyNaCl`_. |
| 16 | |
Paul Kehrer | c23d576 | 2014-05-08 12:41:45 -0500 | [diff] [blame] | 17 | When I try to use ``cryptography`` on Windows I get a ``cffi.ffiplatform.VerificationError`` |
| 18 | -------------------------------------------------------------------------------------------- |
| 19 | |
| 20 | This error looks something like: |
| 21 | |
| 22 | .. code-block:: console |
| 23 | |
| 24 | cffi.ffiplatform.VerificationError: importing '<some_path>.pyd': DLL load failed: |
| 25 | |
Paul Kehrer | 1548a54 | 2014-05-08 12:44:37 -0500 | [diff] [blame] | 26 | It typically occurs on Windows when you have not installed OpenSSL. Download |
Paul Kehrer | f7c139c | 2014-05-20 08:32:00 -0500 | [diff] [blame] | 27 | a `pre-compiled binary`_ to resolve the issue. To select the right architecture |
| 28 | (32-bit or 64-bit) open a command prompt and start your Python interpreter. |
| 29 | |
| 30 | If it is 32-bit it will say ``32 bit`` as well as ``Intel`` in the output: |
| 31 | |
| 32 | .. code-block:: console |
| 33 | |
| 34 | Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32 |
| 35 | |
| 36 | If it is 64-bit you will see ``64 bit`` as well as ``AMD64``: |
| 37 | |
| 38 | .. code-block:: console |
| 39 | |
| 40 | Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32 |
| 41 | |
| 42 | Note that for both 32-bit and 64-bit it will say ``win32``, but other data |
| 43 | in the string may vary based on your version of Python. |
Paul Kehrer | c23d576 | 2014-05-08 12:41:45 -0500 | [diff] [blame] | 44 | |
Alex Gaynor | de06b29 | 2014-02-18 16:40:09 -0800 | [diff] [blame] | 45 | .. _`NaCl`: http://nacl.cr.yp.to/ |
| 46 | .. _`PyNaCl`: https://pynacl.readthedocs.org |
Paul Kehrer | c23d576 | 2014-05-08 12:41:45 -0500 | [diff] [blame] | 47 | .. _`pre-compiled binary`: https://www.openssl.org/related/binaries.html |