cryptography icon indicating copy to clipboard operation
cryptography copied to clipboard

Relicense as dual Apache / BSD 2 clause

Open alex opened this issue 12 years ago • 72 comments

This will allow folks with GPLv2 codebases to use us, and is a blocker for PyCrypto to be implemented on top of us. I've consulted with an IP lawyer to verify that this will allow more people to use Cryptography, while still giving us the protections of the Apache license.

Tasks:

  • [x] Update LICENSE file appropriately
  • [x] Update setup.py classifiers
  • [x] Update __about__.py and cryptography_vectors/__about__.py
  • [x] Figure out what to do with copyright headers in every file
  • [x] Update contributing documentation
  • [x] Receive consent of all folks who have contributed to cryptography in the past.
  • [x] Changelog entry.

List of folks whose consent we need:

  • [x] Alex Gaynor
  • [x] Paul Kehrer
  • [x] David Reid
  • [x] Alex Stapleton
  • [x] Donald Stufft
  • [x] Ayrx
  • [x] Laurens Van Houtven
  • [x] Mohammed Attia
  • [x] Jean-Paul Calderone
  • [x] cyli
  • [x] Hynek Schlawack
  • [x] Julian Krause
  • [x] Richard Wall
  • [x] Ashwini Oruganti
  • [x] PhiBo
  • [x] Matthew Iversen
  • [x] Christian Heimes
  • [x] Chris Glass
  • [x] Chirag Jog
  • [x] Kubilay Kocak
  • [x] Konstantinos Koukopoulos
  • [x] timic
  • [x] ashfall
  • [x] Nic Young
  • [x] Jeff Tang
  • [x] Fedor Brunner
  • [x] Daniele Sluijters
  • [x] Cory Benfield
  • [x] skeuomorf
  • [x] Matt Iversen
  • [x] Kyle Kelley
  • [x] Kimmo Parviainen-Jalanko
  • [x] manuels
  • [x] kennwhite
  • [x] Wouter Bolsterlee
  • [x] Thomas Fenzl
  • [x] Taewook Kang
  • [x] Stephen Holsapple
  • [x] Sascha Peilicke
  • [x] Marcin Wielgoszewski
  • [x] Jonathan Giannuzzi
  • [x] Jay Parlar
  • [x] D.S. Ljungmark
  • [x] Arturo Filastò

alex avatar Jul 02 '14 16:07 alex

I know you asked a real life human lawyer @alex but I am not entirely sure I understand why we need this. I know the FSF guidelines say that GPLv2 isn't compatible with APLv2, but AIUI this is due to the patent clauses in APLv2 and those only apply to contributors to this project and by extension derivatives. However APLv2 isn't viral so it's quite hard to qualify as a real derivative, why would this effect projects that just happen to use cryptography?

public avatar Jul 02 '14 16:07 public

My permission is given. Go for it!

Spindel avatar Jul 02 '14 17:07 Spindel

My permission is given.

sholsapp avatar Jul 02 '14 17:07 sholsapp

@Spindel embarrassing question, but which name are you?

alex avatar Jul 02 '14 17:07 alex

+0.0, as in mailing list. Checked myself off.

lvh avatar Jul 02 '14 17:07 lvh

My permission is given.

mrjefftang avatar Jul 02 '14 17:07 mrjefftang

I'm happy for you to relicense. I'm also open to assigning the copyright to y'all if that makes your life easier in future.

Lukasa avatar Jul 02 '14 17:07 Lukasa

Dual-licensing means people can use the software under either license, right? Can somebody explain to me how the Apache license stays relevant if the other is BSD 2 clause? In any case, if you think that's a reasonable step, I give permission.

anotherthomas avatar Jul 02 '14 17:07 anotherthomas

@anotherthomas Yes, it means users will be able to use it under both licenses, but contributors will need to offer their contributions under both licenses, meaning we still have the patent and other protections from the Apache license.

