• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Security
2========
3
4We take the security of ``cryptography`` seriously. The following are a set of
5policies we have adopted to ensure that security issues are addressed in a
6timely fashion.
7
8Infrastructure
9--------------
10
11In addition to ``cryptography``'s code, we're also concerned with the security
12of the infrastructure we run (primarily ``cryptography.io``).  If you discover
13a security vulnerability in our infrastructure, we ask you to report it using
14the same procedure.
15
16What is a security issue?
17-------------------------
18
19Anytime it's possible to write code using ``cryptography``'s public API which
20does not provide the guarantees that a reasonable developer would expect it to
21based on our documentation.
22
23That's a bit academic, but basically it means the scope of what we consider a
24vulnerability is broad, and we do not require a proof of concept or even a
25specific exploit, merely a reasonable threat model under which ``cryptography``
26could be attacked.
27
28To give a few examples of things we would consider security issues:
29
30* If a recipe, such as Fernet, made it easy for a user to bypass
31  confidentiality or integrity with the public API (e.g. if the API let a user
32  reuse nonces).
33* If, under any circumstances, we used a CSPRNG which wasn't fork-safe.
34* If ``cryptography`` used an API in an underlying C library and failed to
35  handle error conditions safely.
36
37Examples of things we wouldn't consider security issues:
38
39* Offering ECB mode for symmetric encryption in the *Hazmat* layer. Though ECB
40  is critically weak, it is documented as being weak in our documentation.
41* Using a variable time comparison somewhere, if it's not possible to
42  articulate any particular program in which this would result in problematic
43  information disclosure.
44
45In general, if you're unsure, we request that you to default to treating things
46as security issues and handling them sensitively, the worst thing that can
47happen is that we'll ask you to file a public issue.
48
49Reporting a security issue
50--------------------------
51
52We ask that you do not report security issues to our normal GitHub issue
53tracker.
54
55If you believe you've identified a security issue with ``cryptography``, please
56report it to ``alex.gaynor@gmail.com`` and/or ``paul.l.kehrer@gmail.com``. You
57should verify that your MTA uses TLS to ensure the confidentiality of your
58message.
59
60Once you've submitted an issue via email, you should receive an acknowledgment
61within 48 hours, and depending on the action to be taken, you may receive
62further follow-up emails.
63
64Supported Versions
65------------------
66
67At any given time, we will provide security support for the `master`_ branch
68as well as the most recent release.
69
70New releases for OpenSSL updates
71--------------------------------
72
73As of versions 0.5, 1.0.1, and 2.0.0, ``cryptography`` statically links OpenSSL
74in binary distributions for Windows, macOS, and Linux respectively, to ease
75installation. Due to this, ``cryptography`` will release a new version whenever
76OpenSSL has a security or bug fix release to avoid shipping insecure software.
77
78Like all our other releases, this will be announced on the mailing list and we
79strongly recommend that you upgrade as soon as possible.
80
81Disclosure Process
82------------------
83
84When we become aware of a security bug in ``cryptography``, we will endeavor to
85fix it and issue a release as quickly as possible. We will generally issue a new
86release for any security issue.
87
88The steps for issuing a security release are described in our
89:doc:`/doing-a-release` documentation.
90
91
92.. _`master`: https://github.com/pyca/cryptography
93