blob: 424fdb6c7c0b7d0aeb404eeb9c3b641b21f6f804 [file] [log] [blame]
Alex Gaynor99b69d92013-10-19 17:52:58 -07001Security
2========
3
Ayrxffd8d432014-06-05 17:11:59 +08004We 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
Alex Gaynor940c92f2016-02-19 06:34:39 -05008What is a security issue?
9-------------------------
10
11Anytime it's possible to write code using ``cryptography``'s public API which
12does not provide the guarntees that a reasonable developer would expect it to
13based on our documentation.
14
15That's a bit academic, but basically it means the scope of what we consider a
16vulnerability is broad, and we do not require a proof of concept or even a
17specific exploit, merely a reasonable threat model under which ``cryptography``
18could be attacked.
19
20To give a few examples of things we would consider security issues:
21
22* If a recipe, such as Fernet, made it easy for a user to bypass
23 confidentiality or integrity with the public API (e.g. if the API let a user
24 reuse nonces).
25* If, under any circumstances, we used a CSPRNG which wasn't fork-safe.
26* If ``cryptography`` used an API in an underlying C library and failed to
27 handle error conditions safely.
28
29Examples of things we wouldn't consider security issues:
30
31* Offering ECB mode for symmetric encryption. Though ECB is critically weak, it
32 is documented as being weak in our documentation.
33* Using a variable time comparison somewhere, if it's not possible to
34 articulate any particular program in which this would result in problematic
35 information disclosure.
36
37In general, if you're unsure, we request that you to default to treating things
38as security issues and handling them sensitively, the worst thing that can
39happen is that we'll ask you to file a bug issue.
40
Ayrxffd8d432014-06-05 17:11:59 +080041Reporting a security issue
42--------------------------
43
44We ask that you do not report security issues to our normal GitHub issue
45tracker.
46
47If you believe you've identified a security issue with ``cryptography``, please
Alex Gaynor09dd2872014-10-22 14:15:43 -070048report it to ``alex.gaynor@gmail.com``. Messages may be optionally encrypted
49with PGP using key fingerprint
Alex Gaynor940c92f2016-02-19 06:34:39 -050050``F7FC 698F AAE2 D2EF BECD E98E D1B3 ADC0 E023 8CA6`` (this public key is
Alex Gaynor09dd2872014-10-22 14:15:43 -070051available from most commonly-used key servers).
Alex Gaynor99b69d92013-10-19 17:52:58 -070052
Alex Gaynor9cd4b212014-01-10 06:54:21 -080053Once you've submitted an issue via email, you should receive an acknowledgment
Alex Gaynor99b69d92013-10-19 17:52:58 -070054within 48 hours, and depending on the action to be taken, you may receive
Alex Gaynor59075df2014-01-10 11:40:03 -080055further follow-up emails.
Ayrxffd8d432014-06-05 17:11:59 +080056
57Supported Versions
58------------------
59
60At any given time, we will provide security support for the `master`_ branch
Alex Gaynor940c92f2016-02-19 06:34:39 -050061as well as the most recent release.
Ayrxffd8d432014-06-05 17:11:59 +080062
Terry Chia81fed662014-07-07 11:25:51 +080063New releases for OpenSSL updates
64--------------------------------
65
Alex Gaynor84cd1392015-09-25 10:06:30 -040066As of version 0.5, ``cryptography`` statically links OpenSSL on Windows, and as
67of version 1.0.1 on OS X, to ease installation. Due to this, ``cryptography``
68will release a new version whenever OpenSSL has a security or bug fix release to
69avoid shipping insecure software.
Terry Chia81fed662014-07-07 11:25:51 +080070
71Like all our other releases, this will be announced on the mailing list and we
72strongly recommend that you upgrade as soon as possible.
73
Ayrxffd8d432014-06-05 17:11:59 +080074Disclosure Process
75------------------
76
77Our process for taking a security issue from private discussion to public
78disclosure involves multiple steps.
79
80Approximately one week before full public disclosure, we will send advance
81notification of the issue to a list of people and organizations, primarily
82composed of operating-system vendors and other distributors of
Ayrxead04a42014-06-06 00:59:18 +080083``cryptography``. This notification will consist of an email message
84containing:
Ayrxffd8d432014-06-05 17:11:59 +080085
86* A full description of the issue and the affected versions of
87 ``cryptography``.
88* The steps we will be taking to remedy the issue.
Ayrx189f1702014-06-05 18:16:36 +080089* The patches, if any, that will be applied to ``cryptography``.
Ayrxffd8d432014-06-05 17:11:59 +080090* The date on which the ``cryptography`` team will apply these patches, issue
Alex Gaynore2f523a2014-06-05 13:09:47 -070091 new releases, and publicly disclose the issue.
Ayrxffd8d432014-06-05 17:11:59 +080092
93Simultaneously, the reporter of the issue will receive notification of the date
94on which we plan to take the issue public.
95
96On the day of disclosure, we will take the following steps:
97
Ayrx189f1702014-06-05 18:16:36 +080098* Apply the relevant patches to the ``cryptography`` repository. The commit
Ayrxffd8d432014-06-05 17:11:59 +080099 messages for these patches will indicate that they are for security issues,
100 but will not describe the issue in any detail; instead, they will warn of
101 upcoming disclosure.
Ayrx189f1702014-06-05 18:16:36 +0800102* Issue the relevant releases.
Ayrxffd8d432014-06-05 17:11:59 +0800103* Post a notice to the cryptography mailing list that describes the issue in
104 detail, point to the new release and crediting the reporter of the issue.
105
106If a reported issue is believed to be particularly time-sensitive due to a
107known exploit in the wild, for example the time between advance notification
108and public disclosure may be shortened considerably.
109
110The list of people and organizations who receives advanced notification of
111security issues is not and will not be made public. This list generally
112consists of high profile downstream distributors and is entirely at the
113discretion of the ``cryptography`` team.
114
115.. _`master`: https://github.com/pyca/cryptography