2021-11-03 22:51:23 +00:00
|
|
|
Use of OpenSSL
|
|
|
|
|
==============
|
2013-09-30 17:52:36 +00:00
|
|
|
|
2021-11-03 22:51:23 +00:00
|
|
|
``cryptography`` depends on the `OpenSSL`_ C library for all cryptographic
|
|
|
|
|
operation. OpenSSL is the de facto standard for cryptographic libraries and
|
|
|
|
|
provides high performance along with various certifications that may be
|
|
|
|
|
relevant to developers.
|
2013-10-27 21:26:17 +00:00
|
|
|
|
2021-11-03 22:51:23 +00:00
|
|
|
A list of supported versions can be found in our :doc:`/installation`
|
|
|
|
|
documentation.
|
2013-09-30 17:37:22 +00:00
|
|
|
|
2021-11-03 22:51:23 +00:00
|
|
|
In general the backend should be considered an internal implementation detail
|
2023-03-24 12:36:58 +00:00
|
|
|
of the project, but there are some public methods available for debugging
|
|
|
|
|
purposes.
|
2016-09-01 15:39:57 +00:00
|
|
|
|
2021-11-03 22:51:23 +00:00
|
|
|
.. data:: cryptography.hazmat.backends.openssl.backend
|
2013-09-30 17:37:22 +00:00
|
|
|
|
2016-12-22 03:10:03 +00:00
|
|
|
.. method:: openssl_version_text()
|
|
|
|
|
|
|
|
|
|
:return text: The friendly string name of the loaded OpenSSL library.
|
|
|
|
|
This is not necessarily the same version as it was compiled against.
|
|
|
|
|
|
|
|
|
|
.. method:: openssl_version_number()
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 1.8
|
|
|
|
|
|
|
|
|
|
:return int: The integer version of the loaded OpenSSL library. This is
|
|
|
|
|
defined in ``opensslv.h`` as ``OPENSSL_VERSION_NUMBER`` and is
|
|
|
|
|
typically shown in hexadecimal (e.g. ``0x1010003f``). This is
|
|
|
|
|
not necessarily the same version as it was compiled against.
|
|
|
|
|
|
2022-09-26 21:20:58 +00:00
|
|
|
.. _legacy-provider:
|
|
|
|
|
|
|
|
|
|
Legacy provider in OpenSSL 3.x
|
|
|
|
|
------------------------------
|
|
|
|
|
|
|
|
|
|
.. versionadded:: 39.0.0
|
|
|
|
|
|
|
|
|
|
Users can set ``CRYPTOGRAPHY_OPENSSL_NO_LEGACY`` environment variable to
|
|
|
|
|
disable the legacy provider in OpenSSL 3.x. This will disable legacy
|
|
|
|
|
cryptographic algorithms, including ``Blowfish``, ``CAST5``, ``SEED``,
|
|
|
|
|
``ARC4``, and ``RC2`` (which is used by some encrypted serialization formats).
|
|
|
|
|
|
2014-01-30 03:39:13 +00:00
|
|
|
|
2013-09-30 17:37:22 +00:00
|
|
|
.. _`OpenSSL`: https://www.openssl.org/
|