alex avatar Jul 02 '14 17:07 alex

@alex I see. Thanks.

anotherthomas avatar Jul 02 '14 17:07 anotherthomas

My permission is given. Checked myself.

reaperhulk avatar Jul 02 '14 19:07 reaperhulk

I give my permission.

dstufft avatar Jul 02 '14 19:07 dstufft

My permission is given.

cipherself avatar Jul 02 '14 19:07 cipherself

My permission is given.

ashfall avatar Jul 02 '14 19:07 ashfall

I give my permission.

harleyk avatar Jul 02 '14 19:07 harleyk

Chiming in as PyCrypto maintainer, I'll outline the motivation behind this change, from my perspective:

There are too many FOSS crypto libraries and too few people with the knowledge, skills, and free time to maintain them. We saw this recently with OpenSSL, and PyCrypto suffers from the same problem. PyCrypto has millions of end-users, but there are only a couple of contributors working on it in our spare time. When we inevitably make mistakes, it's rare that anyone notices. Some of the larger examples of this include:

  • In February 2003, a bug was introduced in PyCrypto's setup.py that prevented the "winrandom" module from being built. (At that time, there was no os.urandom, and PyCrypto's RandomPool class seeded itself on a best-effort basis.) The result was that PyCrypto's random number generator was predictable on Windows in versions 1.9a5 through 2.0.1. This resulted in the paramiko library being insecure on Windows. Twice. The v2.1.0 release, which contained the fix, was released in December 2009---almost 7 years after the bug was introduced.
  • In 2008-2009, I wrote a new RNG API and implementation for PyCrypto that was specifically designed to avoid the threading and forking bugs in the old version. In 2013, I stumbled upon a race condition in the fork-handling behavior while writing some example code. Nobody else had noticed in the intervening 5 years.
  • In 2012, I merged a seemingly innocent change from one of PyCrypto's most active contributors. The change was ostensibly about "documentation" (it wrapped the C implementation with Python classes containing docstrings), but it also changed the behavior of the obscure 'IV' attribute on cipher objects. It's not clear whether any software relied on this attribute, but in theory it could have been used to implement block cipher modes-of-operation not yet natively supported by PyCrypto. The change silently turned assignment to this attribute into a no-op, which would result in a catastrophic security failure in an application that uses this feature. This bug made it into the PyCrypto 2.6 release, and has yet to be fixed: https://bugs.launchpad.net/pycrypto/+bug/1176482

With this license change, the PyCrypto and Cryptography communities could begin to eliminate redundancies between the two projects. PyCrypto would provide its Crypto API within the framework provided by Cryptography, and the backend implementations would be shared between the two projects. To preserve PyCrypto's GPLv2 compatibility, we would still need to substitute a GPLv2-compatible backend for the current OpenSSL-based backend, but I understand that this is already planned. If there are any remaining gaps, we could perhaps transform PyCrypto's existing C code into a Cryptography-style backend.

@public While I understand that there is some debate as to whether APLv2 is truly incompatible with GPLv2, that's the position taken by the FSF and acknowledged by the ASF. Perhaps out of an abundance of caution, it has been raised as a concern by the maintainer of Debian's python-crypto package. This license change should eliminate any doubt and allow us to focus on the technical challenges ahead.

dlitz avatar Jul 02 '14 19:07 dlitz

Yea, arguing about whether it is or isn't compatible is for lawyers :)

dstufft avatar Jul 02 '14 19:07 dstufft

Ah, sorry. I'm listed as D.Spindel Ljungmark.

Spindel avatar Jul 02 '14 20:07 Spindel

I think this is a bad idea but given my minimal contributions to the project and the apparently widespread support I'm checking the checkbox next to my name anyway.

exarkun avatar Jul 02 '14 20:07 exarkun

Sounds good to me: My permission is given

nryoung avatar Jul 02 '14 21:07 nryoung