
cryptographyは、Python開発者に暗号プリミティブとレシピを公開するために設計されたパッケージです。
.. image:: https://img.shields.io/pypi/v/cryptography.svg :target: https://pypi.org/project/cryptography/ :alt: 最新バージョン
.. image:: https://readthedocs.org/projects/cryptography/badge/?version=latest :target: https://cryptography.io :alt: 最新ドキュメント
.. image:: https://github.com/pyca/cryptography/actions/workflows/ci.yml/badge.svg :target: https://github.com/pyca/cryptography/actions/workflows/ci.yml?query=branch%3Amain
cryptography は、Python開発者に暗号学的レシピとプリミティブを提供するパッケージです。私たちの目標は、これを「暗号標準ライブラリ」とすることです。Python 3.9+ および PyPy3 7.3.11+ をサポートしています。
cryptography には、対称暗号、メッセージダイジェスト、鍵導出関数などの一般的な暗号アルゴリズムに対する高水準レシピと低水準インターフェースの両方が含まれています。例えば、cryptography の高水準対称暗号化レシピを使って何かを暗号化するには:
.. code-block:: pycon
>>> from cryptography.fernet import Fernet
>>> # Put this somewhere safe!
>>> key = Fernet.generate_key()
>>> f = Fernet(key)
>>> token = f.encrypt(b"A really secret message. Not for prying eyes.")
>>> token
b'...'
>>> f.decrypt(token)
b'A really secret message. Not for prying eyes.'
詳細については、documentation_ をご覧ください。
次のようにして cryptography をインストールできます:
.. code-block:: console
$ pip install cryptography
詳細については、the installation documentation_ を参照してください。
議論
バグを見つけた場合は、`issue tracker`_ に報告してください。
開発に関する議論のために、`cryptography-dev`_ メーリングリストを運営しています。
質問や参加のために、irc.libera.chat の #pyca に参加することもできます。
セキュリティ
セキュリティ問題を報告する必要がありますか? security reporting_ ドキュメントを参照してください。
.. _documentation: https://cryptography.io/
.. _the installation documentation: https://cryptography.io/en/latest/installation/
.. _issue tracker: https://github.com/pyca/cryptography/issues
.. _cryptography-dev: https://mail.python.org/mailman/listinfo/cryptography-dev
.. _security reporting: https://cryptography.io/en/latest/security/