blob: 3456ba974f6d8148a9eb0ef09af5655d6bca4d02 [file] [log] [blame]
Alex Stapletonc5fffd32014-03-18 15:29:00 +00001Frequently asked questions
Alex Gaynorde06b292014-02-18 16:40:09 -08002==========================
3
Alex Gaynor59a6bc62014-02-18 18:13:48 -08004How does ``cryptography`` compare to NaCl (Networking and Cryptography Library)?
Alex Gaynorde06b292014-02-18 16:40:09 -08005--------------------------------------------------------------------------------
6
7While ``cryptography`` and `NaCl`_ both share the goal of making cryptography
8easier, and safer, to use for developers, ``cryptography`` is designed to be a
Alex Gaynorc37adab2014-02-18 16:46:58 -08009general purpose library, interoperable with existing systems, while NaCl
10features a collection of hand selected algorithms.
Alex Gaynorde06b292014-02-18 16:40:09 -080011
Alex Gaynor5809d482014-02-19 13:33:18 -080012``cryptography``'s :ref:`recipes <cryptography-layout>` layer has similar goals
13to NaCl.
Alex Gaynorde06b292014-02-18 16:40:09 -080014
15If you prefer NaCl's design, we highly recommend `PyNaCl`_.
16
Alex Gaynorc77db592016-03-09 07:12:06 -050017Compiling ``cryptography`` on OS X produces a ``fatal error: 'openssl/aes.h' file not found`` error
Alex Gaynor6a070e22016-03-09 09:07:14 -050018---------------------------------------------------------------------------------------------------
Alex Gaynorc77db592016-03-09 07:12:06 -050019
20This happens because OS X 10.11 no longer includes a copy of OpenSSL.
21``cryptography`` now provides wheels which include a statically linked copy of
22OpenSSL. You're seeing this error because your copy of pip is too old to find
23our wheel files. Upgrade your copy of pip with ``pip install -U pip`` and then
24try install ``cryptography`` again.
Alex Gaynor0fa997b2016-03-09 07:13:04 -050025
Paul Kehrerfcf6fca2016-03-12 16:21:24 -040026Starting ``cryptography`` using ``mod_wsgi`` produces an ``InternalError`` during a call in ``_register_osrandom_engine``
27-------------------------------------------------------------------------------------------------------------------------
28
29This happens because ``mod_wsgi`` uses sub-interpreters, which can cause a
30problem during initialization of the OpenSSL backend. To resolve this set the
31`WSGIApplicationGroup`_ to ``%{GLOBAL}`` in the ``mod_wsgi`` configuration.
32
33``cryptography`` raised an ``InternalError`` and I'm not sure what to do?
34-------------------------------------------------------------------------
35
36Frequently ``InternalError`` is raised when there are errors on the OpenSSL
37error stack that were placed there by other libraries that are also using
38OpenSSL. Try removing the other libraries and see if the problem persists.
Paul Kehrer4e9bd8c2016-03-12 16:33:39 -040039If you have no other libraries using OpenSSL in your process, or they do not
40appear to be at fault, it's possible that this is a bug in ``cryptography``.
41Please file an `issue`_ with instructions on how to reproduce it.
Paul Kehrerfcf6fca2016-03-12 16:21:24 -040042
Alex Gaynor0fa997b2016-03-09 07:13:04 -050043.. _`NaCl`: https://nacl.cr.yp.to/
44.. _`PyNaCl`: https://pynacl.readthedocs.org
Paul Kehrerfcf6fca2016-03-12 16:21:24 -040045.. _`WSGIApplicationGroup`: https://modwsgi.readthedocs.org/en/develop/configuration-directives/WSGIApplicationGroup.html
Paul Kehrer4e9bd8c2016-03-12 16:33:39 -040046.. _`issue`: https://github.com/pyca/cryptography/issues