Showing preview only (2,409K chars total). Download the full file or copy to clipboard to get everything.
Repository: pycrypto/pycrypto
Branch: master
Commit: 65b43bd4ffe2
Files: 225
Total size: 2.3 MB
Directory structure:
gitextract_ppwzf27z/
├── .gitignore
├── .mailmap
├── .travis.yml
├── ACKS
├── COPYRIGHT
├── ChangeLog
├── Doc/
│ ├── AEAD_API.txt
│ ├── epydoc-config
│ └── pycrypt.rst
├── LEGAL/
│ ├── 00INDEX
│ ├── CodeSubmissionRequirements-RevA.txt
│ ├── CodeSubmissionRequirements-RevB.txt
│ ├── CodeSubmissionRequirements-RevC.txt
│ ├── CodeSubmissionRequirements.txt
│ ├── copy/
│ │ ├── 00INDEX
│ │ ├── LICENSE.libtom
│ │ ├── LICENSE.orig
│ │ ├── LICENSE.python-2.2
│ │ └── stmts/
│ │ ├── Andrew_M_Kuchling.mbox
│ │ ├── Barry_A_Warsaw.mbox
│ │ ├── Jeethu_Rao.mbox
│ │ ├── Joris_Bontje.mbox
│ │ ├── Mark_Moraes.mbox
│ │ ├── Paul_Swartz.mbox
│ │ ├── Robey_Pointer.asc
│ │ └── Wim_Lewis.asc
│ └── tsu-notify.mbox
├── MANIFEST.in
├── README.md
├── TODO
├── bootstrap.sh
├── build-aux/
│ ├── compile
│ ├── config.guess
│ ├── config.sub
│ ├── install-sh
│ └── missing
├── buildenv.in
├── configure
├── configure.ac
├── lib/
│ └── Crypto/
│ ├── Cipher/
│ │ ├── AES.py
│ │ ├── ARC2.py
│ │ ├── ARC4.py
│ │ ├── Blowfish.py
│ │ ├── CAST.py
│ │ ├── DES.py
│ │ ├── DES3.py
│ │ ├── PKCS1_OAEP.py
│ │ ├── PKCS1_v1_5.py
│ │ ├── XOR.py
│ │ ├── __init__.py
│ │ └── blockalgo.py
│ ├── Hash/
│ │ ├── CMAC.py
│ │ ├── HMAC.py
│ │ ├── MD5.py
│ │ ├── RIPEMD.py
│ │ ├── SHA.py
│ │ ├── SHA1.py
│ │ └── __init__.py
│ ├── IO/
│ │ ├── PEM.py
│ │ ├── PKCS8.py
│ │ ├── _PBES.py
│ │ └── __init__.py
│ ├── Protocol/
│ │ ├── AllOrNothing.py
│ │ ├── Chaffing.py
│ │ ├── KDF.py
│ │ └── __init__.py
│ ├── PublicKey/
│ │ ├── DSA.py
│ │ ├── ElGamal.py
│ │ ├── RSA.py
│ │ ├── _DSA.py
│ │ ├── _RSA.py
│ │ ├── __init__.py
│ │ ├── _slowmath.py
│ │ └── pubkey.py
│ ├── Random/
│ │ ├── Fortuna/
│ │ │ ├── FortunaAccumulator.py
│ │ │ ├── FortunaGenerator.py
│ │ │ ├── SHAd256.py
│ │ │ └── __init__.py
│ │ ├── OSRNG/
│ │ │ ├── __init__.py
│ │ │ ├── fallback.py
│ │ │ ├── nt.py
│ │ │ ├── posix.py
│ │ │ └── rng_base.py
│ │ ├── _UserFriendlyRNG.py
│ │ ├── __init__.py
│ │ └── random.py
│ ├── SelfTest/
│ │ ├── Cipher/
│ │ │ ├── __init__.py
│ │ │ ├── common.py
│ │ │ ├── test_AES.py
│ │ │ ├── test_ARC2.py
│ │ │ ├── test_ARC4.py
│ │ │ ├── test_Blowfish.py
│ │ │ ├── test_CAST.py
│ │ │ ├── test_DES.py
│ │ │ ├── test_DES3.py
│ │ │ ├── test_XOR.py
│ │ │ ├── test_pkcs1_15.py
│ │ │ └── test_pkcs1_oaep.py
│ │ ├── Hash/
│ │ │ ├── __init__.py
│ │ │ ├── common.py
│ │ │ ├── test_CMAC.py
│ │ │ ├── test_HMAC.py
│ │ │ ├── test_MD2.py
│ │ │ ├── test_MD4.py
│ │ │ ├── test_MD5.py
│ │ │ ├── test_RIPEMD160.py
│ │ │ ├── test_SHA1.py
│ │ │ ├── test_SHA224.py
│ │ │ ├── test_SHA256.py
│ │ │ ├── test_SHA384.py
│ │ │ └── test_SHA512.py
│ │ ├── IO/
│ │ │ ├── __init__.py
│ │ │ └── test_PKCS8.py
│ │ ├── Protocol/
│ │ │ ├── __init__.py
│ │ │ ├── test_AllOrNothing.py
│ │ │ ├── test_KDF.py
│ │ │ ├── test_chaffing.py
│ │ │ └── test_rfc1751.py
│ │ ├── PublicKey/
│ │ │ ├── __init__.py
│ │ │ ├── test_DSA.py
│ │ │ ├── test_ElGamal.py
│ │ │ ├── test_RSA.py
│ │ │ ├── test_import_DSA.py
│ │ │ └── test_import_RSA.py
│ │ ├── Random/
│ │ │ ├── Fortuna/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_FortunaAccumulator.py
│ │ │ │ ├── test_FortunaGenerator.py
│ │ │ │ └── test_SHAd256.py
│ │ │ ├── OSRNG/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_fallback.py
│ │ │ │ ├── test_generic.py
│ │ │ │ ├── test_nt.py
│ │ │ │ ├── test_posix.py
│ │ │ │ └── test_winrandom.py
│ │ │ ├── __init__.py
│ │ │ ├── test__UserFriendlyRNG.py
│ │ │ ├── test_random.py
│ │ │ └── test_rpoolcompat.py
│ │ ├── Signature/
│ │ │ ├── __init__.py
│ │ │ ├── test_pkcs1_15.py
│ │ │ └── test_pkcs1_pss.py
│ │ ├── Util/
│ │ │ ├── __init__.py
│ │ │ ├── test_Counter.py
│ │ │ ├── test_Padding.py
│ │ │ ├── test_asn1.py
│ │ │ ├── test_number.py
│ │ │ └── test_winrandom.py
│ │ ├── __init__.py
│ │ └── st_common.py
│ ├── Signature/
│ │ ├── PKCS1_PSS.py
│ │ ├── PKCS1_v1_5.py
│ │ └── __init__.py
│ ├── Util/
│ │ ├── Counter.py
│ │ ├── Padding.py
│ │ ├── RFC1751.py
│ │ ├── __init__.py
│ │ ├── _number_new.py
│ │ ├── _time.py
│ │ ├── asn1.py
│ │ ├── number.py
│ │ ├── py21compat.py
│ │ ├── py3compat.py
│ │ ├── randpool.py
│ │ └── winrandom.py
│ ├── __init__.py
│ └── pct_warnings.py
├── m4/
│ ├── ax_append_flag.m4
│ ├── ax_check_compile_flag.m4
│ ├── ax_check_link_flag.m4
│ └── ax_check_preproc_flag.m4
├── pct-speedtest.py
├── python-3-changes.txt
├── setup.py
├── src/
│ ├── AES.c
│ ├── AESNI.c
│ ├── ARC2.c
│ ├── ARC4.c
│ ├── Blowfish-tables.h
│ ├── Blowfish.c
│ ├── CAST.c
│ ├── DES.c
│ ├── DES3.c
│ ├── MD2.c
│ ├── MD4.c
│ ├── RIPEMD160.c
│ ├── SHA224.c
│ ├── SHA256.c
│ ├── SHA384.c
│ ├── SHA512.c
│ ├── XOR.c
│ ├── _counter.c
│ ├── _counter.h
│ ├── _fastmath.c
│ ├── block_template.c
│ ├── cast5.c
│ ├── config.h.in
│ ├── cpuid.c
│ ├── galois.c
│ ├── hash_SHA2.h
│ ├── hash_SHA2_template.c
│ ├── hash_template.c
│ ├── inc-msvc/
│ │ ├── config.h
│ │ └── stdint.h
│ ├── libtom/
│ │ ├── tomcrypt.h
│ │ ├── tomcrypt_argchk.h
│ │ ├── tomcrypt_cfg.h
│ │ ├── tomcrypt_cipher.h
│ │ ├── tomcrypt_custom.h
│ │ ├── tomcrypt_des.c
│ │ ├── tomcrypt_hash.h
│ │ ├── tomcrypt_mac.h
│ │ ├── tomcrypt_macros.h
│ │ ├── tomcrypt_math.h
│ │ ├── tomcrypt_misc.h
│ │ ├── tomcrypt_pk.h
│ │ ├── tomcrypt_pkcs.h
│ │ └── tomcrypt_prng.h
│ ├── pycrypto_common.h
│ ├── pycrypto_compat.h
│ ├── stream_template.c
│ ├── strxor.c
│ └── winrand.c
├── tools/
│ ├── create-pythons.sh
│ └── test-all.sh
└── tox.ini
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# setup.py can generate these directories:
/dist/
/build/
/Doc/apidoc/
# Ignore these files:
*.py[co]
.DS_Store
MANIFEST
# Autoconf
/aclocal.m4
/buildenv
/autom4te.cache
/autoscan.log
/config.h
/config.log
/config.status
src/config.h
src/stamp-h1
# Python versions
/tools/py/
# Backup files
*~
# Tox
.tox
================================================
FILE: .mailmap
================================================
A.M. Kuchling <amk@amk.ca> <akuchling@rivest.dlitz.net>
A.M. Kuchling <amk@amk.ca> <amk@rivest.dlitz.net>
Darsey Litzenberger <dlitz@dlitz.net> <dlitz@dlitz.net>
Darsey Litzenberger <dlitz@dlitz.net> <dwon@hedgehog.dlitz.net>
Helder Eijs (Legrandin) <helderijs@gmail.com> <e.bened@gmail.com>
Helder Eijs (Legrandin) <helderijs@gmail.com> <gooksankoo@hoiptorrow.mailexpire.com>
Helder Eijs (Legrandin) <helderijs@gmail.com> <helderijs@gmail.com>
Joris Bontje <jbontje> <jbontje@rivest.dlitz.net>
Mark Moraes <moraes> <moraes@rivest.dlitz.net>
Paul Swartz <z3p> <z3p@rivest.dlitz.net>
Sebastian Ramacher <sebastian+dev@ramacher.at> <sebastian@ramacher.at>
Sebastian Ramacher <sebastian+dev@ramacher.at> <s.ramacher@gmx.at>
================================================
FILE: .travis.yml
================================================
# PyCrypto .travis.yml file, for travis-ci.org testing.
# See https://travis-ci.org/dlitz/pycrypto for build status.
env:
- PYENV_VERSION=2.1.3
- PYENV_VERSION=2.2.3
- PYENV_VERSION=2.3.7
- PYENV_VERSION=2.4.6
- PYENV_VERSION=2.5.6
- PYENV_VERSION=2.6.9
- PYENV_VERSION=2.7.6
- PYENV_VERSION=2.7.6 python_flags=-Qnew
- PYENV_VERSION=2.7.6 python_flags=-OO
- PYENV_VERSION=2.7.6 preconfigure_args=--without-gmp
# pip won't install on Python 3.0 (lack of collections.OrderedDict object?)
# - PYENV_VERSION=3.0.1
- PYENV_VERSION=3.1.5
- PYENV_VERSION=3.2.5
- PYENV_VERSION=3.3.5
- PYENV_VERSION=3.4.0
- PYENV_VERSION=3.4.0 preconfigure_args=--without-gmp
# PyCrypto does not support PyPy yet.
# See https://github.com/dlitz/pycrypto/pull/59
# - PYENV_VERSION=pypy-2.3.1
# - PYENV_VERSION=pypy3-2.3.1
language: python
before_install:
# Unexport variables
- declare +x preconfigure_args python_flags
# List local virtualenvs
- ls ~/virtualenv || true
# Show environment
- if [ "$TRAVIS_SECURE_ENV_VARS" = "false" ] ; then env | sort ; fi
# Deactivate whichever virtualenv is currently in use
- deactivate
# Install some package dependencies
- sudo apt-get -qq update
- sudo apt-get -qq install libgmp-dev
# Download pyenv
- pyenv_uri=https://github.com/yyuu/pyenv/archive/59c796c138a04a315171ee3d3275222a0f3bc781.tar.gz
- pyenv_basename=$( basename "$pyenv_uri" .tar.gz )
- wget ${pyenv_uri}
- echo "7f196bfa6fafc7944b6dcc9bf4d037f91625a677463a69a2a3be6c31dcac91bb *${pyenv_basename}.tar.gz" | sha256sum -c -
# Install pyenv into ~/.pyenv and load it
- tar -xvzf ${pyenv_basename}.tar.gz
- mv -f pyenv-${pyenv_basename} ~/.pyenv
- export PATH=~/.pyenv/bin:$PATH
- eval "$(pyenv init -)"
# If the selected Python version is installed locally, activate it. Otherwise, build it using pyenv.
- if [ -e ~/virtualenv/python"$PYENV_VERSION"/bin/activate ] ; then source ~/virtualenv/python"$PYENV_VERSION"/bin/activate ; unset PYENV_VERSION ; else pyenv install "$PYENV_VERSION" ; fi
script:
- "major_version=$( python -V 2>&1 | cut -d' ' -f2 | cut -d. -f1 )"
- if [ "$major_version" -ge 3 ] ; then extra_flags="$extra_flags -bb" ; fi
- if [ -n "$preconfigure_args" ] ; then ./configure $preconfigure_args ; fi
- python -tt $extra_flags $python_flags setup.py -q build
- python -tt $extra_flags $python_flags setup.py test
================================================
FILE: ACKS
================================================
Acknowledgements
----------------
This list is sorted in alphabetical order, and is probably incomplete.
I'd like to thank everybody who contributed in any way, with code, bug
reports, and comments.
This list should not be interpreted as an endorsement of PyCrypto by the
people on it.
Nevins Bartolomeo
Thorsten E. Behrens
Tim Berners-Lee
Frédéric Bertolus
Ian Bicking
Joris Bontje
Antoon Bosselaers
Andrea Bottoni
Jean-Paul Calderone
Sergey Chernov
Geremy Condra
Jan Dittberner
Andrew Eland
Philippe Frycia
Peter Gutmann
Hirendra Hindocha
Nikhil Jhingan
Sebastian Kayser
Ryan Kelly
Andrew M. Kuchling
Piers Lauder
Legrandin
M.-A. Lemburg
Wim Lewis
Darsey Litzenberger
Mark Moraes
Lim Chee Siang
Bryan Olson
Wallace Owen
Colin Plumb
Robey Pointer
Lorenz Quack
Sebastian Ramacher
Jeethu Rao
James P. Rutledge
Matt Schreiner
Peter Simmons
Janne Snabb
Tom St. Denis
Anders Sundman
Paul Swartz
Kevin M. Turner
Barry A. Warsaw
Eric Young
================================================
FILE: COPYRIGHT
================================================
Copyright and licensing of the Python Cryptography Toolkit ("PyCrypto"):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Previously, the copyright and/or licensing status of the Python
Cryptography Toolkit ("PyCrypto") had been somewhat ambiguous. The
original intention of Andrew M. Kuchling and other contributors has
been to dedicate PyCrypto to the public domain, but that intention was
not necessarily made clear in the original disclaimer (see
LEGAL/copy/LICENSE.orig).
Additionally, some files within PyCrypto had specified their own
licenses that differed from the PyCrypto license itself. For example,
the original RIPEMD.c module simply had a copyright statement and
warranty disclaimer, without clearly specifying any license terms.
(An updated version on the author's website came with a license that
contained a GPL-incompatible advertising clause.)
To rectify this situation for PyCrypto 2.1, the following steps have
been taken:
1. Obtaining explicit permission from the original contributors to
dedicate their contributions to the public domain if they have not
already done so. (See the "LEGAL/copy/stmts" directory for
contributors' statements.)
2. Replacing some modules with clearly-licensed code from other
sources (e.g. the DES and DES3 modules were replaced with new ones
based on Tom St. Denis's public-domain LibTomCrypt library.)
3. Replacing some modules with code written from scratch (e.g. the
RIPEMD and Blowfish modules were re-implemented from their
respective algorithm specifications without reference to the old
implementations).
4. Removing some modules altogether without replacing them.
To the best of our knowledge, with the exceptions noted below or
within the files themselves, the files that constitute PyCrypto are in
the public domain. Most are distributed with the following notice:
The contents of this file are dedicated to the public domain. To
the extent that dedication to the public domain is not available,
everyone is granted a worldwide, perpetual, royalty-free,
non-exclusive license to exercise all rights associated with the
contents of this file for any purpose whatsoever.
No rights are reserved.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Exceptions:
- Portions of HMAC.py and setup.py are derived from Python 2.2, and
are therefore Copyright (c) 2001, 2002, 2003 Python Software
Foundation (All Rights Reserved). They are licensed by the PSF
under the terms of the Python 2.2 license. (See the file
LEGAL/copy/LICENSE.python-2.2 for details.)
- The various GNU autotools (autoconf, automake, aclocal, etc.) are
used during the build process. This includes macros from
autoconf-archive, which are located in the m4/ directory. As is
customary, some files from the GNU autotools are included in the
source tree (in the root directory, and in the build-aux/
directory). These files are merely part of the build process, and
are not included in binary builds of the software.
EXPORT RESTRICTIONS:
Note that the export or re-export of cryptographic software and/or
source code may be subject to regulation in your jurisdiction.
================================================
FILE: ChangeLog
================================================
2.7a1
=====
* Experimental release. This introduces a new API for AEAD modes, and
makes a few other minor API changes. These APIs should be considered
experimental, and may be changed before the final release.
* New API for authenticated encryption with associated data (AEAD):
- New block cipher modes:
- MODE_CCM
- MODE_EAX
- MODE_GCM
- MODE_SIV
- New methods:
- .encrypt_and_digest()
- .decrypt_and_verify()
- .digest()
- .verify()
- New MAC algorithm:
- Crypto.Cipher.CMAC
- New .verify() and .hexverify() methods also added to Hash and
HMAC/CMAC objects, providing constant-time hash comparison.
(Thanks: Legrandin, Lucas Garron)
* LP#1132550: Fix MODE_OPENPGP not accepting uppercase 'IV' kwarg.
* LP#1119552: Fix PKCS#1v1.5 not accepting signatures without the
optional NULL parameter
* Add support for import/export of DSA keys. (Thanks: Legrandin)
* Add support for PKCS#8-encrypted private keys. (Thanks: Legrandin)
* LP#996193: Fix MODE_OFB requiring padding (it now behaves as a stream
cipher)
* Improve C extension autodocs
* Remove pointless 'error' attribute from stream ciphers.
* Deprecate the disable_shortcut option to Crypto.Util.Counter;
Remove __PCT_CTR_SHORTCUT__ entirely.
* Fix small MODE_CTR memory leak under Python 3.
* Fix error importing winrandom on Python 3. (Thanks: Jason R. Coombs)
* FortunaAccumulator: Use time.monotonic for rate-limiting if available
(i.e. Python 3.3 and later)
* AES-NI support (Thanks: Sebastian Ramacher)
* setup.py: Fix compilation on HP-UX 11.31. (Thanks: Adam Woodbeck)
* ElGamal: Add blinding to ElGamal decryption. (Thanks: Legrandin)
* Hash: Remove pure-Python wrappers (speeds up hash init 4x-7x)
* Hash: Add generic Crypto.Hash.new(algo, [data]) function
(like hashlib.new)
* Hash: Remove 'oid' attributes; Add 'name' attributes for compatibility
with hashlib.
* Hash: Rename SHA -> SHA1 and RIPEMD -> RIPEMD160, since the original
names are frequently used as the names of other algorithms.
* setup.py: Use autoconf to generate compiler options;
Fix OpenBSD build issues.
* Fix RSA object serialization (i.e. pickle)
* LP#1061217: random.shuffle takes O(n^2) time.
(Thanks: Sujay Jayakar, Andrew Cooke)
* _fastmath: Fix leaks when errors occur.
(Thanks: Sebastian Ramacher, Andreas Stührk)
* SHA256/224/384/512: Don't export symbol 'add_length'
* setup.py: Use os.chmod instead of os.system("chmod ...").
(Thanks: Sebastian Ramacher)
* setup.py: The 'test' command now runs the 'build' command first.
(Thanks: Sebastian Ramacher)
* New tools/create-pythons.sh and tools/test-all.sh scripts for testing
against multiple versions of Python.
* getStrongProne: Fix error handling (Thanks: Sebastian Ramacher)
* ARC4: Add ARC4-drop[n] cipher support. (Thanks: Legrandin)
* RSA.importKey: Properly catch IndexError. (Thanks: Sebastian Ramacher)
* RSA.exportKey: Raise ValueError as documented when key format is
unknown. (Thanks: Sebastian Ramacher)
* RSA.exportKey: Always return bytes (Thanks: Sebastian Ramacher)
* Fix & re-enable some broken tests (Thanks: Sebastian Ramacher)
* Improve Python 3 compatibility
* Various documentation fixes and improvements
(Thanks: Anton Rieder, Legrandin, Sebastian Ramacher, Stefano Rivera)
* Various cleanups, especially for Python 3.
2.6.1
=====
* [CVE-2013-1445] Fix PRNG not correctly reseeded in some situations.
In previous versions of PyCrypto, the Crypto.Random PRNG exhibits a
race condition that may cause forked processes to generate identical
sequences of 'random' numbers.
This is a fairly obscure bug that will (hopefully) not affect many
applications, but the failure scenario is pretty bad. Here is some
sample code that illustrates the problem:
from binascii import hexlify
import multiprocessing, pprint, time
import Crypto.Random
def task_main(arg):
a = Crypto.Random.get_random_bytes(8)
time.sleep(0.1)
b = Crypto.Random.get_random_bytes(8)
rdy, ack = arg
rdy.set()
ack.wait()
return "%s,%s" % (hexlify(a).decode(),
hexlify(b).decode())
n_procs = 4
manager = multiprocessing.Manager()
rdys = [manager.Event() for i in range(n_procs)]
acks = [manager.Event() for i in range(n_procs)]
Crypto.Random.get_random_bytes(1)
pool = multiprocessing.Pool(processes=n_procs,
initializer=Crypto.Random.atfork)
res_async = pool.map_async(task_main, zip(rdys, acks))
pool.close()
[rdy.wait() for rdy in rdys]
[ack.set() for ack in acks]
res = res_async.get()
pprint.pprint(sorted(res))
pool.join()
The output should be random, but it looked like this:
['c607803ae01aa8c0,2e4de6457a304b34',
'c607803ae01aa8c0,af80d08942b4c987',
'c607803ae01aa8c0,b0e4c0853de927c4',
'c607803ae01aa8c0,f0362585b3fceba4']
This release fixes the problem by resetting the rate-limiter when
Crypto.Random.atfork() is invoked. It also adds some tests and a
few related comments.
2.6
===
* [CVE-2012-2417] Fix LP#985164: insecure ElGamal key generation.
(thanks: Legrandin)
In the ElGamal schemes (for both encryption and signatures), g is
supposed to be the generator of the entire Z^*_p group. However, in
PyCrypto 2.5 and earlier, g is more simply the generator of a random
sub-group of Z^*_p.
The result is that the signature space (when the key is used for
signing) or the public key space (when the key is used for encryption)
may be greatly reduced from its expected size of log(p) bits, possibly
down to 1 bit (the worst case if the order of g is 2).
While it has not been confirmed, it has also been suggested that an
attacker might be able to use this fact to determine the private key.
Anyone using ElGamal keys should generate new keys as soon as practical.
Any additional information about this bug will be tracked at
https://bugs.launchpad.net/pycrypto/+bug/985164
* Huge documentation cleanup (thanks: Legrandin).
* Added more tests, including test vectors from NIST 800-38A
(thanks: Legrandin)
* Remove broken MODE_PGP, which never actually worked properly.
A new mode, MODE_OPENPGP, has been added for people wishing to write
OpenPGP implementations. Note that this does not implement the full
OpenPGP specification, only the "OpenPGP CFB mode" part of that
specification.
https://bugs.launchpad.net/pycrypto/+bug/996814
* Fix: getPrime with invalid input causes Python to abort with fatal error
https://bugs.launchpad.net/pycrypto/+bug/988431
* Fix: Segfaults within error-handling paths
(thanks: Paul Howarth & Dave Malcolm)
https://bugs.launchpad.net/pycrypto/+bug/934294
* Fix: Block ciphers allow empty string as IV
https://bugs.launchpad.net/pycrypto/+bug/997464
* Fix DevURandomRNG to work with Python3's new I/O stack.
(thanks: Sebastian Ramacher)
* Remove automagic dependencies on libgmp and libmpir, let the caller
disable them using args.
* Many other minor bug fixes and improvements (mostly thanks to Legrandin)
2.5
===
* Added PKCS#1 encryption schemes (v1.5 and OAEP). We now have
a decent, easy-to-use non-textbook RSA implementation. Yay!
* Added PKCS#1 signature schemes (v1.5 and PSS). v1.5 required some
extensive changes to Hash modules to contain the algorithm specific
ASN.1 OID. To that end, we now always have a (thin) Python module to
hide the one in pure C.
* Added 2 standard Key Derivation Functions (PBKDF1 and PBKDF2).
* Added export/import of RSA keys in OpenSSH and PKCS#8 formats.
* Added password-protected export/import of RSA keys (one old method
for PKCS#8 PEM only).
* Added ability to generate RSA key pairs with configurable public
exponent e.
* Added ability to construct an RSA key pair even if only the private
exponent d is known, and not p and q.
* Added SHA-2 C source code (fully from Lorenz Quack).
* Unit tests for all the above.
* Updates to documentation (both inline and in Doc/pycrypt.rst)
* All of the above changes were put together by Legrandin (Thanks!)
* Minor bug fixes (setup.py and tests).
2.4.1
=====
* Fix "error: Setup script exited with error: src/config.h: No such file or
directory" when installing via easy_install. (Sebastian Ramacher)
2.4
===
* Python 3 support! (Thorsten E. Behrens, Anders Sundman)
PyCrypto now supports every version of Python from 2.1 through 3.2.
* Timing-attack countermeasures in _fastmath: When built against
libgmp version 5 or later, we use mpz_powm_sec instead of mpz_powm.
This should prevent the timing attack described by Geremy Condra at
PyCon 2011:
http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-through-the-side-channel-timing-and-implementation-attacks-in-python-4897955
* New hash modules (for Python >= 2.5 only): SHA224, SHA384, and
SHA512 (Frédéric Bertolus)
* Configuration using GNU autoconf. This should help fix a bunch of
build issues.
* Support using MPIR as an alternative to GMP.
* Improve the test command in setup.py, by allowing tests to be
performed on a single sub-package or module only. (Legrandin)
You can now do something like this:
python setup.py test -m Hash.SHA256 --skip-slow-tests
* Fix double-decref of "counter" when Cipher object initialisation
fails (Ryan Kelly)
* Apply patches from Debian's python-crypto 2.3-3 package (Jan
Dittberner, Sebastian Ramacher):
- fix-RSA-generate-exception.patch
- epydoc-exclude-introspect.patch
- no-usr-local.patch
* Fix launchpad bug #702835: "Import key code is not compatible with
GMP library" (Legrandin)
* More tests, better documentation, various bugfixes.
2.3
===
* Fix NameError when attempting to use deprecated getRandomNumber()
function.
* _slowmath: Compute RSA u parameter when it's not given to
RSA.construct. This makes _slowmath behave the same as _fastmath in
this regard.
* Make RSA.generate raise a more user-friendly exception message when
the user tries to generate a bogus-length key.
2.2
===
* Deprecated Crypto.Util.number.getRandomNumber(), which had confusing
semantics. It's been replaced by getRandomNBitInteger and
getRandomInteger. (Thanks: Lorenz Quack)
* Better isPrime() and getPrime() implementations that do a real
Rabin-Miller probabilistic primality test (not the phony test we did
before with fixed bases). (Thanks: Lorenz Quack)
* getStrongPrime() implementation for generating RSA primes.
(Thanks: Lorenz Quack)
* Support for importing and exporting RSA keys in DER and PEM format.
(Thanks: Legrandin)
* Fix PyCrypto when floor division (python -Qnew) is enabled.
* When building using gcc, use -std=c99 for compilation. This should
fix building on FreeBSD and NetBSD.
2.1.0
=====
* Fix building PyCrypto on Win64 using MS Visual Studio 9.
(Thanks: Nevins Bartolomeo.)
2.1.0beta1
==========
* Modified RSA.generate() to ensure that e is coprime to p-1 and q-1.
Apparently, RSA.generate was capable of generating unusable keys.
2.1.0alpha2
===========
* Modified isPrime() to release the global interpreter lock while
performing computations. (patch from Lorenz Quack)
* Release the GIL while encrypting, decrypting, and hashing (but not
during initialization or finalization).
* API changes:
- Removed RandomPoolCompat and made Crypto.Util.randpool.RandomPool
a wrapper around Crypto.Random that emits a DeprecationWarning.
This is to discourage developers from attempting to provide
backwards compatibility for systems where there are NO strong
entropy sources available.
- Added Crypto.Random.get_random_bytes(). This should allow people
to use something like this if they want backwards-compatibility:
try:
from Crypto.Random import get_random_bytes
except ImportError:
try:
from os import urandom as get_random_bytes
except ImportError:
get_random_bytes = open("/dev/urandom", "rb").read
- Implemented __ne__() on pubkey, which fixes the following broken
behaviour:
>>> pk.publickey() == pk.publickey()
True
>>> pk.publickey() != pk.publickey()
True
(patch from Lorenz Quack)
- Block ciphers created with MODE_CTR can now operate on strings of
any size, rather than just multiples of the underlying cipher's
block size.
- Crypto.Util.Counter objects now raise OverflowError when they wrap
around to zero. You can override this new behaviour by passing
allow_wraparound=True to Counter.new()
2.1.0alpha1
===========
* This version supports Python versions 2.1 through 2.6.
* Clarified copyright status of much of the existing code by tracking
down Andrew M. Kuchling, Barry A. Warsaw, Jeethu Rao, Joris Bontje,
Mark Moraes, Paul Swartz, Robey Pointer, and Wim Lewis and getting
their permission to clarify the license/public-domain status of their
contributions. Many thanks to all involved!
* Replaced the test suite with a new, comprehensive package
(Crypto.SelfTest) that includes documentation about where its test
vectors came from, or how they were derived.
Use "python setup.py test" to run the tests after building.
* API changes:
- Added Crypto.version_info, which from now on will contain version
information in a format similar to Python's sys.version_info.
- Added a new random numbers API (Crypto.Random), and deprecated the
old one (Crypto.Util.randpool.RandomPool), which was misused more
often than not.
The new API is used by invoking Crypto.Random.new() and then just
reading from the file-like object that is returned.
CAVEAT: To maintain the security of the PRNG, you must call
Crypto.Random.atfork() in both the parent and the child processes
whenever you use os.fork(). Otherwise, the parent and child will
share copies of the same entropy pool, causing them to return the
same results! This is a limitation of Python, which does not
provide readily-accessible hooks to os.fork(). It's also a
limitation caused by the failure of operating systems to provide
sufficiently fast, trustworthy sources of cryptographically-strong
random numbers.
- Crypto.PublicKey now raises ValueError/TypeError/RuntimeError
instead of the various custom "error" exceptions
- Removed the IDEA and RC5 modules due to software patents. Debian
has been doing this for a while
- Added Crypto.Random.random, a strong version of the standard Python
'random' module.
- Added Crypto.Util.Counter, providing fast counter implementations
for use with CTR-mode ciphers.
* Bug fixes:
- Fixed padding bug in SHA256; this resulted in bad digests whenever
(the number of bytes hashed) mod 64 == 55.
- Fixed a 32-bit limitation on the length of messages the SHA256 module
could hash.
- AllOrNothing: Fixed padding bug in digest()
- Fixed a bad behaviour of the XOR cipher module: It would silently
truncate all keys to 32 bytes. Now it raises ValueError when the
key is too long.
- DSA: Added code to enforce FIPS 186-2 requirements on the size of
the prime p
- Fixed the winrandom module, which had been omitted from the build
process, causing security problems for programs that misuse RandomPool.
- Fixed infinite loop when attempting to generate RSA keys with an
odd number of bits in the modulus. (Not that you should do that.)
* Clarified the documentation for Crypto.Util.number.getRandomNumber.
Confusingly, this function does NOT return N random bits; It returns
a random N-bit number, i.e. a random number between 2**(N-1) and (2**N)-1.
Note that getRandomNumber is for internal use only and may be
renamed or removed in future releases.
* Replaced RIPEMD.c with a new implementation (RIPEMD160.c) to
alleviate copyright concerns.
* Replaced the DES/DES3 modules with ones based on libtomcrypt-1.16 to
alleviate copyright concerns.
* Replaced Blowfish.c with a new implementation to alleviate copyright
concerns.
* Added a string-XOR implementation written in C (Crypto.Util.strxor)
and used it to speed up Crypto.Hash.HMAC
* Converted documentation to reStructured Text.
* Added epydoc configuration Doc/epydoc-config
* setup.py now emits a warning when building without GMP.
* Added pct-speedtest.py to the source tree for doing performance
testing on the new code.
* Cleaned up the code in several places.
2.0.1
=====
* Fix SHA256 and RIPEMD on AMD64 platform.
* Deleted Demo/ directory.
* Add PublicKey to Crypto.__all__
2.0
===
* Added SHA256 module contributed by Jeethu Rao, with test data
from Taylor Boon.
* Fixed AES.c compilation problems with Borland C.
(Contributed by Jeethu Rao.)
* Fix ZeroDivisionErrors on Windows, caused by the system clock
not having enough resolution.
* Fix 2.1/2.2-incompatible use of (key not in dict),
pointed out by Ian Bicking.
* Fix FutureWarning in Crypto.Util.randpool, noted by James P Rutledge.
1.9alpha6
=========
* Util.number.getPrime() would inadvertently round off the bit
size; if you asked for a 129-bit prime or 135-bit prime, you
got a 128-bit prime.
* Added Util/test/prime_speed.py to measure the speed of prime
generation, and PublicKey/test/rsa_speed.py to measure
the speed of RSA operations.
* Merged the _rsa.c and _dsa.c files into a single accelerator
module, _fastmath.c.
* Speed improvements: Added fast isPrime() function to _fastmath,
cutting the time to generate a 1024-bit prime by a factor of 10.
Optimized the C version of RSA decryption to use a longer series
of operations that's roughly 3x faster than a single
exponentiation. (Contributed by Joris Bontje.)
* Added support to RSA key objects for blinding and unblinding
data. (Contributed by Joris Bontje.)
* Simplified RSA key generation: hard-wired the encryption
exponent to 65537 instead of generating a random prime;
generate prime factors in a loop until the product
is large enough.
* Renamed cansign(), canencrypt(), hasprivate(), to
can_sign, can_encrypt, has_private. If people shriek about
this change very loudly, I'll add aliases for the old method
names that log a warning and call the new method.
1.9alpha5
=========
* Many randpool changes. RandomPool now has a
randomize(N:int) method that can be called to get N
bytes of entropy for the pool (N defaults to 0,
which 'fills up' the pool's entropy) KeyboardRandom
overloads this method.
* Added src/winrand.c for Crypto.Util.winrandom and
now use winrandom for _randomize if possible.
(Calls Windows CryptoAPI CryptGenRandom)
* Several additional places for stirring the pool,
capturing inter-event entropy when reading/writing,
stirring before and after saves.
* RandomPool.add_event now returns the number of
estimated bits of added entropy, rather than the
pool entropy itself (since the pool entropy is
capped at the number of bits in the pool)
* Moved termios code from KeyboardRandomPool into a
KeyboardEntry class, provided a version for Windows
using msvcrt.
* Fix randpool.py crash on machines with poor timer resolution.
(Reported by Mark Moraes and others.)
* If the GNU GMP library is available, two C extensions will be
compiled to speed up RSA and DSA operations. (Contributed by
Paul Swartz.)
* DES3 with a 24-byte key was broken; now fixed.
(Patch by Philippe Frycia.)
1.9alpha4
=========
* Fix compilation problem on Windows.
* HMAC.py fixed to work with pre-2.2 Pythons
* setup.py now dies if built with Python 1.x
1.9alpha3
=========
* Fix a ref-counting bug that caused core dumps.
(Reported by Piers Lauder and an anonymous SF poster.)
1.9alpha2
=========
* (Backwards incompatible) The old Crypto.Hash.HMAC module is
gone, replaced by a copy of hmac.py from Python 2.2's standard
library. It will display a warning on interpreter versions
older than 2.2.
* (Backwards incompatible) Restored the Crypto.Protocol package,
and modernized and tidied up the two modules in it,
AllOrNothing.py and Chaffing.py, renaming various methods
and changing the interface.
* (Backwards incompatible) Changed the function names in
Crypto.Util.RFC1751.
* Restored the Crypto.PublicKey package at user request. I
think I'll leave it in the package and warn about it in the
documentation. I hope that eventually I can point to
someone else's better public-key code, and at that point I
may insert warnings and begin the process of deprecating
this code.
* Fix use of a Python 2.2 C function, replacing it with a
2.1-compatible equivalent. (Bug report and patch by Andrew
Eland.)
* Fix endianness bugs that caused test case failures on Sparc,
PPC, and doubtless other platforms.
* Fixed compilation problem on FreeBSD and MacOS X.
* Expanded the test suite (requires Sancho, from
http://www.mems-exchange.org/software/sancho/)
* Added lots of docstrings, so 'pydoc Crypto' now produces
helpful output. (Open question: maybe *all* of the documentation
should be moved into docstrings?)
* Make test.py automatically add the build/* directory to sys.path.
* Removed 'inline' declaration from C functions. Some compilers
don't support it, and Python's pyconfig.h no longer tells you whether
it's supported or not. After this change, some ciphers got slower,
but others got faster.
* The C-level API has been changed to reduce the amount of
memory-to-memory copying. This makes the code neater, but
had ambiguous performance effects; again, some ciphers got slower
and others became faster. Probably this is due to my compiler
optimizing slightly worse or better as a result.
* Moved C source implementations into src/ from block/, hash/,
and stream/. Having Hash/ and hash/ directories causes problems
on case-insensitive filesystems such as Mac OS.
* Cleaned up the C code for the extensions.
1.9alpha1
=========
* Added Crypto.Cipher.AES.
* Added the CTR mode and the variable-sized CFB mode from the
NIST standard on feedback modes.
* Removed Diamond, HAVAL, MD5, Sapphire, SHA, and Skipjack. MD5
and SHA are included with Python; the others are all of marginal
usefulness in the real world.
* Renamed the module-level constants ECB, CFB, &c., to MODE_ECB,
MODE_CFB, as part of making the block encryption modules
compliant with PEP 272. (I'm not sure about this change;
if enough users complain about it, I might back it out.)
* Made the hashing modules compliant with PEP 247 (not backward
compatible -- the major changes are that the constructor is now
MD2.new and not MD2.MD2, and the size of the digest is now
given as 'digest_size', not 'digestsize'.
* The Crypto.PublicKey package is no longer installed; the
interfaces are all wrong, and I have no idea what the right
interfaces should be.
1.1alpha2
=========
* Most importantly, the distribution has been broken into two
parts: exportable, and export-controlled. The exportable part
contains all the hashing algorithms, signature-only public key
algorithms, chaffing & winnowing, random number generation, various
utility modules, and the documentation.
The export-controlled part contains public-key encryption
algorithms such as RSA and ElGamal, and bulk encryption algorithms
like DES, IDEA, or Skipjack. Getting this code still requires that
you go through an access control CGI script, and denies you access if
you're outside the US or Canada.
* Added the RIPEMD hashing algorithm. (Contributed by
Hirendra Hindocha.)
* Implemented the recently declassified Skipjack block
encryption algorithm. My implementation runs at 864 K/sec on a
PII/266, which isn't particularly fast, but you're probably better off
using another algorithm anyway. :)
* A simple XOR cipher has been added, mostly for use by the
chaffing/winnowing code. (Contributed by Barry Warsaw.)
* Added Protocol.Chaffing and Hash.HMAC.py. (Contributed by
Barry Warsaw.)
Protocol.Chaffing implements chaffing and winnowing, recently
proposed by R. Rivest, which hides a message (the wheat) by adding
many noise messages to it (the chaff). The chaff can be discarded by
the receiver through a message authentication code. The neat thing
about this is that it allows secret communication without actually
having an encryption algorithm, and therefore this falls within the
exportable subset.
* Tidied up randpool.py, and removed its use of a block
cipher; this makes it work with only the export-controlled subset
available.
* Various renamings and reorganizations, mostly internal.
1.0.2
=====
* Changed files to work with Python 1.5; everything has been
re-arranged into a hierarchical package. (Not backward compatible.)
The package organization is:
Crypto.
Hash.
MD2, MD4, MD5, SHA, HAVAL
Cipher.
ARC2, ARC4, Blowfish, CAST, DES, DES3, Diamond,
IDEA, RC5, Sapphire
PublicKey.
DSA, ElGamal, qNEW, RSA
Util.
number, randpool, RFC1751
Since this is backward-incompatible anyway, I also changed
module names from all lower-case to mixed-case: diamond -> Diamond,
rc5 -> RC5, etc. That had been an annoying inconsistency for a while.
* Added CAST5 module contributed by <wiml@hhhh.org>.
* Added qNEW digital signature algorithm (from the digisign.py
I advertised a while back). (If anyone would like to suggest new
algorithms that should be implemented, please do; I think I've got
everything that's really useful at the moment, but...)
* Support for keyword arguments has been added. This allowed
removing the obnoxious key handling for Diamond and RC5, where the
first few bytes of the key indicated the number of rounds to use, and
various other parameters. Now you need only do something like:
from Crypto.Cipher import RC5
obj = RC5.new(key, RC5.ECB, rounds=8)
(Not backward compatible.)
* Various function names have been changed, and parameter
names altered. None of these were part of the public interface, so it
shouldn't really matter much.
* Various bugs fixed, the test suite has been expanded, and
the build process simplified.
* Updated the documentation accordingly.
1.0.1
=====
* Changed files to work with Python 1.4 .
* The DES and DES3 modules now automatically correct the
parity of their keys.
* Added R. Rivest's DES test (see http://theory.lcs.mit.edu/~rivest/destest.txt)
1.0.0
=====
* REDOC III succumbed to differential cryptanalysis, and has
been removed.
* The crypt and rotor modules have been dropped; they're still
available in the standard Python distribution.
* The Ultra-Fast crypt() module has been placed in a separate
distribution.
* Various bugs fixed.
================================================
FILE: Doc/AEAD_API.txt
================================================
AEAD (Authenticated Encryption with Associated Data) modes of operations
for symmetric block ciphers provide authentication and integrity in addition
to confidentiality.
Traditional modes like CBC or CTR only guarantee confidentiality; one
has to combine them with cryptographic MACs in order to have assurance of
authenticity. It is not trivial to implement such generic composition
without introducing subtle security flaws.
AEAD modes are designed to be more secure and often more efficient than
ad-hoc constructions. Widespread AEAD modes are GCM, CCM, EAX, SIV, OCB.
Most AEAD modes allow to optionally authenticate the plaintext with some
piece of arbitrary data that will not be encrypted, for instance a
packet header.
In this file, that is called "associated data" (AD) even though terminology
may vary from mode to mode.
The term "MAC" is used to indicate the authentication tag generated as part
of the encryption process. The MAC is consumed by the receiver to tell
whether the message has been tampered with.
=== Goals of the AEAD API
1. Any piece of data (AD, ciphertext, plaintext, MAC) is passed only once.
2. It is possible to encrypt/decrypt huge files withe little memory cost.
To this end, authentication, encryption, and decryption are always
incremental. That is, the caller may split data in any way, and the end
result does not depend on how splitting is done.
Data is processed immediately without being internally buffered.
3. API is similar to a Crypto.Hash MAC object, to the point that when only
AD is present, the object behaves exactly like a MAC.
4. API is similar to a classic cipher object, to the point that when no AD is present,
the object behaves exactly like a classic cipher mode (e.g. CBC).
5. MACs are produced and handled separately from ciphertext/plaintext.
6. The API is intuitive and hard to misuse. Exceptions are raised immediately
in case of misuse.
7. Caller does not have to add or remove padding.
The following state diagram shows the proposed API for AEAD modes.
In general, it is applicable to all block ciphers in the Crypto.Cipher
module, even though certain modes may put restrictions on certain
cipher properties (e.g. block size).
.--------.
| START |
'--------'
|
| .new(key, mode, iv, ...)
v
.-------------.
.-------------.-------------| INITIALIZED |---------------+-------------.
| | '-------------' | |
| | | | |
| |.encrypt() |.update() |.decrypt() |
| | | | |
| | v | |
| | .--------------.___ .update() | |
| | | CLEAR HEADER |<--' | |
| | '--------------' | |
| | | | | | | |
| | .encrypt()| | | |.decrypt() | |
| v | | | | v |
| .--------------. | | | | .--------------. |
| | ENCRYPTING |<----' | | '---->| DECRYPTING | |
| '--------------' | | '--------------' |
| | ^ | | | | ^ | |
| hex/digest()| | |.encrypt()* | | | | |.decrypt()* |
| | ''' | | | ''' |
| | / \ | |
| | hex/digest()/ \hex/verify()|hex/verify() |
|hex/digest() | / \ | |
| | / \ | hex/verify()|
| v / \ v |
| .--------------. / \ .--------------. |
'------->| FINISHED/ENC |<-- -->| FINISHED/DEC |<---------'
'--------------' '--------------'
^ | ^ |
| |hex/digest() | |hex/verify()
''' '''
[*] this transition is not always allowed for non-online or 2-pass modes
The following states are defined:
- INITIALIZED. The cipher has been instantiated with a key, possibly
a nonce (or IV), and other parameters.
The cipher object may be used for encryption or decryption.
- CLEAR HEADER. The cipher is authenticating the associated data.
- ENCRYPTING. It has been decided that the cipher has to be used for
encrypting data. At least one piece of ciphertext has been produced.
- DECRYPTING. It has been decided that the cipher has to be used for
decrypting data. At least one piece of candidate plaintext has
been produced.
- FINISHED/ENC. Authenticated encryption has completed.
The final MAC has been produced.
- FINISHED/DEC. Authenticated decryption has completed.
It is now established if the associated data together the plaintext
are authentic.
In addition to the existing Cipher methods new(), encrypt() and decrypt(),
5 new methods are added to a Cipher object:
- update() to consume all associated data. It takes as input
a byte string, and it can be invoked multiple times.
Ciphertext / plaintext must not be passed to update().
For simplicity, update() can only be called before encryption
or decryption starts. If no associated data is used, update()
is not called.
- digest() to output the binary MAC. It can only be called at the end
of the encryption.
- hexdigest() as digest(), but the output is ASCII hexadecimal.
- verify() to evaluate if the binary MAC is correct. It can only be
called at the end of decryption. It takes the MAC as input.
- hexverify() as verify(), but the input is ASCII hexadecimal.
The syntax of update(), digest(), and hexdigest() are consistent with
the API of a Hash object.
IMPORTANT: method copy() is not present. Since most AEAD modes require
IV/nonce to never repeat, this method may be misused and lead to security
holes.
Since MAC validation (decryption mode) is subject to timing attacks,
the (hex)verify() method internally performs comparison of received
and computed MACs using time-independent code.
A ValueError exception is issued if the MAC does not match.
=== Padding
The proposed API only supports AEAD modes that do not require padding
of the plaintext. Adding support for that would make the API more complex
(for instance, an external "finished" flag to pass encrypt()).
=== Pre-processing of associated data
The proposed API does not support pre-processing of AD.
Sometimes, a lot of encryptions/decryptions are performed with
the same key and the same AD, and different nonces and plaintext.
Certain modes like GCM allow to cache processing of AD, and reuse
it such results across several encryptions/decryptions.
=== Singe/2-pass modes and online/non-online modes
The proposed API supports single-pass, online AEAD modes.
A "single-pass" mode processes each block of AD or data only once.
Compare that to "2-pass" modes, where each block of data (not AD)
is processed twice: once for authentication and once for enciphering.
An "online" mode does not need to know the size of the message before
encryption starts. As a consequence:
- memory usage doesn't depend on the plaintext/ciphertext size.
- when encrypting, partial ciphertexts can be immediately sent to the receiver.
- when decrypting, partial (unauthenticated) plaintexts can be obtained from
the cipher.
Most single-pass modes are patented, and only the less efficient 2-pass modes
are in widespread use.
That is still OK, provided that encryption can start *before* authentication is
completed. If that's the case (e.g. GCM, EAX) encrypt()/decrypt() will also
take care of completing the authentication over the plaintext.
A similar problem arises with non-online modes (e.g. CCM): they have to wait to see
the end of the plaintext before encryption can start. The only way to achieve
that is to only allow encrypt()/decrypt() to be called once.
To summarize:
Single-pass and online:
Fully supported by the API. The mode is most likely patented.
Single-pass and not-online:
encrypt()/decrypt() can only be called once. The mode is most likely patented.
2-pass and online:
Fully supported by the API, but only if encryption or decryption can start
*before* authentication is finished.
2-pass and not-online:
Fully supported by the API, but only if encryption or decryption can start
*before* authentication is finished. encrypt()/decrypt() can only be called once.
=== Associated Data
Depending on the mode, the associated data AD can be defined as:
1. a single binary string or
2. a vector of binary strings
For modes of the 1st type (e.g. CCM), the API allows the AD to be split
in any number of segments, and fed to update() in multiple calls.
The resulting AD does not depend on how splitting is performed.
It is responsability of the caller to ensure that concatenation of strings
is secure. For instance, there is no difference between:
c.update(b"builtin")
c.update(b"securely")
and:
c.update(b"built")
c.update(b"insecurely")
For modes of the 2nd type (e.g. SIV), the API assumes that each call
to update() ingests one full item of the vector. The two examples above
are now different.
=== MAC
During encryption, the MAC is computed and returned by digest().
During decryption, the received MAC is passed as a parameter to verify()
at the very end.
=== CCM mode
Number of keys required: 1
Compatible with ciphers: AES (may be used with others if block length
is 128 bits)
Counter/IV/nonce: 1 nonce required (length 8..13 bytes)
Single-pass: no
Online: no
Encryption can start before
authentication is complete: yes
Term for AD: "associate data" (NIST) or "additional
authenticated data" (RFC)
Term for MAC: part of ciphertext (NIST) or
"encrypted authentication value" (RFC).
Padding required: no
Pre-processing of AD: not possible
In order to allow encrypt()/decrypt() to be called multiple times,
and to reduce the memory usage, the new() method of the Cipher module
optionally accepts the following parameters:
- 'assoc_len', the total length (in bytes) of the AD
- 'msg_len', the total length (in bytes) of the plaintext or ciphertext
=== GCM mode
Number of keys required: 1
Compatible with ciphers: AES (may be used with others if block length
is 128 bits)
Counter/IV/nonce: 1 IV required (any length)
Single-pass: no
Online: yes
Encryption can start before
authentication is complete: yes
Term for AD: "additional authenticated data"
Term for MAC: "authentication tag" or "tag"
Padding required: no
Pre-processing of AD: possible
=== EAX mode
Number of keys required: 1
Compatible with ciphers: any
Counter/IV/nonce: 1 IV required (any length)
Single-pass: no
Online: yes
Encryption can start before
authentication is complete: yes
Term for AD: "header"
Term for MAC: "tag"
Padding required: no
Pre-processing of AD: possible
=== SIV
Number of keys required: 2
Compatible with ciphers: AES
Counter/IV/nonce: 1 IV required (any length)
Single-pass: no
Online: no
Encryption can start before
authentication is complete: no
Term for AD: "associated data" (vector)
Term for MAC: "tag"
Padding required: no
Pre-processing of AD: possible
AD is a vector of strings. One item in the vector is the (optional) IV.
One property of SIV is that encryption or decryption can only start
as soon as the MAC is available.
That is not a problem for encryption: since encrypt() can only be called
once, it can internally compute the MAC first, perform the encryption,
and return the ciphertext. The MAC is cached for the subsequent call to digest().
The major problem is decryption: decrypt() cannot produce any output because
the MAC is meant to be passed to verify() only later.
To overcome this limitation, decrypt() *exceptionally* accepts the ciphertext
concatenated to the MAC. The MAC check is still performed with verify().
================================================
FILE: Doc/epydoc-config
================================================
# epydoc configuration file for PyCrypto.
# See http://epydoc.sourceforge.net/configfile.html for sample configuration.
[epydoc]
modules: Crypto
docformat: restructuredtext
output: html
target: Doc/apidoc/
sourcecode: no
# Do not include private variables
private: no
# Include the complete set of inherited methods, but grouped in a special
# section
inheritance: grouped
name: PyCrypto API Documentation
url: http://www.pycrypto.org/
link: <a href="http://www.pycrypto.org/">PyCrypto.org</a>
# The documentation is usually built on a Linux machine; nt.py tries to
# import the winrandom module.
exclude-introspect: ^Crypto\.Random\.OSRNG\.nt|Crypto\.Util\.winrandom|Crypto\.Util\.osentropy\.nt$
exclude: ^Crypto\.SelfTest
================================================
FILE: Doc/pycrypt.rst
================================================
====================================
Python Cryptography Toolkit
====================================
**Version 2.7a1**
The Python Cryptography Toolkit describes a package containing various
cryptographic modules for the Python programming language. This
documentation assumes you have some basic knowledge about the Python
language, but not necessarily about cryptography.
.. contents::
Introduction
-------------------
Design Goals
===================
The Python cryptography toolkit is intended to provide a reliable and
stable base for writing Python programs that require cryptographic
functions.
A central goal has been to provide a simple, consistent interface for
similar classes of algorithms. For example, all block cipher objects
have the same methods and return values, and support the same feedback
modes. Hash functions have a different interface, but it too is
consistent over all the hash functions available. Some of these
interfaces have been codified as Python Enhancement Proposal
documents, as PEP 247, "API for Cryptographic Hash Functions", and
PEP 272, "API for Block Encryption Algorithms".
This is intended to make it easy to replace old algorithms with newer,
more secure ones. If you're given a bit of portably-written Python
code that uses the DES encryption algorithm, you should be able to use
AES instead by simply changing ``from Crypto.Cipher import DES`` to
``from Crypto.Cipher import AES``, and changing all references to
``DES.new()`` to ``AES.new()``. It's also fairly simple to
write your own modules that mimic this interface, thus letting you use
combinations or permutations of algorithms.
Some modules are implemented in C for performance; others are written
in Python for ease of modification. Generally, low-level functions
like ciphers and hash functions are written in C, while less
speed-critical functions have been written in Python. This division
may change in future releases. When speeds are quoted in this
document, they were measured on a 500 MHz Pentium II running Linux.
The exact speeds will obviously vary with different machines,
different compilers, and the phase of the moon, but they provide a
crude basis for comparison. Currently the cryptographic
implementations are acceptably fast, but not spectacularly good. I
welcome any suggestions or patches for faster code.
I have placed the code under no restrictions; you can redistribute the
code freely or commercially, in its original form or with any
modifications you make, subject to whatever local laws may apply in your
jurisdiction. Note that you still have to come to some agreement with
the holders of any patented algorithms you're using. If you're
intensively using these modules, please tell me about it; there's little
incentive for me to work on this package if I don't know of anyone using
it.
I also make no guarantees as to the usefulness, correctness, or legality
of these modules, nor does their inclusion constitute an endorsement of
their effectiveness. Many cryptographic algorithms are patented;
inclusion in this package does not necessarily mean you are allowed to
incorporate them in a product and sell it. Some of these algorithms may
have been cryptanalyzed, and may no longer be secure. While I will
include commentary on the relative security of the algorithms in the
sections entitled "Security Notes", there may be more recent analyses
I'm not aware of. (Or maybe I'm just clueless.) If you're implementing
an important system, don't just grab things out of a toolbox and put
them together; do some research first. On the other hand, if you're
just interested in keeping your co-workers or your relatives out of your
files, any of the components here could be used.
This document is very much a work in progress. If you have any
questions, comments, complaints, or suggestions, please send them to me.
Acknowledgements
==================================================
Much of the code that actually implements the various cryptographic
algorithms was not written by me. I'd like to thank all the people who
implemented them, and released their work under terms which allowed me
to use their code. These individuals are credited in the relevant
chapters of this documentation. Bruce Schneier's book
:title-reference:`Applied Cryptography` was also very useful in writing this toolkit; I highly
recommend it if you're interested in learning more about cryptography.
Good luck with your cryptography hacking!
Crypto.Hash: Hash Functions
--------------------------------------------------
Hash functions take arbitrary strings as input, and produce an output
of fixed size that is dependent on the input; it should never be
possible to derive the input data given only the hash function's
output. One simple hash function consists of simply adding together
all the bytes of the input, and taking the result modulo 256. For a
hash function to be cryptographically secure, it must be very
difficult to find two messages with the same hash value, or to find a
message with a given hash value. The simple additive hash function
fails this criterion miserably and the hash functions described below
meet this criterion (as far as we know). Examples of
cryptographically secure hash functions include MD2, MD5, and SHA1.
Hash functions can be used simply as a checksum, or, in association with a
public-key algorithm, can be used to implement digital signatures.
The hashing algorithms currently implemented are:
============= ============= ========
Hash function Digest length Security
============= ============= ========
MD2 128 bits Insecure, do not use
MD4 128 bits Insecure, do not use
MD5 128 bits Insecure, do not use
RIPEMD160 160 bits Secure.
SHA1 160 bits SHA1 is shaky. Walk, do not run, away from SHA1.
SHA256 256 bits Secure.
============= ============= ========
Resources:
On SHA1 (in)security: http://www.schneier.com/blog/archives/2005/02/cryptanalysis_o.html
SHA1 phase-out by 2010: http://csrc.nist.gov/groups/ST/toolkit/documents/shs/hash_standards_comments.pdf
On MD5 insecurity: http://www.schneier.com/blog/archives/2008/12/forging_ssl_cer.html
Crypto.Hash.HMAC implements the RFC-2104 HMAC algorithm. The HMAC module is
a copy of Python 2.2's module, and works on Python 2.1 as well.
HMAC's security depends on the cryptographic strength of the key handed to it,
and on the underlying hashing method used. HMAC-MD5 and HMAC-SHA1 are used in
IPSEC and TLS.
All hashing modules with the exception of HMAC share the same interface.
After importing a given hashing module, call the ``new()`` function to create
a new hashing object. You can now feed arbitrary strings into the object
with the ``update()`` method, and can ask for the hash value at
any time by calling the ``digest()`` or ``hexdigest()``
methods. The ``new()`` function can also be passed an optional
string parameter that will be immediately hashed into the object's
state.
To create a HMAC object, call HMAC's ```new()`` function with the key (as
a string or bytes object) to be used, an optional message, and the hash
function to use. HMAC defaults to using MD5. This is not a secure default,
please use SHA256 or better instead in new implementations.
Hash function modules define one variable:
**digest_size**:
An integer value; the size of the digest
produced by the hashing objects. You could also obtain this value by
creating a sample object, and taking the length of the digest string
it returns, but using ``digest_size`` is faster.
The methods for hashing objects are always the following:
**copy()**:
Return a separate copy of this hashing object. An ``update`` to
this copy won't affect the original object.
**digest()**:
Return the hash value of this hashing object, as a string containing
8-bit data. The object is not altered in any way by this function;
you can continue updating the object after calling this function.
Python 3.x: digest() returns a bytes object
**hexdigest()**:
Return the hash value of this hashing object, as a string containing
the digest data as hexadecimal digits. The resulting string will be
twice as long as that returned by ``digest()``. The object is not
altered in any way by this function; you can continue updating the
object after calling this function.
**update(arg)**:
Update this hashing object with the string ``arg``.
Python 3.x: The passed argument must be an object interpretable as
a buffer of bytes
Here's an example, using the SHA-256 algorithm:
>>> from Crypto.Hash import SHA256
>>> m = SHA256.new()
>>> m.update('abc')
>>> m.digest()
'\xbax\x16\xbf\x8f\x01\xcf\xeaAA@\xde]\xae"#\xb0\x03a\xa3\x96\x17z\x9c\xb4\x10\xffa\xf2\x00\x15\xad'
>>> m.hexdigest()
'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad'
Here's an example of using HMAC:
>>> from Crypto.Hash import HMAC, SHA256
>>> m = HMAC.new('Please do not use this key in your code, with sugar on top',
'', SHA256)
>>> m.update('abc')
>>> m.digest()
'F\xaa\x83\t\x97<\x8c\x12\xff\xe8l\xca:\x1d\xb4\xfc7\xfa\x84tK-\xb0\x00v*\xc2\x90\x19\xaa\xfaz'
>>> m.hexdigest()
'46aa8309973c8c12ffe86cca3a1db4fc37fa84744b2db000762ac29019aafa7a'
Security Notes
==========================
Hashing algorithms are broken by developing an algorithm to compute a
string that produces a given hash value, or to find two messages that
produce the same hash value. Consider an example where Alice and Bob
are using digital signatures to sign a contract. Alice computes the
hash value of the text of the contract and signs the hash value with
her private key. Bob could then compute a different contract that has
the same hash value, and it would appear that Alice signed that bogus
contract; she'd have no way to prove otherwise. Finding such a
message by brute force takes ``pow(2, b-1)`` operations, where the
hash function produces *b*-bit hashes.
If Bob can only find two messages with the same hash value but can't
choose the resulting hash value, he can look for two messages with
different meanings, such as "I will mow Bob's lawn for $10" and "I owe
Bob $1,000,000", and ask Alice to sign the first, innocuous contract.
This attack is easier for Bob, since finding two such messages by brute
force will take ``pow(2, b/2)`` operations on average. However,
Alice can protect herself by changing the protocol; she can simply
append a random string to the contract before hashing and signing it;
the random string can then be kept with the signature.
Some of the algorithms implemented here have been completely broken.
The MD2, MD4 and MD5 hash functions are widely considered insecure
hash functions, as it has been proven that meaningful hash collisions
can be generated for them, in the case of MD4 and MD5 in mere seconds.
MD2 is rather slow at 1250 K/sec. MD4 is faster at 44,500 K/sec.
MD5 is a strengthened version of MD4 with four rounds; beginning in 2004,
a series of attacks were discovered and it's now possible to create pairs
of files that result in the same MD5 hash. The MD5
implementation is moderately well-optimized and thus faster on x86
processors, running at 35,500 K/sec. MD5 may even be faster than MD4,
depending on the processor and compiler you use.
MD5 is still supported for compatibility with existing protocols, but
implementors should use SHA256 in new software because there are no known
attacks against SHA256.
All the MD* algorithms produce 128-bit hashes.
SHA1 produces a 160-bit hash. Because of recent theoretical attacks against SHA1,
NIST recommended phasing out use of SHA1 by 2010.
SHA256 produces a larger 256-bit hash, and there are no known attacks against it.
It operates at 10,500 K/sec.
RIPEMD has a 160-bit output, the same output size as SHA1, and operates at 17,600
K/sec.
Credits
===============
The MD2 and MD4 implementations were written by A.M. Kuchling, and the MD5
code was implemented by Colin Plumb. The SHA1 code was originally written by
Peter Gutmann. The RIPEMD160 code as of version 2.1.0 was written by Darsey
Litzenberger. The SHA256 code was written by Tom St. Denis and is part of the
LibTomCrypt library (http://www.libtomcrypt.org/); it was adapted for the
toolkit by Jeethu Rao and Taylor Boon.
Crypto.Cipher: Encryption Algorithms
--------------------------------------------------
Encryption algorithms transform their input data, or **plaintext**,
in some way that is dependent on a variable **key**, producing
**ciphertext**. This transformation can easily be reversed, if (and,
hopefully, only if) one knows the key. The key can be varied by the
user or application and chosen from some very large space of possible
keys.
For a secure encryption algorithm, it should be very difficult to
determine the original plaintext without knowing the key; usually, no
clever attacks on the algorithm are known, so the only way of breaking
the algorithm is to try all possible keys. Since the number of possible
keys is usually of the order of 2 to the power of 56 or 128, this is not
a serious threat, although 2 to the power of 56 is now considered
insecure in the face of custom-built parallel computers and distributed
key guessing efforts.
**Block ciphers** take multibyte inputs of a fixed size
(frequently 8 or 16 bytes long) and encrypt them. Block ciphers can
be operated in various modes. The simplest is Electronic Code Book
(or ECB) mode. In this mode, each block of plaintext is simply
encrypted to produce the ciphertext. This mode can be dangerous,
because many files will contain patterns greater than the block size;
for example, the comments in a C program may contain long strings of
asterisks intended to form a box. All these identical blocks will
encrypt to identical ciphertext; an adversary may be able to use this
structure to obtain some information about the text.
To eliminate this weakness, there are various feedback modes in which
the plaintext is combined with the previous ciphertext before
encrypting; this eliminates any repetitive structure in the
ciphertext.
One mode is Cipher Block Chaining (CBC mode); another is Cipher
FeedBack (CFB mode). CBC mode still encrypts in blocks, and thus is
only slightly slower than ECB mode. CFB mode encrypts on a
byte-by-byte basis, and is much slower than either of the other two
modes. The chaining feedback modes require an initialization value to
start off the encryption; this is a string of the same length as the
ciphering algorithm's block size, and is passed to the ``new()``
function.
The currently available block ciphers are listed in the following table,
and are in the ``Crypto.Cipher`` package:
================= ============================
Cipher Key Size/Block Size
================= ============================
AES 16, 24, or 32 bytes/16 bytes
ARC2 Variable/8 bytes
Blowfish Variable/8 bytes
CAST Variable/8 bytes
DES 8 bytes/8 bytes
DES3 (Triple DES) 16 bytes/8 bytes
================= ============================
In a strict formal sense, **stream ciphers** encrypt data bit-by-bit;
practically, stream ciphers work on a character-by-character basis.
Stream ciphers use exactly the same interface as block ciphers, with a block
length that will always be 1; this is how block and stream ciphers can be
distinguished.
The only feedback mode available for stream ciphers is ECB mode.
The currently available stream ciphers are listed in the following table:
======= =========
Cipher Key Size
======= =========
ARC4 Variable
XOR Variable
======= =========
ARC4 is short for "Alleged RC4". In September of 1994, someone posted
C code to both the Cypherpunks mailing list and to the Usenet
newsgroup ``sci.crypt``, claiming that it implemented the RC4
algorithm. This claim turned out to be correct. Note that there's a
damaging class of weak RC4 keys; this module won't warn you about such keys.
.. % XXX are there other analyses of RC4?
A similar anonymous posting was made for Alleged RC2 in January, 1996.
An example usage of the DES module:
>>> from Crypto.Cipher import DES
>>> obj=DES.new('abcdefgh', DES.MODE_ECB)
>>> plain="Guido van Rossum is a space alien."
>>> len(plain)
34
>>> obj.encrypt(plain)
Traceback (innermost last):
File "<stdin>", line 1, in ?
ValueError: Strings for DES must be a multiple of 8 in length
>>> ciph=obj.encrypt(plain+'XXXXXX')
>>> ciph
'\021,\343Nq\214DY\337T\342pA\372\255\311s\210\363,\300j\330\250\312\347\342I\3215w\03561\303dgb/\006'
>>> obj.decrypt(ciph)
'Guido van Rossum is a space alien.XXXXXX'
All cipher algorithms share a common interface. After importing a
given module, there is exactly one function and two variables
available.
**new(key, mode[, IV])**:
Returns a ciphering object, using ``key`` and feedback mode
``mode``.
If ``mode`` is ``MODE_CBC`` or ``MODE_CFB``, ``IV`` must be provided,
and must be a string of the same length as the block size.
Some algorithms support additional keyword arguments to this function; see
the "Algorithm-specific Notes for Encryption Algorithms" section below for the details.
Python 3.x: ```mode`` is a string object; ```key``` and ```IV``` must be
objects interpretable as a buffer of bytes.
**block_size**:
An integer value; the size of the blocks encrypted by this module.
Strings passed to the ``encrypt`` and ``decrypt`` functions
must be a multiple of this length. For stream ciphers,
``block_size`` will be 1.
**key_size**:
An integer value; the size of the keys required by this module. If
``key_size`` is zero, then the algorithm accepts arbitrary-length
keys. You cannot pass a key of length 0 (that is, the null string
``""`` as such a variable-length key.
All cipher objects have at least three attributes:
**block_size**:
An integer value equal to the size of the blocks encrypted by this object.
Identical to the module variable of the same name.
**IV**:
Contains the initial value which will be used to start a cipher
feedback mode. After encrypting or decrypting a string, this value
will reflect the modified feedback text; it will always be one block
in length. It is read-only, and cannot be assigned a new value.
Python 3.x: ```IV``` is a bytes object.
**key_size**:
An integer value equal to the size of the keys used by this object. If
``key_size`` is zero, then the algorithm accepts arbitrary-length
keys. For algorithms that support variable length keys, this will be 0.
Identical to the module variable of the same name.
All ciphering objects have the following methods:
**decrypt(string)**:
Decrypts ``string``, using the key-dependent data in the object, and
with the appropriate feedback mode. The string's length must be an exact
multiple of the algorithm's block size. Returns a string containing
the plaintext.
Python 3.x: decrypt() will return a bytes object.
Note: Do not use the same cipher object for both encryption an
decryption, since both operations share the same IV buffer, so the results
will probably not be what you expect.
**encrypt(string)**:
Encrypts a non-null ``string``, using the key-dependent data in the
object, and with the appropriate feedback mode. The string's length
must be an exact multiple of the algorithm's block size; for stream
ciphers, the string can be of any length. Returns a string containing
the ciphertext.
Python 3.x: ```string``` must be an object interpretable as a buffer of bytes.
encrypt() will return a bytes object.
Note: Do not use the same cipher object for both encryption an
decryption, since both operations share the same IV buffer, so the results
will probably not be what you expect.
Security Notes
=======================
Encryption algorithms can be broken in several ways. If you have some
ciphertext and know (or can guess) the corresponding plaintext, you can
simply try every possible key in a **known-plaintext** attack. Or, it
might be possible to encrypt text of your choice using an unknown key;
for example, you might mail someone a message intending it to be
encrypted and forwarded to someone else. This is a
**chosen-plaintext** attack, which is particularly effective if it's
possible to choose plaintexts that reveal something about the key when
encrypted.
Stream ciphers are only secure if any given key is never used twice.
If two (or more) messages are encrypted using the same key in a stream
cipher, the cipher can be broken fairly easily.
DES (5100 K/sec) has a 56-bit key; this is starting to become too small
for safety. It has been shown in 2009 that a ~$10,000 machine can break
DES in under a day on average. NIST has withdrawn FIPS 46-3 in 2005.
DES3 (1830 K/sec) uses three DES encryptions for greater security and a 112-bit
or 168-bit key, but is correspondingly slower. Attacks against DES3 are
not currently feasible, and it has been estimated to be useful until 2030.
Bruce Schneier endorses DES3 for its security because of the decades of
study applied against it. It is, however, slow.
There are no known attacks against Blowfish (9250 K/sec) or CAST (2960 K/sec),
but they're all relatively new algorithms and there hasn't been time for much
analysis to be performed; use them for serious applications only after careful
research.
pycrypto implements CAST with up to 128 bits key length (CAST-128). This
algorithm is considered obsoleted by CAST-256. CAST is patented by Entrust
Technologies and free for non-commercial use.
Bruce Schneier recommends his newer Twofish algorithm over Blowfish where
a fast, secure symmetric cipher is desired. Twofish was an AES candidate. It
is slightly slower than Rijndael (the chosen algorithm for AES) for 128-bit
keys, and slightly faster for 256-bit keys.
AES, the Advanced Encryption Standard, was chosen by the US National
Institute of Standards and Technology from among 6 competitors, and is
probably your best choice. It runs at 7060 K/sec, so it's among the
faster algorithms around.
ARC4 ("Alleged" RC4) (8830 K/sec) has been weakened. Specifically, it has been
shown that the first few bytes of the ARC4 keystream are strongly non-random,
leaking information about the key. When the long-term key and nonce are merely
concatenated to form the ARC4 key, such as is done in WEP, this weakness can be
used to discover the long-term key by observing a large number of messages
encrypted with this key.
Because of these possible related-key attacks, ARC4 should only be used with
keys generated by a strong RNG, or from a source of sufficiently uncorrelated
bits, such as the output of a hash function.
A further possible defense is to discard the initial portion of the keystream.
This altered algorithm is called RC4-drop(n).
While ARC4 is in wide-spread use in several protocols, its use in new protocols
or applications is discouraged.
ARC2 ("Alleged" RC2) is vulnerable to a related-key attack, 2^34 chosen
plaintexts are needed.
Because of these possible related-key attacks, ARC2 should only be used with
keys generated by a strong RNG, or from a source of sufficiently uncorrelated
bits, such as the output of a hash function.
Credits
=============
The code for Blowfish was written from scratch by Darsey Litzenberger, based
on a specification by Bruce Schneier, who also invented the algorithm; the
Blowfish algorithm has been placed in the public domain and can be used
freely. (See http://www.schneier.com/paper-blowfish-fse.html for more
information about Blowfish.) The CAST implementation was written by Wim Lewis.
The DES implementation uses libtomcrypt, which was written by Tom St Denis.
The Alleged RC4 code was posted to the ``sci.crypt`` newsgroup by an
unknown party, and re-implemented by A.M. Kuchling.
Crypto.Protocol: Various Protocols
--------------------------------------------------
Crypto.Protocol.AllOrNothing
==========================================
This module implements all-or-nothing package transformations.
An all-or-nothing package transformation is one in which some text is
transformed into message blocks, such that all blocks must be obtained before
the reverse transformation can be applied. Thus, if any blocks are corrupted
or lost, the original message cannot be reproduced.
An all-or-nothing package transformation is not encryption, although a block
cipher algorithm is used. The encryption key is randomly generated and is
extractable from the message blocks.
**AllOrNothing(ciphermodule, mode=None, IV=None)**:
Class implementing the All-or-Nothing package transform.
``ciphermodule`` is a module implementing the cipher algorithm to
use. Optional arguments ``mode`` and ``IV`` are passed directly
through to the ``ciphermodule.new()`` method; they are the
feedback mode and initialization vector to use. All three arguments
must be the same for the object used to create the digest, and to
undigest'ify the message blocks.
The module passed as ``ciphermodule`` must provide the PEP 272
interface. An encryption key is randomly generated automatically when
needed.
The methods of the ``AllOrNothing`` class are:
**digest(text)**:
Perform the All-or-Nothing package transform on the
string ``text``. Output is a list of message blocks describing the
transformed text, where each block is a string of bit length equal
to the cipher module's block_size.
**undigest(mblocks)**:
Perform the reverse package transformation on a list of message
blocks. Note that the cipher module used for both transformations
must be the same. ``mblocks`` is a list of strings of bit length
equal to ``ciphermodule``'s block_size. The output is a string object.
Crypto.Protocol.Chaffing
==================================================
Winnowing and chaffing is a technique for enhancing privacy without requiring
strong encryption. In short, the technique takes a set of authenticated
message blocks (the wheat) and adds a number of chaff blocks which have
randomly chosen data and MAC fields. This means that to an adversary, the
chaff blocks look as valid as the wheat blocks, and so the authentication
would have to be performed on every block. By tailoring the number of chaff
blocks added to the message, the sender can make breaking the message
computationally infeasible. There are many other interesting properties of
the winnow/chaff technique.
For example, say Alice is sending a message to Bob. She packetizes the
message and performs an all-or-nothing transformation on the packets. Then
she authenticates each packet with a message authentication code (MAC). The
MAC is a hash of the data packet, and there is a secret key which she must
share with Bob (key distribution is an exercise left to the reader). She then
adds a serial number to each packet, and sends the packets to Bob.
Bob receives the packets, and using the shared secret authentication key,
authenticates the MACs for each packet. Those packets that have bad MACs are
simply discarded. The remainder are sorted by serial number, and passed
through the reverse all-or-nothing transform. The transform means that an
eavesdropper (say Eve) must acquire all the packets before any of the data can
be read. If even one packet is missing, the data is useless.
There's one twist: by adding chaff packets, Alice and Bob can make Eve's job
much harder, since Eve now has to break the shared secret key, or try every
combination of wheat and chaff packet to read any of the message. The cool
thing is that Bob doesn't need to add any additional code; the chaff packets
are already filtered out because their MACs don't match (in all likelihood --
since the data and MACs for the chaff packets are randomly chosen it is
possible, but very unlikely that a chaff MAC will match the chaff data). And
Alice need not even be the party adding the chaff! She could be completely
unaware that a third party, say Charles, is adding chaff packets to her
messages as they are transmitted.
**Chaff(factor=1.0, blocksper=1)**:
Class implementing the chaff adding algorithm.
``factor`` is the number of message blocks
to add chaff to, expressed as a percentage between 0.0 and 1.0; the default value is 1.0.
``blocksper`` is the number of chaff blocks to include for each block
being chaffed, and defaults to 1. The default settings
add one chaff block to every
message block. By changing the defaults, you can adjust how
computationally difficult it could be for an adversary to
brute-force crack the message. The difficulty is expressed as::
pow(blocksper, int(factor * number-of-blocks))
For ease of implementation, when ``factor`` < 1.0, only the first
``int(factor*number-of-blocks)`` message blocks are chaffed.
``Chaff`` instances have the following methods:
**chaff(blocks)**:
Add chaff to message blocks. ``blocks`` is a list of 3-tuples of the
form ``(serial-number, data, MAC)``.
Chaff is created by choosing a random number of the same
byte-length as ``data``, and another random number of the same
byte-length as ``MAC``. The message block's serial number is placed
on the chaff block and all the packet's chaff blocks are randomly
interspersed with the single wheat block. This method then
returns a list of 3-tuples of the same form. Chaffed blocks will
contain multiple instances of 3-tuples with the same serial
number, but the only way to figure out which blocks are wheat and
which are chaff is to perform the MAC hash and compare values.
Crypto.PublicKey: Public-Key Algorithms
--------------------------------------------------
So far, the encryption algorithms described have all been *private key*
ciphers. The same key is used for both encryption and decryption
so all correspondents must know it. This poses a problem: you may
want encryption to communicate sensitive data over an insecure
channel, but how can you tell your correspondent what the key is? You
can't just e-mail it to her because the channel is insecure. One
solution is to arrange the key via some other way: over the phone or
by meeting in person.
Another solution is to use **public-key** cryptography. In a public
key system, there are two different keys: one for encryption and one for
decryption. The encryption key can be made public by listing it in a
directory or mailing it to your correspondent, while you keep the
decryption key secret. Your correspondent then sends you data encrypted
with your public key, and you use the private key to decrypt it. While
the two keys are related, it's very difficult to derive the private key
given only the public key; however, deriving the private key is always
possible given enough time and computing power. This makes it very
important to pick keys of the right size: large enough to be secure, but
small enough to be applied fairly quickly.
Many public-key algorithms can also be used to sign messages; simply
run the message to be signed through a decryption with your private
key key. Anyone receiving the message can encrypt it with your
publicly available key and read the message. Some algorithms do only
one thing, others can both encrypt and authenticate.
The currently available public-key algorithms are listed in the
following table:
============= ==========================================
Algorithm Capabilities
============= ==========================================
RSA Encryption, authentication/signatures
ElGamal Encryption, authentication/signatures
DSA Authentication/signatures
============= ==========================================
Many of these algorithms are patented. Before using any of them in a
commercial product, consult a patent attorney; you may have to arrange
a license with the patent holder.
An example of using the RSA module to sign a message:
>>> from Crypto.Hash import MD5
>>> from Crypto.PublicKey import RSA
>>> from Crypto import Random
>>> rng = Random.new().read
>>> RSAkey = RSA.generate(2048, rng) # This will take a while...
>>> hash = MD5.new(plaintext).digest()
>>> signature = RSAkey.sign(hash, rng)
>>> signature # Print what an RSA sig looks like--you don't really care.
('\021\317\313\336\264\315' ...,)
>>> RSAkey.verify(hash, signature) # This sig will check out
1
>>> RSAkey.verify(hash[:-1], signature)# This sig will fail
0
Public-key modules make the following functions available:
**construct(tuple)**:
Constructs a key object from a tuple of data. This is
algorithm-specific; look at the source code for the details. (To be
documented later.)
**generate(size, randfunc, progress_func=None, e=65537)**:
Generate a fresh public/private key pair. ``size`` is a
algorithm-dependent size parameter, usually measured in bits; the
larger it is, the more difficult it will be to break the key. Safe
key sizes vary from algorithm to algorithm; you'll have to research
the question and decide on a suitable key size for your application.
An N-bit keys can encrypt messages up to N-1 bits long.
``randfunc`` is a random number generation function; it should
accept a single integer ``N`` and return a string of random data
``N`` bytes long. You should always use a cryptographically secure
random number generator, such as the one defined in the
``Crypto.Random`` module; **don't** just use the
current time and the ``random`` module.
``progress_func`` is an optional function that will be called with a short
string containing the key parameter currently being generated; it's
useful for interactive applications where a user is waiting for a key
to be generated.
``e`` is the public RSA exponent, and must be an odd positive integer.
It is typically a small number with very few ones in its binary representation.
The default value 65537 (=0b10000000000000001) is a safe choice: other
common values are 5, 7, 17, and 257. Exponent 3 is also widely used,
but it requires very special care when padding the message.
If you want to interface with some other program, you will have to know
the details of the algorithm being used; this isn't a big loss. If you
don't care about working with non-Python software, simply use the
``pickle`` module when you need to write a key or a signature to a
file. It's portable across all the architectures that Python supports,
and it's simple to use.
In case interoperability were important, RSA key objects can be exported
and imported in two standard formats: the DER binary encoding specified in
PKCS#1 (see RFC3447) or the ASCII textual encoding specified by the
old Privacy Enhanced Mail services (PEM, see RFC1421).
The RSA module makes the following function available for importing keys:
**importKey(externKey)**:
Import an RSA key (pubic or private) encoded as a string ``externKey``.
The key can follow either the PKCS#1/DER format (binary) or the PEM format
(7-bit ASCII).
For instance:
>>> from Crypto.PublicKey import RSA
>>> f = open("mykey.pem")
>>> RSAkey = RSA.importKey(f.read())
>>> if RSAkey.has_private(): print "Private key"
Every RSA object supports the following method to export itself:
**exportKey(format='PEM')**:
Return the key encoded as a string, according to the specified ``format``:
``'PEM'`` (default) or ``'DER'`` (also known as PKCS#1).
For instance:
>>> from Crypto.PublicKey import RSA
>>> from Crypto import Random
>>> rng = Random.new().read
>>> RSAkey = RSA.generate(1024, rng)
>>> f = open("keyPrivate.der","w+")
>>> f.write(RSAkey.exportKey("DER"))
>>> f.close()
>>> f = open("keyPublic.pem","w+")
>>> f.write(RSAkey.publickey().exportKey("PEM"))
>>> f.close()
Public-key objects always support the following methods. Some of them
may raise exceptions if their functionality is not supported by the
algorithm.
**can_blind()**:
Returns true if the algorithm is capable of blinding data;
returns false otherwise.
**can_encrypt()**:
Returns true if the algorithm is capable of encrypting and decrypting
data; returns false otherwise. To test if a given key object can encrypt
data, use ``key.can_encrypt() and key.has_private()``.
**can_sign()**:
Returns true if the algorithm is capable of signing data; returns false
otherwise. To test if a given key object can sign data, use
``key.can_sign() and key.has_private()``.
**decrypt(tuple)**:
Decrypts ``tuple`` with the private key, returning another string.
This requires the private key to be present, and will raise an exception
if it isn't present. It will also raise an exception if ``string`` is
too long.
**encrypt(string, K)**:
Encrypts ``string`` with the private key, returning a tuple of
strings; the length of the tuple varies from algorithm to algorithm.
``K`` should be a string of random data that is as long as
possible. Encryption does not require the private key to be present
inside the key object. It will raise an exception if ``string`` is
too long. For ElGamal objects, the value of ``K`` expressed as a
big-endian integer must be relatively prime to ``self.p-1``; an
exception is raised if it is not.
Python 3.x: ```string``` must be an object interpretable as a buffer of bytes.
**has_private()**:
Returns true if the key object contains the private key data, which
will allow decrypting data and generating signatures.
Otherwise this returns false.
**publickey()**:
Returns a new public key object that doesn't contain the private key
data.
**sign(string, K)**:
Sign ``string``, returning a signature, which is just a tuple; in
theory the signature may be made up of any Python objects at all; in
practice they'll be either strings or numbers. ``K`` should be a
string of random data that is as long as possible. Different algorithms
will return tuples of different sizes. ``sign()`` raises an
exception if ``string`` is too long. For ElGamal objects, the value
of ``K`` expressed as a big-endian integer must be relatively prime to
``self.p-1``; an exception is raised if it is not.
Python 3.x: ```string``` must be an object interpretable as a buffer of bytes.
**size()**:
Returns the maximum size of a string that can be encrypted or signed,
measured in bits. String data is treated in big-endian format; the most
significant byte comes first. (This seems to be a **de facto** standard
for cryptographical software.) If the size is not a multiple of 8, then
some of the high order bits of the first byte must be zero. Usually
it's simplest to just divide the size by 8 and round down.
**verify(string, signature)**:
Returns true if the signature is valid, and false otherwise.
``string`` is not processed in any way; ``verify`` does
not run a hash function over the data, but you can easily do that yourself.
Python 3.x: ```string``` must be an object interpretable as a buffer of bytes.
The ElGamal and DSA algorithms
==================================================
For RSA, the ``K`` parameters are unused; if you like, you can just
pass empty strings. The ElGamal and DSA algorithms require a real
``K`` value for technical reasons; see Schneier's book for a detailed
explanation of the respective algorithms. This presents a possible
hazard that can inadvertently reveal the private key. Without going into the
mathematical details, the danger is as follows. ``K`` is never derived
or needed by others; theoretically, it can be thrown away once the
encryption or signing operation is performed. However, revealing
``K`` for a given message would enable others to derive the secret key
data; worse, reusing the same value of ``K`` for two different
messages would also enable someone to derive the secret key data. An
adversary could intercept and store every message, and then try deriving
the secret key from each pair of messages.
This places implementors on the horns of a dilemma. On the one hand,
you want to store the ``K`` values to avoid reusing one; on the other
hand, storing them means they could fall into the hands of an adversary.
One can randomly generate ``K`` values of a suitable length such as
128 or 144 bits, and then trust that the random number generator
probably won't produce a duplicate anytime soon. This is an
implementation decision that depends on the desired level of security
and the expected usage lifetime of a private key. I can't choose and
enforce one policy for this, so I've added the ``K`` parameter to the
``encrypt`` and ``sign`` methods. You must choose ``K`` by
generating a string of random data; for ElGamal, when interpreted as a
big-endian number (with the most significant byte being the first byte
of the string), ``K`` must be relatively prime to ``self.p-1``; any
size will do, but brute force searches would probably start with small
primes, so it's probably good to choose fairly large numbers. It might be
simplest to generate a prime number of a suitable length using the
``Crypto.Util.number`` module.
Security Notes for Public-key Algorithms
==================================================
Any of these algorithms can be trivially broken; for example, RSA can be
broken by factoring the modulus *n* into its two prime factors.
This is easily done by the following code::
for i in range(2, n):
if (n%i)==0:
print i, 'is a factor'
break
However, ``n`` is usually a few hundred bits long, so this simple
program wouldn't find a solution before the universe comes to an end.
Smarter algorithms can factor numbers more quickly, but it's still
possible to choose keys so large that they can't be broken in a
reasonable amount of time. For ElGamal and DSA, discrete logarithms are
used instead of factoring, but the principle is the same.
Safe key sizes depend on the current state of number theory and
computer technology. At the moment, one can roughly define three
levels of security: low-security commercial, high-security commercial,
and military-grade. For RSA, these three levels correspond roughly to
768, 1024, and 2048-bit keys.
When exporting private keys you should always carefully ensure that the
chosen storage location cannot be accessed by adversaries.
Crypto.Util: Odds and Ends
--------------------------------------------------
This chapter contains all the modules that don't fit into any of the
other chapters.
Crypto.Util.number
==========================
This module contains various number-theoretic functions.
**GCD(x,y)**:
Return the greatest common divisor of ``x`` and ``y``.
**getPrime(N, randfunc)**:
Return an ``N``-bit random prime number, using random data obtained
from the function ``randfunc``. ``randfunc`` must take a single
integer argument, and return a string of random data of the
corresponding length; the ``get_bytes()`` method of a
``RandomPool`` object will serve the purpose nicely, as will the
``read()`` method of an opened file such as ``/dev/random``.
**getStrongPrime(N, e=0, false_positive_prob=1e-6, randfunc=None)**:
Return a random strong ``N``-bit prime number.
In this context p is a strong prime if p-1 and p+1 have at
least one large prime factor.
``N`` should be a multiple of 128 and > 512.
If ``e`` is provided the returned prime p-1 will be coprime to ``e``
and thus suitable for RSA where e is the public exponent.
The optional ``false_positive_prob`` is the statistical probability
that true is returned even though it is not (pseudo-prime).
It defaults to 1e-6 (less than 1:1000000).
Note that the real probability of a false-positive is far less. This is
just the mathematically provable limit.
``randfunc`` should take a single int parameter and return that
many random bytes as a string.
If randfunc is omitted, then ``Random.new().read`` is used.
**getRandomNBitInteger(N, randfunc)**:
Return an ``N``-bit random number, using random data obtained from the
function ``randfunc``. As usual, ``randfunc`` must take a single
integer argument and return a string of random data of the
corresponding length.
**getRandomNBitInteger(N, randfunc)**:
Return an ``N``-bit random number, using random data obtained from the
function ``randfunc``. As usual, ``randfunc`` must take a single
integer argument and return a string of random data of the
corresponding length.
**inverse(u, v)**:
Return the inverse of ``u`` modulo ``v``.
**isPrime(N)**:
Returns true if the number ``N`` is prime, as determined by a
Rabin-Miller test.
Crypto.Random
==================================================
For cryptographic purposes, ordinary random number generators are
frequently insufficient, because if some of their output is known, it
is frequently possible to derive the generator's future (or past)
output. Given the generator's state at some point in time, someone
could try to derive any keys generated using it. The solution is to
use strong encryption or hashing algorithms to generate successive
data; this makes breaking the generator as difficult as breaking the
algorithms used.
Understanding the concept of **entropy** is important for using the
random number generator properly. In the sense we'll be using it,
entropy measures the amount of randomness; the usual unit is in bits.
So, a single random bit has an entropy of 1 bit; a random byte has an
entropy of 8 bits. Now consider a one-byte field in a database containing a
person's sex, represented as a single character ``'M'`` or ``'F'``.
What's the entropy of this field? Since there are only two possible
values, it's not 8 bits, but one; if you were trying to guess the value,
you wouldn't have to bother trying ``'Q'`` or ``'@'``.
Now imagine running that single byte field through a hash function that
produces 128 bits of output. Is the entropy of the resulting hash value
128 bits? No, it's still just 1 bit. The entropy is a measure of how many
possible states of the data exist. For English
text, the entropy of a five-character string is not 40 bits; it's
somewhat less, because not all combinations would be seen. ``'Guido'``
is a possible string, as is ``'In th'``; ``'zJwvb'`` is not.
The relevance to random number generation? We want enough bits of
entropy to avoid making an attack on our generator possible. An
example: One computer system had a mechanism which generated nonsense
passwords for its users. This is a good idea, since it would prevent
people from choosing their own name or some other easily guessed string.
Unfortunately, the random number generator used only had 65536 states,
which meant only 65536 different passwords would ever be generated, and
it was easy to compute all the possible passwords and try them. The
entropy of the random passwords was far too low. By the same token, if
you generate an RSA key with only 32 bits of entropy available, there
are only about 4.2 billion keys you could have generated, and an
adversary could compute them all to find your private key. See
RFC 1750,
"Randomness Recommendations for Security", for an interesting discussion
of the issues related to random number generation.
The ``Random`` module builds strong random number generators that look
like generic files a user can read data from. The internal state consists
of entropy accumulators based on the best randomness sources the underlying
operating is capable to provide.
The ``Random`` module defines the following methods:
**new()**:
Builds a file-like object that outputs cryptographically random bytes.
**atfork()**:
This methods has to be called whenever os.fork() is invoked. Forking
undermines the security of any random generator based on the operating
system, as it duplicates all structures a program has. In order to
thwart possible attacks, this method shoud be called soon after forking,
and before any cryptographic operation.
**get_random_bytes(num)**:
Returns a string containing ``num`` bytes of random data.
Objects created by the ``Random`` module define the following variables and methods:
**read(num)**:
Returns a string containing ``num`` bytes of random data.
**close()**:
**flush()**:
Do nothing. Provided for consistency.
Crypto.Util.RFC1751
==================================================
The keys for private-key algorithms should be arbitrary binary data.
Many systems err by asking the user to enter a password, and then
using the password as the key. This limits the space of possible
keys, as each key byte is constrained within the range of possible
ASCII characters, 32-127, instead of the whole 0-255 range possible
with ASCII. Unfortunately, it's difficult for humans to remember 16
or 32 hex digits.
One solution is to request a lengthy passphrase from the user, and
then run it through a hash function such as SHA1 or MD5. Another
solution is discussed in RFC 1751, "A Convention for Human-Readable
128-bit Keys", by Daniel L. McDonald. Binary keys are transformed
into a list of short English words that should be easier to remember.
For example, the hex key EB33F77EE73D4053 is transformed to "TIDE ITCH
SLOW REIN RULE MOT".
**key_to_english(key)**:
Accepts a string of arbitrary data ``key``, and returns a string
containing uppercase English words separated by spaces. ``key``'s
length must be a multiple of 8.
**english_to_key(string)**:
Accepts ``string`` containing English words, and returns a string of
binary data representing the key. Words must be separated by
whitespace, and can be any mixture of uppercase and lowercase
characters. 6 words are required for 8 bytes of key data, so
the number of words in ``string`` must be a multiple of 6.
Extending the Toolkit
--------------------------------------------------
Preserving a common interface for cryptographic routines is a good
idea. This chapter explains how to write new modules for the Toolkit.
The basic process is as follows:
1. Add a new ``.c`` file containing an implementation of the new
algorithm.
This file must define 3 or 4 standard functions,
a few constants, and a C ``struct`` encapsulating the state
variables required by the algorithm.
2. Add the new algorithm to ``setup.py``.
3. Send a copy of the code to me, if you like; code for new
algorithms will be gratefully accepted.
Adding Hash Algorithms
==================================================
The required constant definitions are as follows::
#define MODULE_NAME MD2 /* Name of algorithm */
#define DIGEST_SIZE 16 /* Size of resulting digest in bytes */
The C structure must be named ``hash_state``::
typedef struct {
... whatever state variables you need ...
} hash_state;
There are four functions that need to be written: to initialize the
algorithm's state, to hash a string into the algorithm's state, to get
a digest from the current state, and to copy a state.
* ``void hash_init(hash_state *self);``
* ``void hash_update(hash_state *self, unsigned char *buffer, int length);``
* ``PyObject *hash_digest(hash_state *self);``
* ``void hash_copy(hash_state *source, hash_state *dest);``
Put ``#include "hash_template.c"`` at the end of the file to
include the actual implementation of the module.
Adding Block Encryption Algorithms
==================================================
The required constant definitions are as follows::
#define MODULE_NAME AES /* Name of algorithm */
#define BLOCK_SIZE 16 /* Size of encryption block */
#define KEY_SIZE 0 /* Size of key in bytes (0 if not fixed size) */
The C structure must be named ``block_state``::
typedef struct {
... whatever state variables you need ...
} block_state;
There are three functions that need to be written: to initialize the
algorithm's state, and to encrypt and decrypt a single block.
* ``void block_init(block_state *self, unsigned char *key, int keylen);``
* ``void block_encrypt(block_state *self, unsigned char *in, unsigned char *out);``
* ``void block_decrypt(block_state *self, unsigned char *in, unsigned char *out);``
Put ``#include "block_template.c"`` at the end of the file to
include the actual implementation of the module.
Adding Stream Encryption Algorithms
==================================================
The required constant definitions are as follows::
#define MODULE_NAME ARC4 /* Name of algorithm */
#define BLOCK_SIZE 1 /* Will always be 1 for a stream cipher */
#define KEY_SIZE 0 /* Size of key in bytes (0 if not fixed size) */
The C structure must be named ``stream_state``::
typedef struct {
... whatever state variables you need ...
} stream_state;
There are three functions that need to be written: to initialize the
algorithm's state, and to encrypt and decrypt a single block.
* ``void stream_init(stream_state *self, unsigned char *key, int keylen);``
* ``void stream_encrypt(stream_state *self, unsigned char *block, int length);``
* ``void stream_decrypt(stream_state *self, unsigned char *block, int length);``
Put ``#include "stream_template.c"`` at the end of the file to
include the actual implementation of the module.
================================================
FILE: LEGAL/00INDEX
================================================
00INDEX - This file
tsu-notify.mbox - Notification sent per U.S. export regulations
copy/ - Copyright info & public-domain dedications
================================================
FILE: LEGAL/CodeSubmissionRequirements-RevA.txt
================================================
PyCrypto Licensing Requirements - Rev. A
Last updated: 2008-09-14
In an effort to further clarify PyCrypto's licensing terms, anyone submitting
code to PyCrypto must be able to certify the following (taken from the Linux
kernel's SubmittingPatches file):
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
In addition, all new code added to PyCrypto must be distributable under the
terms of the following licence:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.</p>
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=== EOF ===
================================================
FILE: LEGAL/CodeSubmissionRequirements-RevB.txt
================================================
PyCrypto Code Submission Requirements - Rev. B
Last updated: 2008-09-14
In an effort to further clarify PyCrypto's licensing terms, anyone submitting
code to PyCrypto must be able to certify the following (taken from the Linux
kernel's SubmittingPatches file):
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
In addition, the code's author must not be a national, citizen, or resident of
the United States of America.
In addition, the code must not be of U.S. origin.
In addition, all new code added to PyCrypto must be distributable under the
terms of the following licence and disclaimer:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.</p>
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=== EOF ===
================================================
FILE: LEGAL/CodeSubmissionRequirements-RevC.txt
================================================
PyCrypto Code Submission Requirements - Rev. C
Last updated: 2009-02-28
In an effort to further clarify PyCrypto's licensing terms, anyone submitting
code to PyCrypto must be able to certify the following (taken from the Linux
kernel's SubmittingPatches file):
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
In addition, the code's author must not be a national, citizen, or resident of
the United States of America.
In addition, the code must not be of U.S. origin.
In addition, all new code contributed to PyCrypto must be dedicated to the
public domain as follows:
The contents of this file are dedicated to the public domain. To the extent
that dedication to the public domain is not available, everyone is granted a
worldwide, perpetual, royalty-free, non-exclusive license to exercise all
rights associated with the contents of this file for any purpose whatsoever.
No rights are reserved.
=== EOF ===
================================================
FILE: LEGAL/CodeSubmissionRequirements.txt
================================================
PyCrypto Code Submission Requirements - Rev. D
Last updated: 2010-11-29
In an effort to further clarify PyCrypto's licensing terms, anyone submitting
code to PyCrypto must be able to certify the following (taken from the Linux
kernel's SubmittingPatches file):
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
In addition, all new code contributed to PyCrypto must be dedicated to the
public domain as follows:
The contents of this file are dedicated to the public domain. To the extent
that dedication to the public domain is not available, everyone is granted a
worldwide, perpetual, royalty-free, non-exclusive license to exercise all
rights associated with the contents of this file for any purpose whatsoever.
No rights are reserved.
=== EOF ===
================================================
FILE: LEGAL/copy/00INDEX
================================================
00INDEX This file
LICENSE.orig Original (deprecated) license for the Python Cryptography Toolkit
LICENSE.libtom LICENSE file from LibTomCrypt
stmts/ Statements by contributors
================================================
FILE: LEGAL/copy/LICENSE.libtom
================================================
LibTomCrypt is public domain. As should all quality software be.
Tom St Denis
================================================
FILE: LEGAL/copy/LICENSE.orig
================================================
===================================================================
Distribute and use freely; there are no restrictions on further
dissemination and usage except those imposed by the laws of your
country of residence. This software is provided "as is" without
warranty of fitness for use or suitability for any purpose, express
or implied. Use at your own risk or not at all.
===================================================================
Incorporating the code into commercial products is permitted; you do
not have to make source available or contribute your changes back
(though that would be nice).
--amk (www.amk.ca)
================================================
FILE: LEGAL/copy/LICENSE.python-2.2
================================================
A. HISTORY OF THE SOFTWARE
==========================
Python was created in the early 1990s by Guido van Rossum at Stichting
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
as a successor of a language called ABC. Guido remains Python's
principal author, although it includes many contributions from others.
In 1995, Guido continued his work on Python at the Corporation for
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
in Reston, Virginia where he released several versions of the
software.
In May 2000, Guido and the Python core development team moved to
BeOpen.com to form the BeOpen PythonLabs team. In October of the same
year, the PythonLabs team moved to Digital Creations (now Zope
Corporation, see http://www.zope.com). In 2001, the Python Software
Foundation (PSF, see http://www.python.org/psf/) was formed, a
non-profit organization created specifically to own Python-related
Intellectual Property. Zope Corporation is a sponsoring member of
the PSF.
All Python releases are Open Source (see http://www.opensource.org for
the Open Source Definition). Historically, most, but not all, Python
releases have also been GPL-compatible; the table below summarizes
the various releases.
Release Derived Year Owner GPL-
from compatible? (1)
0.9.0 thru 1.2 1991-1995 CWI yes
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
1.6 1.5.2 2000 CNRI no
2.0 1.6 2000 BeOpen.com no
1.6.1 1.6 2001 CNRI no
2.1 2.0+1.6.1 2001 PSF no
2.0.1 2.0+1.6.1 2001 PSF yes
2.1.1 2.1+2.0.1 2001 PSF yes
2.2 2.1.1 2001 PSF yes
2.1.2 2.1.1 2002 PSF yes
2.1.3 2.1.2 2002 PSF yes
2.2.1 2.2 2002 PSF yes
2.2.2 2.2.1 2002 PSF yes
2.2.3 2.2.2 2003 PSF yes
Footnotes:
(1) GPL-compatible doesn't mean that we're distributing Python under
the GPL. All Python licenses, unlike the GPL, let you distribute
a modified version without making your changes open source. The
GPL-compatible licenses make it possible to combine Python with
other software that is released under the GPL; the others don't.
Thanks to the many outside volunteers who have worked under Guido's
direction to make these releases possible.
B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
===============================================================
PSF LICENSE AGREEMENT FOR PYTHON 2.2.3
--------------------------------------
1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using Python 2.2.3 software in source or binary form and its
associated documentation.
2. Subject to the terms and conditions of this License Agreement, PSF
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python 2.2.3
alone or in any derivative version, provided, however, that PSF's
License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
2001, 2002, 2003 Python Software Foundation; All Rights Reserved" are
retained in Python 2.2.3 alone or in any derivative version prepared
by Licensee.
3. In the event Licensee prepares a derivative work that is based on
or incorporates Python 2.2.3 or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python 2.2.3.
4. PSF is making Python 2.2.3 available to Licensee on an "AS IS"
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 2.2.3 WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
2.2.3 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 2.2.3,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee. This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.
8. By copying, installing or otherwise using Python 2.2.3, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
-------------------------------------------
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
Individual or Organization ("Licensee") accessing and otherwise using
this software in source or binary form and its associated
documentation ("the Software").
2. Subject to the terms and conditions of this BeOpen Python License
Agreement, BeOpen hereby grants Licensee a non-exclusive,
royalty-free, world-wide license to reproduce, analyze, test, perform
and/or display publicly, prepare derivative works, distribute, and
otherwise use the Software alone or in any derivative version,
provided, however, that the BeOpen Python License is retained in the
Software, alone or in any derivative version prepared by Licensee.
3. BeOpen is making the Software available to Licensee on an "AS IS"
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
5. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
6. This License Agreement shall be governed by and interpreted in all
respects by the law of the State of California, excluding conflict of
law provisions. Nothing in this License Agreement shall be deemed to
create any relationship of agency, partnership, or joint venture
between BeOpen and Licensee. This License Agreement does not grant
permission to use BeOpen trademarks or trade names in a trademark
sense to endorse or promote products or services of Licensee, or any
third party. As an exception, the "BeOpen Python" logos available at
http://www.pythonlabs.com/logos.html may be used according to the
permissions granted on that web page.
7. By copying, installing or otherwise using the software, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
---------------------------------------
1. This LICENSE AGREEMENT is between the Corporation for National
Research Initiatives, having an office at 1895 Preston White Drive,
Reston, VA 20191 ("CNRI"), and the Individual or Organization
("Licensee") accessing and otherwise using Python 1.6.1 software in
source or binary form and its associated documentation.
2. Subject to the terms and conditions of this License Agreement, CNRI
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python 1.6.1
alone or in any derivative version, provided, however, that CNRI's
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
1995-2001 Corporation for National Research Initiatives; All Rights
Reserved" are retained in Python 1.6.1 alone or in any derivative
version prepared by Licensee. Alternately, in lieu of CNRI's License
Agreement, Licensee may substitute the following text (omitting the
quotes): "Python 1.6.1 is made available subject to the terms and
conditions in CNRI's License Agreement. This Agreement together with
Python 1.6.1 may be located on the Internet using the following
unique, persistent identifier (known as a handle): 1895.22/1013. This
Agreement may also be obtained from a proxy server on the Internet
using the following URL: http://hdl.handle.net/1895.22/1013".
3. In the event Licensee prepares a derivative work that is based on
or incorporates Python 1.6.1 or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python 1.6.1.
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
7. This License Agreement shall be governed by the federal
intellectual property law of the United States, including without
limitation the federal copyright law, and, to the extent such
U.S. federal law does not apply, by the law of the Commonwealth of
Virginia, excluding Virginia's conflict of law provisions.
Notwithstanding the foregoing, with regard to derivative works based
on Python 1.6.1 that incorporate non-separable material that was
previously distributed under the GNU General Public License (GPL), the
law of the Commonwealth of Virginia shall govern this License
Agreement only as to issues arising under or with respect to
Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
License Agreement shall be deemed to create any relationship of
agency, partnership, or joint venture between CNRI and Licensee. This
License Agreement does not grant permission to use CNRI trademarks or
trade name in a trademark sense to endorse or promote products or
services of Licensee, or any third party.
8. By clicking on the "ACCEPT" button where indicated, or by copying,
installing or otherwise using Python 1.6.1, Licensee agrees to be
bound by the terms and conditions of this License Agreement.
ACCEPT
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
--------------------------------------------------
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
The Netherlands. All rights reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
================================================
FILE: LEGAL/copy/stmts/Andrew_M_Kuchling.mbox
================================================
From dlitz@dlitz.net Sun Nov 23 00:17:22 2008
Date: Sun, 23 Nov 2008 00:17:22 -0500
From: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
To: "A. M. Kuchling" <amk@amk.ca>
Subject: PyCrypto license clarification
Message-ID: <20081123051722.GA29253@rivest.dlitz.net>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4"
Content-Disposition: inline
X-Primary-Address: dlitz@dlitz.net
X-Homepage: http://www.dlitz.net/
X-OpenPGP: url=http://www.dlitz.net/go/gpgkey/;
id=19E11FE8B3CFF273ED174A24928CEC1339C25CF7 (only for key signing);
preference=unprotected
X-OpenPGP: url=http://www.dlitz.net/go/gpgkey/;
id=4B2AFD82FC7D9E3838D9179F1C11B877E7804B45 (2008);
preference=signencrypt
User-Agent: Mutt/1.5.16 (2007-06-11)
Status: RO
Content-Length: 3461
Lines: 78
--YiEDa0DAkWCtVeE4
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi Andrew,
People often ask me what license PyCrypto is covered by, if it's=20
GPL-compatible, etc. Right now, I'm not really sure what to tell them. =20
The text in the current LICENSE file (quoted below) is not entirely clear=
=20
on the point of whether distributing modified versions is allowed. (It=20
says "distribute and use", but not "modify".)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Distribute and use freely; there are no restrictions on further
dissemination and usage except those imposed by the laws of your
country of residence. This software is provided "as is" without
warranty of fitness for use or suitability for any purpose, express
or implied. Use at your own risk or not at all.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Incorporating the code into commercial products is permitted; you do
not have to make source available or contribute your changes back
(though that would be nice).
--amk (www.amk.ca)
For the next PyCrypto release, I'd like to take steps to move toward a=20
clearer licensing regime. I'm asking as many copyright holders as I can=20
find, starting with you, if I can release PyCrypto under something clearer=
=20
and more standard. Below, I have quoted a public domain dedication that=20
was recommended in _Intellectual Property and Open Source: A Practical=20
Guide to Protecting Code_, by Van Lindberg.
May I, on your behalf, dedicate to the public domain your considerable=20
contributions to PyCrypto, with the following notice?
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
The contents of this file are dedicated to the public domain. To the
extent that dedication to the public domain is not available, everyone
is granted a worldwide, perpetual, royalty-free, non-exclusive license
to exercise all rights associated with the contents of this file for
any purpose whatsoever. No rights are reserved.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Regards,
- Dwayne
--=20
Dwayne C. Litzenberger <dlitz@dlitz.net>
Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
Annual key (2008) - 4B2A FD82 FC7D 9E38 38D9 179F 1C11 B877 E780 4B45
--YiEDa0DAkWCtVeE4
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iEYEARECAAYFAkko52IACgkQHBG4d+eAS0XPPQCfcyQ2DdAXKg9N7Z+jeSFFD5EZ
yloAn33a3ZjkteyJaTbzEqImOEW8JGpf
=aBEW
-----END PGP SIGNATURE-----
--YiEDa0DAkWCtVeE4--
From amk@amk.ca Sun Nov 23 07:51:59 2008
X-Maildir-Dup-Checked: Yes
Return-Path: <amk@amk.ca>
X-Original-To: dwon@rivest.dlitz.net
Delivered-To: dwon@rivest.dlitz.net
Received: from goedel.dlitz.net (unknown [10.159.255.6])
by rivest.dlitz.net (Postfix) with ESMTP id 5C2C75047D
for <dwon@rivest.dlitz.net>; Sun, 23 Nov 2008 07:51:59 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
by goedel.dlitz.net (Postfix) with QMQP id D632D10111
for <dwon@rivest.dlitz.net>; Sun, 23 Nov 2008 06:51:58 -0600 (CST)
Received: (vmailmgr-postfix 12026 invoked by uid 1003); 23 Nov 2008 06:51:58 -0600
Delivered-To: m-dlitz-dlitz@dlitz.net
Received-SPF: none (goedel.dlitz.net: domain of amk@amk.ca does not designate permitted sender hosts)
Received: from mail5.sea5.speakeasy.net (mail5.sea5.speakeasy.net [69.17.117.7])
by goedel.dlitz.net (Postfix) with ESMTP id 97DC710105
for <dlitz@dlitz.net>; Sun, 23 Nov 2008 06:51:58 -0600 (CST)
Received: (qmail 3992 invoked from network); 23 Nov 2008 12:51:52 -0000
Received: from dsl092-163-165.wdc2.dsl.speakeasy.net (HELO localhost) (akuchling@[66.92.163.165])
(envelope-sender <amk@amk.ca>)
by mail5.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP
for <dlitz@dlitz.net>; 23 Nov 2008 12:51:52 -0000
Date: Sun, 23 Nov 2008 07:51:34 -0500
From: "A.M. Kuchling" <amk@amk.ca>
To: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
Subject: Re: PyCrypto license clarification
Message-ID: <20081123125134.GA21239@amk.local>
Reply-To: amk@amk.ca
References: <20081123051722.GA29253@rivest.dlitz.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20081123051722.GA29253@rivest.dlitz.net>
User-Agent: Mutt/1.5.13 (2006-08-11)
Status: RO
Content-Length: 537
Lines: 15
> People often ask me what license PyCrypto is covered by, if it's
> GPL-compatible, etc. Right now, I'm not really sure what to tell them.
> The text in the current LICENSE file (quoted below) is not entirely clear
> on the point of whether distributing modified versions is allowed. (It
> says "distribute and use", but not "modify".)
The intention is that it be public domain.
> May I, on your behalf, dedicate to the public domain your considerable
> contributions to PyCrypto, with the following notice?
You may.
--amk
================================================
FILE: LEGAL/copy/stmts/Barry_A_Warsaw.mbox
================================================
From dlitz@dlitz.net Sat Feb 28 21:45:09 2009
Date: Sat, 28 Feb 2009 21:45:09 -0500
From: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
To: Barry A Warsaw <barry@python.org>
Subject: PyCrypto license clarification
Message-ID: <20090301024509.GA13195@rivest.dlitz.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
User-Agent: Mutt/1.5.16 (2007-06-11)
Status: RO
Content-Length: 2535
Hi Barry,
I am the new maintainer of the Python Cryptography Toolkit, and I am
working on a new release at http://www.pycrypto.org/.
People often ask me what license PyCrypto is covered by, if it's
GPL-compatible, etc. Right now, I'm not really sure what to tell them.
The text in the current LICENSE file (quoted below) is not entirely clear
on the point of whether distributing modified versions is allowed. (It
says "distribute and use", but not "modify".)
===================================================================
Distribute and use freely; there are no restrictions on further
dissemination and usage except those imposed by the laws of your
country of residence. This software is provided "as is" without
warranty of fitness for use or suitability for any purpose, express
or implied. Use at your own risk or not at all.
===================================================================
Incorporating the code into commercial products is permitted; you do
not have to make source available or contribute your changes back
(though that would be nice).
--amk (www.amk.ca)
For the next PyCrypto release, I would like to take steps to move toward a
clearer licensing regime. I am asking as many copyright holders as I can
find if I can release PyCrypto under something clearer and more standard.
Below, I have quoted a public domain dedication that was recommended in
_Intellectual Property and Open Source: A Practical Guide to Protecting
Code_, by Van Lindberg. I have already contacted A. M. Kuchling, Robey
Pointer, and Wim Lewis, and they have all approved the following dedication
for their contributions.
I understand that you have made contributions to PyCrypto. May I, on your
behalf, dedicate to the public domain all your contributions to PyCrypto,
with the following notice?
=======================================================================
The contents of this file are dedicated to the public domain. To the
extent that dedication to the public domain is not available, everyone
is granted a worldwide, perpetual, royalty-free, non-exclusive license
to exercise all rights associated with the contents of this file for
any purpose whatsoever. No rights are reserved.
=======================================================================
Regards,
- Dwayne
--
Dwayne C. Litzenberger <dlitz@dlitz.net>
Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
From barry@python.org Mon Mar 2 11:29:39 2009
X-Maildir-Dup-Checked: Yes
Return-Path: <barry@python.org>
X-Original-To: dwon@rivest.dlitz.net
Delivered-To: dwon@rivest.dlitz.net
Received: from goedel.dlitz.net (unknown [10.159.255.6])
by rivest.dlitz.net (Postfix) with ESMTP id 6E01AC6640B
for <dwon@rivest.dlitz.net>; Mon, 2 Mar 2009 11:29:39 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
by goedel.dlitz.net (Postfix) with QMQP id 0644E1007A
for <dwon@rivest.dlitz.net>; Mon, 2 Mar 2009 10:29:39 -0600 (CST)
Received: (vmailmgr-postfix 8668 invoked by uid 1003); 2 Mar 2009 10:29:39 -0600
Delivered-To: m-dlitz-dlitz@dlitz.net
Received-SPF: none (python.org: No applicable sender policy available) receiver=goedel.dlitz.net; identity=mfrom; envelope-from="barry@python.org"; helo=mail.wooz.org; client-ip=216.15.33.230
Received: from mail.wooz.org (216-15-33-230.c3-0.slvr-ubr2.lnh-slvr.md.static.cable.rcn.com [216.15.33.230])
by goedel.dlitz.net (Postfix) with ESMTP id CCEA110073
for <dlitz@dlitz.net>; Mon, 2 Mar 2009 10:29:38 -0600 (CST)
Received: from snowdog.wooz.org (snowdog.wooz.org [192.168.11.202])
by mail.wooz.org (Postfix) with ESMTPSA id ACE30E3C9F
for <dlitz@dlitz.net>; Mon, 2 Mar 2009 11:29:35 -0500 (EST)
Message-Id: <09BF1A39-B015-4820-97A3-8642490C8254@python.org>
From: Barry Warsaw <barry@python.org>
To: Dwayne C. Litzenberger <dlitz@dlitz.net>
In-Reply-To: <20090301024509.GA13195@rivest.dlitz.net>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Apple Message framework v930.3)
Subject: Re: PyCrypto license clarification
Date: Mon, 2 Mar 2009 11:29:34 -0500
References: <20090301024509.GA13195@rivest.dlitz.net>
X-Pgp-Agent: GPGMail d55 (v55, Leopard)
X-Mailer: Apple Mail (2.930.3)
Status: RO
Content-Length: 869
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Feb 28, 2009, at 9:45 PM, Dwayne C. Litzenberger wrote:
> I am the new maintainer of the Python Cryptography Toolkit, and I am =20=
> working on a new release at http://www.pycrypto.org/.
Great! I'm glad to see someone taking up the mantle of this important =20=
Python library.
> I understand that you have made contributions to PyCrypto. May I, =20
> on your behalf, dedicate to the public domain all your contributions =20=
> to PyCrypto, with the following notice?
Absolutely yes.
Cheers,
Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
iQCVAwUBSawJbnEjvBPtnXfVAQLZjgP/ecG+JdZwNvPJRfsa6rhY6+MHLDHI6agk
evkJnSJQAcVHlZnVlVeR5IXgvDUMakZjU4SOV7MqkhsKA9lIet7PaD9VSYgn3ra5
gElwI2DQDoOy5GExXMm74gqrrb1PCCbCRmpaYNo+DZohwHkeFBjbwDRA3wItOrH7
SK4w9VBJtfY=3D
=3DQduY
-----END PGP SIGNATURE-----
================================================
FILE: LEGAL/copy/stmts/Jeethu_Rao.mbox
================================================
From dlitz@dlitz.net Sat Feb 28 23:24:14 2009
Date: Sat, 28 Feb 2009 23:24:14 -0500
From: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
To: Jeethu Rao <jeethurao@gmail.com>
Subject: PyCrypto license clarification
Message-ID: <20090301042414.GA15122@rivest.dlitz.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
User-Agent: Mutt/1.5.16 (2007-06-11)
Status: RO
Content-Length: 2513
Hi Jeethu,
I am the new maintainer of the Python Cryptography Toolkit, and I am
working on a new release at http://www.pycrypto.org/.
People often ask me what license PyCrypto is covered by, if it's
GPL-compatible, etc. Right now, I'm not really sure what to tell them.
The text in the current LICENSE file (quoted below) is not entirely clear
on the point of whether distributing modified versions is allowed. (It
says "distribute and use", but not "modify".)
===================================================================
Distribute and use freely; there are no restrictions on further
dissemination and usage except those imposed by the laws of your
country of residence. This software is provided "as is" without
warranty of fitness for use or suitability for any purpose, express
or implied. Use at your own risk or not at all.
===================================================================
Incorporating the code into commercial products is permitted; you do
not have to make source available or contribute your changes back
(though that would be nice).
--amk (www.amk.ca)
For the next PyCrypto release, I would like to take steps to move toward a
clearer licensing regime. I am asking as many copyright holders as I can
find if I can release PyCrypto under something clearer and more standard.
Below, I have quoted a public domain dedication that was recommended in
_Intellectual Property and Open Source: A Practical Guide to Protecting
Code_, by Van Lindberg. I have already contacted A. M. Kuchling, Robey
Pointer, and Wim Lewis, and they have all approved the following text for
their contributions.
I understand that you have made contributions to PyCrypto. May I, on your
behalf, dedicate to the public domain all your contributions to PyCrypto,
with the following notice?
=======================================================================
The contents of this file are dedicated to the public domain. To the
extent that dedication to the public domain is not available, everyone
is granted a worldwide, perpetual, royalty-free, non-exclusive license
to exercise all rights associated with the contents of this file for
any purpose whatsoever. No rights are reserved.
=======================================================================
Regards,
- Dwayne
--
Dwayne C. Litzenberger <dlitz@dlitz.net>
Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
From jeethurao@gmail.com Sun Mar 8 17:28:16 2009
X-Maildir-Dup-Checked: Yes
Return-Path: <jeethurao@gmail.com>
X-Original-To: dwon@rivest.dlitz.net
Delivered-To: dwon@rivest.dlitz.net
Received: from goedel.dlitz.net (unknown [10.159.255.6])
by rivest.dlitz.net (Postfix) with ESMTP id 0CC83515D9
for <dwon@rivest.dlitz.net>; Sun, 8 Mar 2009 17:28:16 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
by goedel.dlitz.net (Postfix) with QMQP id 4E58F450CB
for <dwon@rivest.dlitz.net>; Sun, 8 Mar 2009 15:28:15 -0600 (CST)
Received: (vmailmgr-postfix 5011 invoked by uid 1003); 8 Mar 2009 15:28:15 -0600
Delivered-To: m-dlitz-dlitz@dlitz.net
Received-SPF: pass (gmail.com ... _spf.google.com: 209.85.198.249 is authorized to use 'jeethurao@gmail.com' in 'mfrom' identity (mechanism 'ip4:209.85.128.0/17' matched)) receiver=goedel.dlitz.net; identity=mfrom; envelope-from="jeethurao@gmail.com"; helo=rv-out-0708.google.com; client-ip=209.85.198.249
Received: from rv-out-0708.google.com (unknown [209.85.198.249])
by goedel.dlitz.net (Postfix) with ESMTP id 3C097449E7
for <dlitz@dlitz.net>; Sun, 8 Mar 2009 15:28:12 -0600 (CST)
Received: by rv-out-0708.google.com with SMTP id k29so1252333rvb.26
for <dlitz@dlitz.net>; Sun, 08 Mar 2009 14:27:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:mime-version:received:in-reply-to:references
:date:message-id:subject:from:to:content-type;
bh=YWy9U32WCU/ksRqukHwaOZyJQBUs4Yvt5mI20U6mI/g=;
b=oMjI22lIxYiJKge2zNJW3rRiUi9LqFXmey5Wp0pLItuNF+X3duyfhopTuBAKw7MwVY
B5E6VQuGVEyzBbNsctyVgq6DhQiQtouCLZymSViobmuDmKn5DtUKoxpDk0xCxQmHYaas
L9/A6D3/J66kKrNBgX9mc0GPcZTviVFYkPR0Q=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
b=Ym7CStuDEfJKay1AJyWZkZmJA1lnTcwCG6akBHAXLld8ht6PFcmlsffzZG8hJCIVJ8
vljqcT+G6cywVTBw1pyGX7ECYzr0+vhGvgdpACGrs24zikHfpSSd5GFogzXaLVvGVH8p
bqSHpfWKKtEP4gAQkiNeIq1GNtR2j8U3fnRyg=
MIME-Version: 1.0
Received: by 10.141.176.13 with SMTP id d13mr2656028rvp.231.1236547674677;
Sun, 08 Mar 2009 14:27:54 -0700 (PDT)
In-Reply-To: <20090301042414.GA15122@rivest.dlitz.net>
References: <20090301042414.GA15122@rivest.dlitz.net>
Date: Mon, 9 Mar 2009 02:57:54 +0530
Message-ID: <e3c0ddba0903081427p3a7b1058g417dd8624df68d6d@mail.gmail.com>
Subject: Re: PyCrypto license clarification
From: Jeethu Rao <jeethurao@gmail.com>
To: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
Content-Type: multipart/alternative; boundary=000e0cd209d0e5a3d40464a23054
Status: RO
Content-Length: 7668
--000e0cd209d0e5a3d40464a23054
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hi Dwayne,My contribution to pycrypto are very very minimal (The sha256
module, IIRC).
I'd be fine with the public domain license for PyCrypto.
Jeethu Rao
PS: Apologies for the delay in my response.
I don't really check this email address all that often,
please direct any further correspondence to jeethu@jeethurao.com
On Sun, Mar 1, 2009 at 9:54 AM, Dwayne C. Litzenberger <dlitz@dlitz.net>wrote:
> Hi Jeethu,
>
> I am the new maintainer of the Python Cryptography Toolkit, and I am
> working on a new release at http://www.pycrypto.org/.
>
> People often ask me what license PyCrypto is covered by, if it's
> GPL-compatible, etc. Right now, I'm not really sure what to tell them. The
> text in the current LICENSE file (quoted below) is not entirely clear on the
> point of whether distributing modified versions is allowed. (It says
> "distribute and use", but not "modify".)
>
> ===================================================================
> Distribute and use freely; there are no restrictions on further
> dissemination and usage except those imposed by the laws of your
> country of residence. This software is provided "as is" without
> warranty of fitness for use or suitability for any purpose, express
> or implied. Use at your own risk or not at all.
> ===================================================================
>
> Incorporating the code into commercial products is permitted; you do
> not have to make source available or contribute your changes back
> (though that would be nice).
>
> --amk (www.amk.ca)
>
> For the next PyCrypto release, I would like to take steps to move toward a
> clearer licensing regime. I am asking as many copyright holders as I can
> find if I can release PyCrypto under something clearer and more standard.
> Below, I have quoted a public domain dedication that was recommended in
> _Intellectual Property and Open Source: A Practical Guide to Protecting
> Code_, by Van Lindberg. I have already contacted A. M. Kuchling, Robey
> Pointer, and Wim Lewis, and they have all approved the following text for
> their contributions.
>
> I understand that you have made contributions to PyCrypto. May I, on your
> behalf, dedicate to the public domain all your contributions to PyCrypto,
> with the following notice?
>
> =======================================================================
> The contents of this file are dedicated to the public domain. To the
> extent that dedication to the public domain is not available, everyone
> is granted a worldwide, perpetual, royalty-free, non-exclusive license
> to exercise all rights associated with the contents of this file for
> any purpose whatsoever. No rights are reserved.
> =======================================================================
>
> Regards,
> - Dwayne
>
> --
> Dwayne C. Litzenberger <dlitz@dlitz.net>
> Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
>
--
Jeethu Rao
--000e0cd209d0e5a3d40464a23054
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi Dwayne,<div>My contribution to pycrypto are very very minimal (The sha25=
6 module, IIRC).</div><div>I'd be fine with the public domain license f=
or PyCrypto.</div><div><br></div><div>Jeethu Rao</div><div>PS: Apologies fo=
r the delay in my response.=A0</div>
<div>I don't really check this email address all that often,</div><div>=
please direct any further correspondence to <a href=3D"mailto:jeethu@jeethu=
rao.com">jeethu@jeethurao.com</a><br><div><br><div class=3D"gmail_quote">On=
Sun, Mar 1, 2009 at 9:54 AM, Dwayne C. Litzenberger <span dir=3D"ltr"><=
<a href=3D"mailto:dlitz@dlitz.net">dlitz@dlitz.net</a>></span> wrote:<br=
>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">Hi Jeethu,<br>
<br>
I am the new maintainer of the Python Cryptography Toolkit, and I am workin=
g on a new release at <a href=3D"http://www.pycrypto.org/" target=3D"_blank=
">http://www.pycrypto.org/</a>.<br>
<br>
People often ask me what license PyCrypto is covered by, if it's GPL-co=
mpatible, etc. =A0Right now, I'm not really sure what to tell them. =A0=
The text in the current LICENSE file (quoted below) is not entirely clear o=
n the point of whether distributing modified versions is allowed. =A0(It sa=
ys "distribute and use", but not "modify".)<br>
<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
Distribute and use freely; there are no restrictions on further<br>
dissemination and usage except those imposed by the laws of your<br>
country of residence. =A0This software is provided "as is" withou=
t<br>
warranty of fitness for use or suitability for any purpose, express<br>
or implied. Use at your own risk or not at all.<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
<br>
Incorporating the code into commercial products is permitted; you do<br>
not have to make source available or contribute your changes back<br>
(though that would be nice).<br>
<br>
--amk =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(<a href=3D"http://www.amk.ca" target=3D=
"_blank">www.amk.ca</a>)<br>
<br>
For the next PyCrypto release, I would like to take steps to move toward a =
clearer licensing regime. =A0I am asking as many copyright holders as I can=
find if I can release PyCrypto under something clearer and more standard. =
=A0Below, I have quoted a public domain dedication that was recommended in =
_Intellectual Property and Open Source: A Practical Guide to Protecting Cod=
e_, by Van Lindberg. =A0I have already contacted A. M. Kuchling, Robey Poin=
ter, and Wim Lewis, and they have all approved the following text for their=
contributions.<br>
<br>
I understand that you have made contributions to PyCrypto. =A0May I, on you=
r behalf, dedicate to the public domain all your contributions to PyCrypto,=
with the following notice?<br>
<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
The contents of this file are dedicated to the public domain. =A0To the<br>
extent that dedication to the public domain is not available, everyone<br>
is granted a worldwide, perpetual, royalty-free, non-exclusive license<br>
to exercise all rights associated with the contents of this file for<br>
any purpose whatsoever. =A0No rights are reserved.<br>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
<br>
Regards,<br>
- Dwayne<br><font color=3D"#888888">
<br>
-- <br>
Dwayne C. Litzenberger <<a href=3D"mailto:dlitz@dlitz.net" target=3D"_bl=
ank">dlitz@dlitz.net</a>><br>
=A0 =A0 =A0Key-signing key =A0 - 19E1 1FE8 B3CF F273 ED17 =A04A24 928C EC1=
3 39C2 5CF7<br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>Jeethu Rao<br>
</div></div>
--000e0cd209d0e5a3d40464a23054--
================================================
FILE: LEGAL/copy/stmts/Joris_Bontje.mbox
================================================
From dlitz@dlitz.net Mon May 4 22:49:14 2009
Date: Mon, 4 May 2009 22:49:14 -0400
From: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
To: Joris Bontje <joris@bontje.nl>
Subject: PyCrypto license clarification
Message-ID: <20090505024914.GA9219@rivest.dlitz.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
User-Agent: Mutt/1.5.16 (2007-06-11)
Status: RO
Content-Length: 2553
Hi Joris,
I am the new maintainer of the Python Cryptography Toolkit, and I am
working on a new release at http://www.pycrypto.org/.
People often ask me what license PyCrypto is covered by, if it's
GPL-compatible, etc. Right now, I'm not really sure what to tell them.
The text in the current LICENSE file (quoted below) is not entirely clear
on the point of whether distributing modified versions is allowed. (It
says "distribute and use", but not "modify".)
===================================================================
Distribute and use freely; there are no restrictions on further
dissemination and usage except those imposed by the laws of your
country of residence. This software is provided "as is" without
warranty of fitness for use or suitability for any purpose, express
or implied. Use at your own risk or not at all.
===================================================================
Incorporating the code into commercial products is permitted; you do
not have to make source available or contribute your changes back
(though that would be nice).
--amk (www.amk.ca)
For the next PyCrypto release, I would like to take steps to move toward a
clearer licensing regime. I am asking as many copyright holders as I can
find if I can release PyCrypto under something clearer and more standard.
Below, I have quoted a public domain dedication that was recommended in
_Intellectual Property and Open Source: A Practical Guide to Protecting
Code_, by Van Lindberg. I have already contacted A. M. Kuchling, Robey
Pointer, Barry Warsaw, Wim Lewis, Jeethu Rao, and Mark Moraes, and they
have all approved the following dedication for their contributions.
I understand that you have made contributions to PyCrypto. May I, on your
behalf, dedicate to the public domain all your contributions to PyCrypto,
with the following notice?
=======================================================================
The contents of this file are dedicated to the public domain. To the
extent that dedication to the public domain is not available, everyone
is granted a worldwide, perpetual, royalty-free, non-exclusive license
to exercise all rights associated with the contents of this file for
any purpose whatsoever. No rights are reserved.
=======================================================================
Regards,
- Dwayne
--
Dwayne C. Litzenberger <dlitz@dlitz.net>
Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
From joris@bontje.nl Tue May 5 03:08:32 2009
X-Maildir-Dup-Checked: Yes
Return-Path: <joris@bontje.nl>
X-Original-To: dwon@rivest.dlitz.net
Delivered-To: dwon@rivest.dlitz.net
Received: from goedel.dlitz.net (unknown [10.159.255.6])
by rivest.dlitz.net (Postfix) with ESMTP id 7AA4B9E5078
for <dwon@rivest.dlitz.net>; Tue, 5 May 2009 03:08:32 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
by goedel.dlitz.net (Postfix) with QMQP id 2315B40583
for <dwon@rivest.dlitz.net>; Tue, 5 May 2009 01:08:32 -0600 (CST)
Received: (vmailmgr-postfix 16890 invoked by uid 1003); 5 May 2009 01:08:32 -0600
Delivered-To: m-dlitz-dlitz@dlitz.net
Received-SPF: none (bontje.nl: No applicable sender policy available) receiver=goedel.dlitz.net; identity=mfrom; envelope-from="joris@bontje.nl"; helo=smtp6.versatel.nl; client-ip=62.58.50.97
Received: from smtp6.versatel.nl (smtp6.versatel.nl [62.58.50.97])
by goedel.dlitz.net (Postfix) with ESMTP id 2D76A4052C
for <dlitz@dlitz.net>; Tue, 5 May 2009 01:08:30 -0600 (CST)
Received: (qmail 4224 invoked by uid 0); 5 May 2009 07:08:25 -0000
Received: from qmail06.zonnet.nl (HELO dell062.admin.zonnet.nl) ([10.170.1.123])
(envelope-sender <joris@bontje.nl>)
by 10.170.1.96 (qmail-ldap-1.03) with SMTP
for < >; 5 May 2009 07:08:25 -0000
Received: by dell062.admin.zonnet.nl (Postfix, from userid 33)
id 9BE9B15759B; Tue, 5 May 2009 09:08:25 +0200 (CEST)
Received: from firewall66.interaccess.nl (firewall66.interaccess.nl
[193.173.35.66]) by www.webmail.vuurwerk.nl (Horde MIME library) with HTTP;
Tue, 05 May 2009 09:08:25 +0200
Message-ID: <20090505090825.gsq1ps7hg08wwwok@www.webmail.vuurwerk.nl>
Date: Tue, 05 May 2009 09:08:25 +0200
From: joris@bontje.nl
To: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
Subject: Re: PyCrypto license clarification
References: <20090505024914.GA9219@rivest.dlitz.net>
In-Reply-To: <20090505024914.GA9219@rivest.dlitz.net>
MIME-Version: 1.0
Content-Type: text/plain;
charset=ISO-8859-1;
format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: Internet Messaging Program (IMP) H3 (4.1.3)
Status: RO
X-Status: A
Content-Length: 3488
Hi Dwayne,
Thanks for taking over the PyCrypto library and putting in the required
effort to keep this going.
I was very excited to read that it is now one of the installed
libraries for Google AppsEngine!
You have my full permission to dedicate all my contributions to
PyCrypto to the public domain with your suggested notice:
=======================================================================
The contents of this file are dedicated to the public domain. To the
extent that dedication to the public domain is not available, everyone
is granted a worldwide, perpetual, royalty-free, non-exclusive license
to exercise all rights associated with the contents of this file for
any purpose whatsoever. No rights are reserved.
=======================================================================
Regards,
Joris
Citeren "Dwayne C. Litzenberger" <dlitz@dlitz.net>:
> Hi Joris,
>
> I am the new maintainer of the Python Cryptography Toolkit, and I am
> working on a new release at http://www.pycrypto.org/.
>
> People often ask me what license PyCrypto is covered by, if it's
> GPL-compatible, etc. Right now, I'm not really sure what to tell them.
> The text in the current LICENSE file (quoted below) is not entirely clear
> on the point of whether distributing modified versions is allowed. (It
> says "distribute and use", but not "modify".)
>
> ===================================================================
> Distribute and use freely; there are no restrictions on further
> dissemination and usage except those imposed by the laws of your
> country of residence. This software is provided "as is" without
> warranty of fitness for use or suitability for any purpose, express
> or implied. Use at your own risk or not at all.
> ===================================================================
>
> Incorporating the code into commercial products is permitted; you do
> not have to make source available or contribute your changes back
> (though that would be nice).
>
> --amk (www.amk.ca)
>
> For the next PyCrypto release, I would like to take steps to move toward a
> clearer licensing regime. I am asking as many copyright holders as I can
> find if I can release PyCrypto under something clearer and more standard.
> Below, I have quoted a public domain dedication that was recommended in
> _Intellectual Property and Open Source: A Practical Guide to Protecting
> Code_, by Van Lindberg. I have already contacted A. M. Kuchling, Robey
> Pointer, Barry Warsaw, Wim Lewis, Jeethu Rao, and Mark Moraes, and they
> have all approved the following dedication for their contributions.
>
> I understand that you have made contributions to PyCrypto. May I, on your
> behalf, dedicate to the public domain all your contributions to PyCrypto,
> with the following notice?
>
> =======================================================================
> The contents of this file are dedicated to the public domain. To the
> extent that dedication to the public domain is not available, everyone
> is granted a worldwide, perpetual, royalty-free, non-exclusive license
> to exercise all rights associated with the contents of this file for
> any purpose whatsoever. No rights are reserved.
> =======================================================================
>
> Regards,
> - Dwayne
>
> --
> Dwayne C. Litzenberger <dlitz@dlitz.net>
> Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
From dlitz@dlitz.net Tue May 5 17:53:47 2009
Date: Tue, 5 May 2009 17:53:47 -0400
From: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
To: joris@bontje.nl
Subject: Re: PyCrypto license clarification
Message-ID: <20090505215347.GB9933@rivest.dlitz.net>
References: <20090505024914.GA9219@rivest.dlitz.net> <20090505090825.gsq1ps7hg08wwwok@www.webmail.vuurwerk.nl>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <20090505090825.gsq1ps7hg08wwwok@www.webmail.vuurwerk.nl>
X-Primary-Address: dlitz@dlitz.net
X-Homepage: http://www.dlitz.net/
X-OpenPGP: url=http://www.dlitz.net/go/gpgkey/;
id=19E11FE8B3CFF273ED174A24928CEC1339C25CF7 (only for key signing);
preference=unprotected
X-OpenPGP: url=http://www.dlitz.net/go/gpgkey/;
id=4B2AFD82FC7D9E3838D9179F1C11B877E7804B45 (2008);
preference=signencrypt
User-Agent: Mutt/1.5.16 (2007-06-11)
Status: RO
Content-Length: 3863
Excellent! Thank you!
On Tue, May 05, 2009 at 09:08:25AM +0200, joris@bontje.nl wrote:
> Hi Dwayne,
>
> Thanks for taking over the PyCrypto library and putting in the required
> effort to keep this going.
> I was very excited to read that it is now one of the installed libraries
> for Google AppsEngine!
>
> You have my full permission to dedicate all my contributions to PyCrypto to
> the public domain with your suggested notice:
> =======================================================================
> The contents of this file are dedicated to the public domain. To the
> extent that dedication to the public domain is not available, everyone
> is granted a worldwide, perpetual, royalty-free, non-exclusive license
> to exercise all rights associated with the contents of this file for
> any purpose whatsoever. No rights are reserved.
> =======================================================================
>
>
> Regards,
> Joris
>
> Citeren "Dwayne C. Litzenberger" <dlitz@dlitz.net>:
>
>> Hi Joris,
>>
>> I am the new maintainer of the Python Cryptography Toolkit, and I am
>> working on a new release at http://www.pycrypto.org/.
>>
>> People often ask me what license PyCrypto is covered by, if it's
>> GPL-compatible, etc. Right now, I'm not really sure what to tell them.
>> The text in the current LICENSE file (quoted below) is not entirely clear
>> on the point of whether distributing modified versions is allowed. (It
>> says "distribute and use", but not "modify".)
>>
>> ===================================================================
>> Distribute and use freely; there are no restrictions on further
>> dissemination and usage except those imposed by the laws of your
>> country of residence. This software is provided "as is" without
>> warranty of fitness for use or suitability for any purpose, express
>> or implied. Use at your own risk or not at all.
>> ===================================================================
>>
>> Incorporating the code into commercial products is permitted; you do
>> not have to make source available or contribute your changes back
>> (though that would be nice).
>>
>> --amk (www.amk.ca)
>>
>> For the next PyCrypto release, I would like to take steps to move toward a
>> clearer licensing regime. I am asking as many copyright holders as I can
>> find if I can release PyCrypto under something clearer and more standard.
>> Below, I have quoted a public domain dedication that was recommended in
>> _Intellectual Property and Open Source: A Practical Guide to Protecting
>> Code_, by Van Lindberg. I have already contacted A. M. Kuchling, Robey
>> Pointer, Barry Warsaw, Wim Lewis, Jeethu Rao, and Mark Moraes, and they
>> have all approved the following dedication for their contributions.
>>
>> I understand that you have made contributions to PyCrypto. May I, on your
>> behalf, dedicate to the public domain all your contributions to PyCrypto,
>> with the following notice?
>>
>> =======================================================================
>> The contents of this file are dedicated to the public domain. To the
>> extent that dedication to the public domain is not available, everyone
>> is granted a worldwide, perpetual, royalty-free, non-exclusive license
>> to exercise all rights associated with the contents of this file for
>> any purpose whatsoever. No rights are reserved.
>> =======================================================================
>>
>> Regards,
>> - Dwayne
>>
>> --
>> Dwayne C. Litzenberger <dlitz@dlitz.net>
>> Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
>
>
--
Dwayne C. Litzenberger <dlitz@dlitz.net>
Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
Annual key (2008) - 4B2A FD82 FC7D 9E38 38D9 179F 1C11 B877 E780 4B45
================================================
FILE: LEGAL/copy/stmts/Mark_Moraes.mbox
================================================
From dlitz@dlitz.net Sat Apr 18 09:14:20 2009
Date: Sat, 18 Apr 2009 09:14:20 -0400
From: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
To: Mark Moraes <moraes@computer.org>
Subject: PyCrypto license clarification
Message-ID: <20090418131419.GA14494@rivest.dlitz.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
User-Agent: Mutt/1.5.16 (2007-06-11)
Status: RO
Content-Length: 2635
Hi Mark,
I am the new maintainer of the Python Cryptography Toolkit, and I am
working on a new release at http://www.pycrypto.org/.
People often ask me what license PyCrypto is covered by, if it's
GPL-compatible, etc. Right now, I'm not really sure what to tell them.
The text in the current LICENSE file (quoted below) is not entirely clear
on the point of whether distributing modified versions is allowed. (It
says "distribute and use", but not "modify".)
===================================================================
Distribute and use freely; there are no restrictions on further
dissemination and usage except those imposed by the laws of your
country of residence. This software is provided "as is" without
warranty of fitness for use or suitability for any purpose, express
or implied. Use at your own risk or not at all.
===================================================================
Incorporating the code into commercial products is permitted; you do
not have to make source available or contribute your changes back
(though that would be nice).
--amk (www.amk.ca)
For the next PyCrypto release, I would like to take steps to move toward a
clearer licensing regime. I am asking as many copyright holders as I can
find if I can release PyCrypto under something clearer and more standard.
Below, I have quoted a public domain dedication that was recommended in
_Intellectual Property and Open Source: A Practical Guide to Protecting
Code_, by Van Lindberg. I have already contacted A. M. Kuchling, Robey
Pointer, Wim Lewis, Jeethu Rao, and Barry Warsaw, and they have all
approved the following dedication for their contributions.
I understand that you have made contributions to PyCrypto. May I, on your
behalf, dedicate to the public domain all your contributions to PyCrypto,
with the following notice?
=======================================================================
The contents of this file are dedicated to the public domain. To the
extent that dedication to the public domain is not available, everyone
is granted a worldwide, perpetual, royalty-free, non-exclusive license
to exercise all rights associated with the contents of this file for
any purpose whatsoever. No rights are reserved.
=======================================================================
Regards,
- Dwayne
--
Dwayne C. Litzenberger <dlitz@dlitz.net>
Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
From markmoraes@yahoo.com Mon Apr 20 19:25:37 2009
X-Maildir-Dup-Checked: Yes
Return-Path: <markmoraes@yahoo.com>
X-Original-To: dwon@rivest.dlitz.net
Delivered-To: dwon@rivest.dlitz.net
Received: from goedel.dlitz.net (unknown [10.159.255.6])
by rivest.dlitz.net (Postfix) with ESMTP id 5D9AE984FDD
for <dwon@rivest.dlitz.net>; Mon, 20 Apr 2009 19:25:37 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
by goedel.dlitz.net (Postfix) with QMQP id DE41F4025F
for <dwon@rivest.dlitz.net>; Mon, 20 Apr 2009 17:25:36 -0600 (CST)
Received: (vmailmgr-postfix 7604 invoked by uid 1003); 20 Apr 2009 17:25:36 -0600
Delivered-To: m-dlitz-dlitz@dlitz.net
Received-SPF: none (yahoo.com: No applicable sender policy available) receiver=goedel.dlitz.net; identity=mfrom; envelope-from="markmoraes@yahoo.com"; helo=web32405.mail.mud.yahoo.com; client-ip=68.142.207.198
Received: from web32405.mail.mud.yahoo.com (web32405.mail.mud.yahoo.com [68.142.207.198])
by goedel.dlitz.net (Postfix) with SMTP id B5EAF401EE
for <dlitz@dlitz.net>; Mon, 20 Apr 2009 17:25:36 -0600 (CST)
Received: (qmail 34697 invoked by uid 60001); 20 Apr 2009 23:25:33 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1240269933; bh=OvxqbYnCg7R6tUN3YmlgFURM3CuHh1JeHyXhDzkaThU=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=F2h2bFzpQxyKFZ8BhenniyupGw4Zvlekb9BSk91qKU+51W/TkSGBij5YZIhkLQdkQk0qLz5f4g8dT6bOME3sEY1j10hlx0K0u2UD0yoYTINBCmsdMQRoJ7ph9bmt+p/EJhRpe+FiV6aoLV0FONWiHfGDghPT1dulWXfVTqgB2aU=
DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws;
s=s1024; d=yahoo.com;
h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type;
b=r6RShFF5VzQLg+9tcn1xKuo4Rs4IVvXF6fdqOpQrMyRCxeFooebhuTE35grGqlomOJLwM0+mZwRb6rGkDj763caOAlo8Ect/qlADW5izXfmVQaDchTbTqmpsJBmQnTQs9iZ+InrG+3UIwtUSGfX7fhEWmI9P/HBzxf9Wp4b3jeo=;
Message-ID: <551071.34569.qm@web32405.mail.mud.yahoo.com>
X-YMail-OSG: FrK8aWMVM1mFJtLpMGbUbCLjbUQC.i.JkIAKUHSFsFn7t9PbtewAewXJ2uhZGCOlGCX6oVnG3u.CgqzAffY4vZSnfTT8wnCkzZNZ_g6k.XUc3ipo_6e.92TXl4p8MxDGAf1tpNF5nXPwcQ7aREs7jGoWWVJYVytp50clsUFSHzf7Zbpa8P1Yoe_xSzf3OAgRSh5fCrbFCC8sHPCuwrL3YhasbtHmkWffteSS.x6gEcBaxf03oz4FeDb5mpJ54g11Xonq8h_TmzX9g84Bin9g_3fJ4WSXm6g6.tohLyfXcUxoz4j036wyWpTKPrWEzIUQaN83Sv_bj_Ghxw--
Received: from [69.124.140.74] by web32405.mail.mud.yahoo.com via HTTP; Mon, 20 Apr 2009 16:25:32 PDT
X-Mailer: YahooMailClassic/5.2.15 YahooMailWebService/0.7.289.1
Date: Mon, 20 Apr 2009 16:25:32 -0700 (PDT)
From: M Moraes <markmoraes@yahoo.com>
Reply-To: moraes@computer.org
Subject: Re: PyCrypto license clarification
To: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Status: RO
X-Status: A
Content-Length: 3222
Hi Dwayne.
Sure, the new license sounds fine for all my contributions to PyCrypto, and thanks for taking it on. My apologies for not responding to your previous e-mail.
Regards,
Mark.
--- On Sat, 4/18/09, Dwayne C. Litzenberger <dlitz@dlitz.net> wrote:
> From: Dwayne C. Litzenberger <dlitz@dlitz.net>
> Subject: PyCrypto license clarification
> To: "Mark Moraes" <moraes@computer.org>
> Date: Saturday, April 18, 2009, 9:14 AM
> Hi Mark,
>
> I am the new maintainer of the Python Cryptography Toolkit,
> and I am
> working on a new release at http://www.pycrypto.org/.
>
> People often ask me what license PyCrypto is covered by, if
> it's
> GPL-compatible, etc. Right now, I'm not really sure
> what to tell them.
> The text in the current LICENSE file (quoted below) is not
> entirely clear
> on the point of whether distributing modified versions is
> allowed. (It
> says "distribute and use", but not "modify".)
>
>
> ===================================================================
> Distribute and use freely; there are
> no restrictions on further
> dissemination and usage except those
> imposed by the laws of your
> country of residence. This
> software is provided "as is" without
> warranty of fitness for use or
> suitability for any purpose, express
> or implied. Use at your own risk or
> not at all.
>
> ===================================================================
>
> Incorporating the code into commercial
> products is permitted; you do
> not have to make source available or
> contribute your changes back
> (though that would be nice).
>
> --amk
>
>
> (www.amk.ca)
>
> For the next PyCrypto release, I would like to take steps
> to move toward a
> clearer licensing regime. I am asking as many
> copyright holders as I can
> find if I can release PyCrypto under something clearer and
> more standard.
> Below, I have quoted a public domain dedication that was
> recommended in
> _Intellectual Property and Open Source: A Practical Guide
> to Protecting
> Code_, by Van Lindberg. I have already contacted A.
> M. Kuchling, Robey
> Pointer, Wim Lewis, Jeethu Rao, and Barry Warsaw, and they
> have all
> approved the following dedication for their contributions.
>
> I understand that you have made contributions to
> PyCrypto. May I, on your
> behalf, dedicate to the public domain all your
> contributions to PyCrypto,
> with the following notice?
>
>
> =======================================================================
> The contents of this file are
> dedicated to the public domain. To the
> extent that dedication to the public
> domain is not available, everyone
> is granted a worldwide, perpetual,
> royalty-free, non-exclusive license
> to exercise all rights associated with
> the contents of this file for
> any purpose whatsoever. No
> rights are reserved.
>
> =======================================================================
>
> Regards,
> - Dwayne
>
> -- Dwayne C. Litzenberger <dlitz@dlitz.net>
> Key-signing key - 19E1
> 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
>
From dlitz@dlitz.net Mon Apr 20 20:01:37 2009
Date: Mon, 20 Apr 2009 20:01:37 -0400
From: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
To: moraes@computer.org
Subject: Re: PyCrypto license clarification
Message-ID: <20090421000137.GA29012@rivest.dlitz.net>
References: <551071.34569.qm@web32405.mail.mud.yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <551071.34569.qm@web32405.mail.mud.yahoo.com>
X-Primary-Address: dlitz@dlitz.net
X-Homepage: http://www.dlitz.net/
X-OpenPGP: url=http://www.dlitz.net/go/gpgkey/;
id=19E11FE8B3CFF273ED174A24928CEC1339C25CF7 (only for key signing);
preference=unprotected
X-OpenPGP: url=http://www.dlitz.net/go/gpgkey/;
id=4B2AFD82FC7D9E3838D9179F1C11B877E7804B45 (2008);
preference=signencrypt
User-Agent: Mutt/1.5.16 (2007-06-11)
Status: RO
Content-Length: 3677
Thanks a lot, and don't worry about not responding to previous emails. I
do that too much myself. :)
On Mon, Apr 20, 2009 at 04:25:32PM -0700, M Moraes wrote:
>
>Hi Dwayne.
>
>Sure, the new license sounds fine for all my contributions to PyCrypto, and thanks for taking it on. My apologies for not responding to your previous e-mail.
>
>Regards,
>Mark.
>
>--- On Sat, 4/18/09, Dwayne C. Litzenberger <dlitz@dlitz.net> wrote:
>
>> From: Dwayne C. Litzenberger <dlitz@dlitz.net>
>> Subject: PyCrypto license clarification
>> To: "Mark Moraes" <moraes@computer.org>
>> Date: Saturday, April 18, 2009, 9:14 AM
>> Hi Mark,
>>
>> I am the new maintainer of the Python Cryptography Toolkit,
>> and I am
>> working on a new release at http://www.pycrypto.org/.
>>
>> People often ask me what license PyCrypto is covered by, if
>> it's
>> GPL-compatible, etc. Right now, I'm not really sure
>> what to tell them.
>> The text in the current LICENSE file (quoted below) is not
>> entirely clear
>> on the point of whether distributing modified versions is
>> allowed. (It
>> says "distribute and use", but not "modify".)
>>
>>
>> ===================================================================
>> Distribute and use freely; there are
>> no restrictions on further
>> dissemination and usage except those
>> imposed by the laws of your
>> country of residence. This
>> software is provided "as is" without
>> warranty of fitness for use or
>> suitability for any purpose, express
>> or implied. Use at your own risk or
>> not at all.
>>
>> ===================================================================
>>
>> Incorporating the code into commercial
>> products is permitted; you do
>> not have to make source available or
>> contribute your changes back
>> (though that would be nice).
>>
>> --amk
>>
>>
>> (www.amk.ca)
>>
>> For the next PyCrypto release, I would like to take steps
>> to move toward a
>> clearer licensing regime. I am asking as many
>> copyright holders as I can
>> find if I can release PyCrypto under something clearer and
>> more standard.
>> Below, I have quoted a public domain dedication that was
>> recommended in
>> _Intellectual Property and Open Source: A Practical Guide
>> to Protecting
>> Code_, by Van Lindberg. I have already contacted A.
>> M. Kuchling, Robey
>> Pointer, Wim Lewis, Jeethu Rao, and Barry Warsaw, and they
>> have all
>> approved the following dedication for their contributions.
>>
>> I understand that you have made contributions to
>> PyCrypto. May I, on your
>> behalf, dedicate to the public domain all your
>> contributions to PyCrypto,
>> with the following notice?
>>
>>
>> =======================================================================
>> The contents of this file are
>> dedicated to the public domain. To the
>> extent that dedication to the public
>> domain is not available, everyone
>> is granted a worldwide, perpetual,
>> royalty-free, non-exclusive license
>> to exercise all rights associated with
>> the contents of this file for
>> any purpose whatsoever. No
>> rights are reserved.
>>
>> =======================================================================
>>
>> Regards,
>> - Dwayne
>>
>> -- Dwayne C. Litzenberger <dlitz@dlitz.net>
>> Key-signing key - 19E1
>> 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
>>
>
--
Dwayne C. Litzenberger <dlitz@dlitz.net>
Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
Annual key (2008) - 4B2A FD82 FC7D 9E38 38D9 179F 1C11 B877 E780 4B45
================================================
FILE: LEGAL/copy/stmts/Paul_Swartz.mbox
================================================
From dlitz@dlitz.net Sun Aug 2 21:48:25 2009
Date: Sun, 2 Aug 2009 21:48:25 -0400
From: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
To: Paul Swartz <paulswartz@gmail.com>
Subject: PyCrypto license clarification
Message-ID: <20090803014825.GA1326@rivest.dlitz.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
User-Agent: Mutt/1.5.16 (2007-06-11)
Status: RO
Content-Length: 2631
Hi Paul,
I am the new maintainer of the Python Cryptography Toolkit, and I am
working on a new release at http://www.pycrypto.org/.
People often ask me what license PyCrypto is covered by, if it's
GPL-compatible, etc. Right now, I'm not really sure what to tell them.
The text in the current LICENSE file (quoted below) is not entirely clear
on the point of whether distributing modified versions is allowed. (It
says "distribute and use", but not "modify".)
===================================================================
Distribute and use freely; there are no restrictions on further
dissemination and usage except those imposed by the laws of your
country of residence. This software is provided "as is" without
warranty of fitness for use or suitability for any purpose, express
or implied. Use at your own risk or not at all.
===================================================================
Incorporating the code into commercial products is permitted; you do
not have to make source available or contribute your changes back
(though that would be nice).
--amk (www.amk.ca)
For the next PyCrypto release, I would like to take steps to move toward a
clearer licensing regime. I am asking as many copyright holders as I can
find if I can release PyCrypto under something clearer and more standard.
Below, I have quoted a public domain dedication that was recommended in
_Intellectual Property and Open Source: A Practical Guide to Protecting
Code_, by Van Lindberg. I have already contacted A. M. Kuchling, Robey
Pointer, Barry Warsaw, Wim Lewis, Jeethu Rao, Joris Bontje, and Mark
Moraes, and they have all approved the following dedication for their
contributions.
I understand that you have made contributions to PyCrypto, under nickname
"z3p" and/or other names. May I, on your behalf, dedicate to the public
domain all your contributions to PyCrypto, with the following notice?
=======================================================================
The contents of this file are dedicated to the public domain. To the
extent that dedication to the public domain is not available, everyone
is granted a worldwide, perpetual, royalty-free, non-exclusive license
to exercise all rights associated with the contents of this file for
any purpose whatsoever. No rights are reserved.
=======================================================================
Regards,
- Dwayne
--
Dwayne C. Litzenberger <dlitz@dlitz.net>
Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
From paulswartz@gmail.com Mon Aug 3 12:14:07 2009
X-Maildir-Dup-Checked: Yes
Return-Path: <paulswartz@gmail.com>
X-Original-To: dwon@rivest.dlitz.net
Delivered-To: dwon@rivest.dlitz.net
Received: from goedel.dlitz.net (unknown [10.159.255.6])
by rivest.dlitz.net (Postfix) with ESMTP id 30B9D984FC4
for <dwon@rivest.dlitz.net>; Mon, 3 Aug 2009 12:14:07 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
by goedel.dlitz.net (Postfix) with QMQP id AD9AE81068
for <dwon@rivest.dlitz.net>; Mon, 3 Aug 2009 10:14:06 -0600 (CST)
Received: (vmailmgr-postfix 32055 invoked by uid 1003); 3 Aug 2009 10:14:06 -0600
Delivered-To: m-dlitz-dlitz@dlitz.net
Received-SPF: pass (gmail.com ... _spf.google.com: 72.14.220.159 is authorized to use 'paulswartz@gmail.com' in 'mfrom' identity (mechanism 'ip4:72.14.192.0/18' matched)) receiver=goedel.dlitz.net; identity=mfrom; envelope-from="paulswartz@gmail.com"; helo=fg-out-1718.google.com; client-ip=72.14.220.159
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159])
by goedel.dlitz.net (Postfix) with ESMTP id 4E63881066
for <dlitz@dlitz.net>; Mon, 3 Aug 2009 10:14:05 -0600 (CST)
Received: by fg-out-1718.google.com with SMTP id d23so1076840fga.3
for <dlitz@dlitz.net>; Mon, 03 Aug 2009 09:14:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:mime-version:received:in-reply-to:references
:from:date:message-id:subject:to:content-type
:content-transfer-encoding;
bh=A0RHBf0TnribKS5qOHJ3WYbkZ+b0cuPeuoKAvpApWcc=;
b=gyTqkRhKlHadFKIZCBWsRbnMNVDq1PWlJbyC0EvxPskaoHr3HAR96MWQNBePu/40Ac
Vn55qlIqTdom4e9zlUEE6MwZo9kqi/Qw0L/SLib0DlQeNqo/eHYqPmuVswltaYwNAyMJ
Y9++76rPGzqYdALsfvsmwv7Q3/bEmjVTr0tQE=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to
:content-type:content-transfer-encoding;
b=jze7KSMkUGilfVCXKXaaXMi5NAtGdMQOtVZZfRNyGSy68xOd2sxefjyyig3EfT6Nv6
Q3opUMsT96Q6zjZND55w446kTh2uBTNz4d3NwIeEWJnG3xcliRQu/mXPFp8AzPI3CefL
1ornJLM1eQ2XyuZA73jem+SJtfdHUcSD1UhgI=
MIME-Version: 1.0
Received: by 10.239.157.147 with SMTP id q19mr601802hbc.61.1249316043185; Mon,
03 Aug 2009 09:14:03 -0700 (PDT)
In-Reply-To: <20090803014825.GA1326@rivest.dlitz.net>
References: <20090803014825.GA1326@rivest.dlitz.net>
From: Paul Swartz <paulswartz@gmail.com>
Date: Mon, 3 Aug 2009 12:13:43 -0400
Message-ID: <324cfb540908030913x71d331f0kb069052f74e5ae6b@mail.gmail.com>
Subject: Re: PyCrypto license clarification
To: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Status: RO
X-Status: A
Content-Length: 1450
On Sun, Aug 2, 2009 at 9:48 PM, Dwayne C. Litzenberger<dlitz@dlitz.net> wro=
te:
> Hi Paul,
>
> I am the new maintainer of the Python Cryptography Toolkit, and I am
> working on a new release at http://www.pycrypto.org/.
That's great!
> I understand that you have made contributions to PyCrypto, under nickname
> "z3p" and/or other names. =C2=A0May I, on your behalf, dedicate to the pu=
blic
> domain all your contributions to PyCrypto, with the following notice?
>
> =C2=A0=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =C2=A0The contents of this file are dedicated to the public domain. =C2=
=A0To the
> =C2=A0extent that dedication to the public domain is not available, every=
one
> =C2=A0is granted a worldwide, perpetual, royalty-free, non-exclusive lice=
nse
> =C2=A0to exercise all rights associated with the contents of this file fo=
r
> =C2=A0any purpose whatsoever. =C2=A0No rights are reserved.
> =C2=A0=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Yes, that's fine. Good luck with the new release!
-p
--=20
Paul Swartz
paulswartz at gmail dot com
http://paulswartz.net/
AIM: z3penguin
From dlitz@dlitz.net Mon Aug 3 14:35:01 2009
Date: Mon, 3 Aug 2009 14:35:01 -0400
From: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
To: Paul Swartz <paulswartz@gmail.com>
Subject: Re: PyCrypto license clarification
Message-ID: <20090803183501.GA17472@rivest.dlitz.net>
References: <20090803014825.GA1326@rivest.dlitz.net> <324cfb540908030913x71d331f0kb069052f74e5ae6b@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <324cfb540908030913x71d331f0kb069052f74e5ae6b@mail.gmail.com>
X-Primary-Address: dlitz@dlitz.net
X-Homepage: http://www.dlitz.net/
X-OpenPGP: url=http://www.dlitz.net/go/gpgkey/;
id=19E11FE8B3CFF273ED174A24928CEC1339C25CF7 (only for key signing);
preference=unprotected
X-OpenPGP: url=http://www.dlitz.net/go/gpgkey/;
id=4B2AFD82FC7D9E3838D9179F1C11B877E7804B45 (2008);
preference=signencrypt
User-Agent: Mutt/1.5.16 (2007-06-11)
Status: RO
Content-Length: 1250
On Mon, Aug 03, 2009 at 12:13:43PM -0400, Paul Swartz wrote:
>On Sun, Aug 2, 2009 at 9:48 PM, Dwayne C. Litzenberger<dlitz@dlitz.net> wrote:
>> Hi Paul,
>>
>> I am the new maintainer of the Python Cryptography Toolkit, and I am
>> working on a new release at http://www.pycrypto.org/.
>
>That's great!
>
>> I understand that you have made contributions to PyCrypto, under nickname
>> "z3p" and/or other names. May I, on your behalf, dedicate to the public
>> domain all your contributions to PyCrypto, with the following notice?
>>
>> =======================================================================
>> The contents of this file are dedicated to the public domain. To the
>> extent that dedication to the public domain is not available, everyone
>> is granted a worldwide, perpetual, royalty-free, non-exclusive license
>> to exercise all rights associated with the contents of this file for
>> any purpose whatsoever. No rights are reserved.
>> =======================================================================
>
>Yes, that's fine. Good luck with the new release!
Perfect! Thanks for the quick response!
--
Dwayne C. Litzenberger <dlitz@dlitz.net>
Key-signing key - 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7
================================================
FILE: LEGAL/copy/stmts/Robey_Pointer.asc
================================================
Date: Mon, 16 Feb 2009 12:58:00 -0800
From: Robey Pointer <robey@lag.net>
Subject: Re: PyCrypto license clarification
To: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
Received-SPF: pass (goedel.dlitz.net: domain of robey@lag.net designates 69.61.78.186 as permitted sender)
Message-Id: <F469A078-6305-4484-BEA8-F4EC38A4154F@lag.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 23 Nov 2008, at 07:42, Dwayne C. Litzenberger wrote:
> For the next PyCrypto release, I would like to take steps to move
> toward a clearer licensing regime. I am asking as many copyright
> holders as I can find if I can release PyCrypto under something
> clearer and more standard. Below, I have quoted a public domain
> dedication that was recommended in _Intellectual Property and Open
> Source: A Practical Guide to Protecting Code_, by Van Lindberg. I
> have already contacted A. M. Kuchling, and he has approved the
> following dedication for his contributions.
>
> May I, on your behalf, dedicate to the public domain all your
> contributions to PyCrypto, with the following notice?
>
>
> =
> ======================================================================
> The contents of this file are dedicated to the public domain. To
> the
> extent that dedication to the public domain is not available,
> everyone
> is granted a worldwide, perpetual, royalty-free, non-exclusive
> license
> to exercise all rights associated with the contents of this file
> for
> any purpose whatsoever. No rights are reserved.
>
> =
> ======================================================================
>
In case I haven't replied to this yet: Yes, this is fine with me.
robey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkmZ01gACgkQQQDkKvyJ6cOLvQCfQmYYuVODvIlyLg0hgCI9LAbQ
SH8AoLJgaq1lIi7/ZYDc+/Cd8VO0xLbr
=Mv6g
-----END PGP SIGNATURE-----
================================================
FILE: LEGAL/copy/stmts/Wim_Lewis.asc
================================================
Date: Sun, 23 Nov 2008 15:54:35 -0800
From: Wim Lewis <wiml@hhhh.org>
Subject: Re: PyCrypto license clarification
To: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
Cc: Wim Lewis <wiml@hhhh.org>
Message-Id: <9D5C3135-7414-47D7-9D41-0AC6C3A84D97@hhhh.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On November 23, 2008, you wrote:
>Hi Wim,
>
>I am the new maintainer of the Python Cryptography Toolkit, and I am
>working on a new release at http://www.pycrypto.org/.
>
>I understand that you have made contributions to PyCrypto. May I, on
>your behalf, dedicate to the public domain all your contributions to
>PyCrypto, with the following notice?
>
> =======================================================================
> The contents of this file are dedicated to the public domain. To the
> extent that dedication to the public domain is not available, everyone
> is granted a worldwide, perpetual, royalty-free, non-exclusive license
> to exercise all rights associated with the contents of this file for
> any purpose whatsoever. No rights are reserved.
> =======================================================================
Certainly! I think the only code of mine in PyCrypto is the CAST-5 / CAST-128
implementation, which already has a public-domain notice at the top of
the file. But I am happy to have that, any any other code of mine that
might have wandered in there under an unclear open sourcish license,
distributed under the public-domain dedication you quote.
Wim.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)
iQCVAwUBSSnnAl8UnN8n93LBAQLp/gQAhr7x8Av1mstc2kxEJDWTm26PTAZxMz4B
FektbDOzkxgc5580MGGeeX/MVn8aw+1BHg0YD85gsntlDzkcQtb+BR/xAvJ5zKyA
J/Mn/I+I6ekJQ3juh8IPHLAduOXM9Rtguas/yR+Doaq0xOPKoBx+/5+t1lLJtBcZ
wrPEa9Oui9s=
=zSY9
-----END PGP SIGNATURE-----
================================================
FILE: LEGAL/tsu-notify.mbox
================================================
From dlitz@dlitz.net Wed Aug 27 20:54:38 EDT 2008
X-Maildir-Dup-Checked: Yes
Return-Path: <dlitz@dlitz.net>
X-Original-To: dwon@rivest.dlitz.net
Delivered-To: dwon@rivest.dlitz.net
Received: from goedel.dlitz.net (unknown [10.159.255.6])
by rivest.dlitz.net (Postfix) with ESMTP id ECFDFC6641D
for <dwon@rivest.dlitz.net>; Wed, 27 Aug 2008 20:45:06 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
by goedel.dlitz.net (Postfix) with QMQP id 99A9D100AA
for <dwon@rivest.dlitz.net>; Wed, 27 Aug 2008 18:45:05 -0600 (CST)
Received: (vmailmgr-postfix 3270 invoked by uid 1003); 27 Aug 2008 18:45:05 -0600
Delivered-To: m-dlitz-dlitz@dlitz.net
Received-SPF: pass (goedel.dlitz.net: domain of dlitz@dlitz.net designates 193.201.42.13 as permitted sender)
Received: from m14.itconsult.net (m14.itconsult.net [193.201.42.13])
by goedel.dlitz.net (Postfix) with ESMTP id 1D3B510088
for <dlitz@dlitz.net>; Wed, 27 Aug 2008 18:45:04 -0600 (CST)
Received: from stamper.itconsult.co.uk (stamper.itconsult.co.uk
[193.201.42.31]) by m14.stamper.itconsult.co.uk (GMS
15.01.3664/NT8923.00.54dca388) with SMTP id jfxsjqaa for dlitz@dlitz.net;
Thu, 28 Aug 2008 01:45:02 +0100
To: crypt@bis.doc.gov,
enc@nsa.gov,
web_site@bis.doc.gov,
pycrypto@lists.dlitz.net,
PYTHON-CRYPTO@NIC.SURFNET.NL,
dlitz@dlitz.net
Received-SPF: Pass (m14.stamper.itconsult.co.uk: domain of dlitz@dlitz.net
designates 64.5.53.201 as permitted sender) identity=mailfrom;
client-ip=64.5.53.201; receiver=m14.stamper.itconsult.co.uk;
helo=goedel.dlitz.net; mechanism=-all; envelope-from=dlitz@dlitz.net;
Received: from goedel.dlitz.net (goedel.dlitz.net [64.5.53.201]) by
m14.stamper.itconsult.co.uk (GMS 15.01.3664/NT8923.00.54dca388) with ESMTP id
taxsjqaa for post@stamper.itconsult.co.uk; Thu, 28 Aug 2008 01:42:58 +0100
Received: from rivest.dlitz.net (rivest.dlitz.net [IPv6:2002:4c0a:9133:1104::1])
by goedel.dlitz.net (Postfix) with ESMTP id 667C7100B1
for <post@stamper.itconsult.co.uk>; Wed, 27 Aug 2008 18:42:56 -0600 (CST)
Received: by rivest.dlitz.net (Postfix, from userid 1000)
id B92F8C66420; Wed, 27 Aug 2008 20:42:55 -0400 (EDT)
Received: by rivest.dlitz.net (tmda-sendmail, from uid 1000);
Wed, 27 Aug 2008 20:42:54 -0400
Date: Wed, 27 Aug 2008 20:42:54 -0400
Cc: post@stamper.itconsult.co.uk
Subject: PyCrypto TSU NOTIFICATION
Message-ID: <20080828004254.GA31214@rivest.dlitz.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
X-Primary-Address: dlitz@dlitz.net
X-Homepage: http://www.dlitz.net/
X-OpenPGP: url=http://www.dlitz.net/go/gpgkey/;
id=19E11FE8B3CFF273ED174A24928CEC1339C25CF7 (only for key signing);
preference=unprotected
X-OpenPGP: url=http://www.dlitz.net/go/gpgkey/;
id=4B2AFD82FC7D9E3838D9179F1C11B877E7804B45 (2008);
preference=signencrypt
User-Agent: Mutt/1.5.16 (2007-06-11)
X-Delivery-Agent: TMDA/1.1.9 (Jura)
From: "Dwayne C. Litzenberger" <dlitz@dlitz.net>
X-DNSBL: 0
Status: O
Content-Length: 2182
Lines: 65
-----BEGIN PGP SIGNED MESSAGE-----
########################################################
#
# This is a proof of posting certificate from
# stamper.itconsult.co.uk certifying that a user
# claiming to be:-
# dlitz@dlitz.net
# requested that this message be sent to:-
# crypt@bis.doc.gov
# enc@nsa.gov
# web_site@bis.doc.gov
# pycrypto@lists.dlitz.net
# PYTHON-CRYPTO@NIC.SURFNET.NL
# dlitz@dlitz.net
#
# This certificate was issued at 00:45 (GMT)
# on Thursday 28 August 2008 with reference 0520978
#
# CAUTION: while the message may well be from the sender
# indicated in the "From:" header, the sender
# has NOT been authenticated by this service
#
# For information about the Stamper service see
# http://www.itconsult.co.uk/stamper.htm
#
########################################################
SUBMISSION TYPE: TSU
SUBMITTED BY: Dwayne C. Litzenberger
SUBMITTED FOR: Dwayne C. Litzenberger
PO
gitextract_ppwzf27z/ ├── .gitignore ├── .mailmap ├── .travis.yml ├── ACKS ├── COPYRIGHT ├── ChangeLog ├── Doc/ │ ├── AEAD_API.txt │ ├── epydoc-config │ └── pycrypt.rst ├── LEGAL/ │ ├── 00INDEX │ ├── CodeSubmissionRequirements-RevA.txt │ ├── CodeSubmissionRequirements-RevB.txt │ ├── CodeSubmissionRequirements-RevC.txt │ ├── CodeSubmissionRequirements.txt │ ├── copy/ │ │ ├── 00INDEX │ │ ├── LICENSE.libtom │ │ ├── LICENSE.orig │ │ ├── LICENSE.python-2.2 │ │ └── stmts/ │ │ ├── Andrew_M_Kuchling.mbox │ │ ├── Barry_A_Warsaw.mbox │ │ ├── Jeethu_Rao.mbox │ │ ├── Joris_Bontje.mbox │ │ ├── Mark_Moraes.mbox │ │ ├── Paul_Swartz.mbox │ │ ├── Robey_Pointer.asc │ │ └── Wim_Lewis.asc │ └── tsu-notify.mbox ├── MANIFEST.in ├── README.md ├── TODO ├── bootstrap.sh ├── build-aux/ │ ├── compile │ ├── config.guess │ ├── config.sub │ ├── install-sh │ └── missing ├── buildenv.in ├── configure ├── configure.ac ├── lib/ │ └── Crypto/ │ ├── Cipher/ │ │ ├── AES.py │ │ ├── ARC2.py │ │ ├── ARC4.py │ │ ├── Blowfish.py │ │ ├── CAST.py │ │ ├── DES.py │ │ ├── DES3.py │ │ ├── PKCS1_OAEP.py │ │ ├── PKCS1_v1_5.py │ │ ├── XOR.py │ │ ├── __init__.py │ │ └── blockalgo.py │ ├── Hash/ │ │ ├── CMAC.py │ │ ├── HMAC.py │ │ ├── MD5.py │ │ ├── RIPEMD.py │ │ ├── SHA.py │ │ ├── SHA1.py │ │ └── __init__.py │ ├── IO/ │ │ ├── PEM.py │ │ ├── PKCS8.py │ │ ├── _PBES.py │ │ └── __init__.py │ ├── Protocol/ │ │ ├── AllOrNothing.py │ │ ├── Chaffing.py │ │ ├── KDF.py │ │ └── __init__.py │ ├── PublicKey/ │ │ ├── DSA.py │ │ ├── ElGamal.py │ │ ├── RSA.py │ │ ├── _DSA.py │ │ ├── _RSA.py │ │ ├── __init__.py │ │ ├── _slowmath.py │ │ └── pubkey.py │ ├── Random/ │ │ ├── Fortuna/ │ │ │ ├── FortunaAccumulator.py │ │ │ ├── FortunaGenerator.py │ │ │ ├── SHAd256.py │ │ │ └── __init__.py │ │ ├── OSRNG/ │ │ │ ├── __init__.py │ │ │ ├── fallback.py │ │ │ ├── nt.py │ │ │ ├── posix.py │ │ │ └── rng_base.py │ │ ├── _UserFriendlyRNG.py │ │ ├── __init__.py │ │ └── random.py │ ├── SelfTest/ │ │ ├── Cipher/ │ │ │ ├── __init__.py │ │ │ ├── common.py │ │ │ ├── test_AES.py │ │ │ ├── test_ARC2.py │ │ │ ├── test_ARC4.py │ │ │ ├── test_Blowfish.py │ │ │ ├── test_CAST.py │ │ │ ├── test_DES.py │ │ │ ├── test_DES3.py │ │ │ ├── test_XOR.py │ │ │ ├── test_pkcs1_15.py │ │ │ └── test_pkcs1_oaep.py │ │ ├── Hash/ │ │ │ ├── __init__.py │ │ │ ├── common.py │ │ │ ├── test_CMAC.py │ │ │ ├── test_HMAC.py │ │ │ ├── test_MD2.py │ │ │ ├── test_MD4.py │ │ │ ├── test_MD5.py │ │ │ ├── test_RIPEMD160.py │ │ │ ├── test_SHA1.py │ │ │ ├── test_SHA224.py │ │ │ ├── test_SHA256.py │ │ │ ├── test_SHA384.py │ │ │ └── test_SHA512.py │ │ ├── IO/ │ │ │ ├── __init__.py │ │ │ └── test_PKCS8.py │ │ ├── Protocol/ │ │ │ ├── __init__.py │ │ │ ├── test_AllOrNothing.py │ │ │ ├── test_KDF.py │ │ │ ├── test_chaffing.py │ │ │ └── test_rfc1751.py │ │ ├── PublicKey/ │ │ │ ├── __init__.py │ │ │ ├── test_DSA.py │ │ │ ├── test_ElGamal.py │ │ │ ├── test_RSA.py │ │ │ ├── test_import_DSA.py │ │ │ └── test_import_RSA.py │ │ ├── Random/ │ │ │ ├── Fortuna/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_FortunaAccumulator.py │ │ │ │ ├── test_FortunaGenerator.py │ │ │ │ └── test_SHAd256.py │ │ │ ├── OSRNG/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_fallback.py │ │ │ │ ├── test_generic.py │ │ │ │ ├── test_nt.py │ │ │ │ ├── test_posix.py │ │ │ │ └── test_winrandom.py │ │ │ ├── __init__.py │ │ │ ├── test__UserFriendlyRNG.py │ │ │ ├── test_random.py │ │ │ └── test_rpoolcompat.py │ │ ├── Signature/ │ │ │ ├── __init__.py │ │ │ ├── test_pkcs1_15.py │ │ │ └── test_pkcs1_pss.py │ │ ├── Util/ │ │ │ ├── __init__.py │ │ │ ├── test_Counter.py │ │ │ ├── test_Padding.py │ │ │ ├── test_asn1.py │ │ │ ├── test_number.py │ │ │ └── test_winrandom.py │ │ ├── __init__.py │ │ └── st_common.py │ ├── Signature/ │ │ ├── PKCS1_PSS.py │ │ ├── PKCS1_v1_5.py │ │ └── __init__.py │ ├── Util/ │ │ ├── Counter.py │ │ ├── Padding.py │ │ ├── RFC1751.py │ │ ├── __init__.py │ │ ├── _number_new.py │ │ ├── _time.py │ │ ├── asn1.py │ │ ├── number.py │ │ ├── py21compat.py │ │ ├── py3compat.py │ │ ├── randpool.py │ │ └── winrandom.py │ ├── __init__.py │ └── pct_warnings.py ├── m4/ │ ├── ax_append_flag.m4 │ ├── ax_check_compile_flag.m4 │ ├── ax_check_link_flag.m4 │ └── ax_check_preproc_flag.m4 ├── pct-speedtest.py ├── python-3-changes.txt ├── setup.py ├── src/ │ ├── AES.c │ ├── AESNI.c │ ├── ARC2.c │ ├── ARC4.c │ ├── Blowfish-tables.h │ ├── Blowfish.c │ ├── CAST.c │ ├── DES.c │ ├── DES3.c │ ├── MD2.c │ ├── MD4.c │ ├── RIPEMD160.c │ ├── SHA224.c │ ├── SHA256.c │ ├── SHA384.c │ ├── SHA512.c │ ├── XOR.c │ ├── _counter.c │ ├── _counter.h │ ├── _fastmath.c │ ├── block_template.c │ ├── cast5.c │ ├── config.h.in │ ├── cpuid.c │ ├── galois.c │ ├── hash_SHA2.h │ ├── hash_SHA2_template.c │ ├── hash_template.c │ ├── inc-msvc/ │ │ ├── config.h │ │ └── stdint.h │ ├── libtom/ │ │ ├── tomcrypt.h │ │ ├── tomcrypt_argchk.h │ │ ├── tomcrypt_cfg.h │ │ ├── tomcrypt_cipher.h │ │ ├── tomcrypt_custom.h │ │ ├── tomcrypt_des.c │ │ ├── tomcrypt_hash.h │ │ ├── tomcrypt_mac.h │ │ ├── tomcrypt_macros.h │ │ ├── tomcrypt_math.h │ │ ├── tomcrypt_misc.h │ │ ├── tomcrypt_pk.h │ │ ├── tomcrypt_pkcs.h │ │ └── tomcrypt_prng.h │ ├── pycrypto_common.h │ ├── pycrypto_compat.h │ ├── stream_template.c │ ├── strxor.c │ └── winrand.c ├── tools/ │ ├── create-pythons.sh │ └── test-all.sh └── tox.ini
SYMBOL INDEX (1451 symbols across 149 files)
FILE: lib/Crypto/Cipher/AES.py
class AESCipher (line 97) | class AESCipher (blockalgo.BlockAlgo):
method __init__ (line 100) | def __init__(self, key, *args, **kwargs):
function new (line 117) | def new(key, *args, **kwargs):
FILE: lib/Crypto/Cipher/ARC2.py
class RC2Cipher (line 64) | class RC2Cipher (blockalgo.BlockAlgo):
method __init__ (line 67) | def __init__(self, key, *args, **kwargs):
function new (line 73) | def new(key, *args, **kwargs):
FILE: lib/Crypto/Cipher/ARC4.py
class ARC4Cipher (line 69) | class ARC4Cipher:
method __init__ (line 73) | def __init__(self, key, *args, **kwargs):
method encrypt (line 93) | def encrypt(self, plaintext):
method decrypt (line 104) | def decrypt(self, ciphertext):
function new (line 115) | def new(key, *args, **kwargs):
FILE: lib/Crypto/Cipher/Blowfish.py
class BlowfishCipher (line 58) | class BlowfishCipher (blockalgo.BlockAlgo):
method __init__ (line 61) | def __init__(self, key, *args, **kwargs):
function new (line 67) | def new(key, *args, **kwargs):
FILE: lib/Crypto/Cipher/CAST.py
class CAST128Cipher (line 61) | class CAST128Cipher(blockalgo.BlockAlgo):
method __init__ (line 64) | def __init__(self, key, *args, **kwargs):
function new (line 70) | def new(key, *args, **kwargs):
FILE: lib/Crypto/Cipher/DES.py
class DESCipher (line 56) | class DESCipher(blockalgo.BlockAlgo):
method __init__ (line 59) | def __init__(self, key, *args, **kwargs):
function new (line 65) | def new(key, *args, **kwargs):
FILE: lib/Crypto/Cipher/DES3.py
class DES3Cipher (line 69) | class DES3Cipher(blockalgo.BlockAlgo):
method __init__ (line 72) | def __init__(self, key, *args, **kwargs):
function new (line 78) | def new(key, *args, **kwargs):
FILE: lib/Crypto/Cipher/PKCS1_OAEP.py
class PKCS1OAEP_Cipher (line 65) | class PKCS1OAEP_Cipher:
method __init__ (line 68) | def __init__(self, key, hashAlgo, mgfunc, label):
method can_encrypt (line 105) | def can_encrypt(self):
method can_decrypt (line 109) | def can_decrypt(self):
method encrypt (line 113) | def encrypt(self, message):
method decrypt (line 169) | def decrypt(self, ct):
function new (line 231) | def new(key, hashAlgo=None, mgfunc=None, label=b('')):
FILE: lib/Crypto/Cipher/PKCS1_v1_5.py
class PKCS115_Cipher (line 77) | class PKCS115_Cipher:
method __init__ (line 80) | def __init__(self, key):
method can_encrypt (line 90) | def can_encrypt(self):
method can_decrypt (line 94) | def can_decrypt(self):
method encrypt (line 98) | def encrypt(self, message):
method decrypt (line 144) | def decrypt(self, ct, sentinel):
function new (line 216) | def new(key):
FILE: lib/Crypto/Cipher/XOR.py
class XORCipher (line 37) | class XORCipher:
method __init__ (line 40) | def __init__(self, key, *args, **kwargs):
method encrypt (line 48) | def encrypt(self, plaintext):
method decrypt (line 59) | def decrypt(self, ciphertext):
function new (line 70) | def new(key, *args, **kwargs):
FILE: lib/Crypto/Cipher/blockalgo.py
function _getParameter (line 286) | def _getParameter(name, index, args, kwargs, default=None):
class _CBCMAC (line 297) | class _CBCMAC(_SmoothMAC):
method __init__ (line 299) | def __init__(self, key, ciphermod):
method _ignite (line 304) | def _ignite(self, data):
method _update (line 313) | def _update(self, block_data):
method _digest (line 316) | def _digest(self, left_data):
class _GHASH (line 320) | class _GHASH(_SmoothMAC):
method __init__ (line 332) | def __init__(self, hash_subkey, block_size):
method copy (line 338) | def copy(self):
method _update (line 344) | def _update(self, block_data):
method _digest (line 348) | def _digest(self, left_data):
class BlockAlgo (line 352) | class BlockAlgo:
method __init__ (line 355) | def __init__(self, factory, key, *args, **kwargs):
method _start_gcm (line 401) | def _start_gcm(self, factory, key, *args, **kwargs):
method _start_siv (line 452) | def _start_siv(self, factory, key, *args, **kwargs):
method _siv_ctr_cipher (line 471) | def _siv_ctr_cipher(self, tag):
method _start_eax (line 482) | def _start_eax(self, factory, key, *args, **kwargs):
method _start_PGP (line 516) | def _start_PGP(self, factory, key, *args, **kwargs):
method _start_ccm (line 573) | def _start_ccm(self, assoc_len=None, msg_len=None):
method update (line 622) | def update(self, assoc_data):
method encrypt (line 658) | def encrypt(self, plaintext):
method decrypt (line 765) | def decrypt(self, ciphertext):
method digest (line 867) | def digest(self):
method _compute_mac (line 888) | def _compute_mac(self):
method hexdigest (line 927) | def hexdigest(self):
method verify (line 936) | def verify(self, mac_tag):
method hexverify (line 968) | def hexverify(self, hex_mac_tag):
method encrypt_and_digest (line 983) | def encrypt_and_digest(self, plaintext):
method decrypt_and_verify (line 998) | def decrypt_and_verify(self, ciphertext, mac_tag):
FILE: lib/Crypto/Hash/CMAC.py
function _shift_bytes (line 78) | def _shift_bytes(bs, xor_lsb=0):
class _SmoothMAC (line 82) | class _SmoothMAC(object):
method __init__ (line 86) | def __init__(self, block_size, msg=b(""), min_digest=0):
method can_reduce (line 102) | def can_reduce(self):
method get_len (line 105) | def get_len(self):
method zero_pad (line 108) | def zero_pad(self):
method update (line 114) | def update(self, data):
method _deep_copy (line 137) | def _deep_copy(self, target):
method _update (line 143) | def _update(self, data_block):
method _digest (line 148) | def _digest(self, left_data):
method digest (line 154) | def digest(self):
class CMAC (line 163) | class CMAC(_SmoothMAC):
method __init__ (line 169) | def __init__(self, key, msg = None, ciphermod = None):
method update (line 220) | def update(self, msg):
method _update (line 239) | def _update(self, data_block):
method copy (line 242) | def copy(self):
method digest (line 260) | def digest(self):
method _digest (line 272) | def _digest(self, last_data):
method hexdigest (line 281) | def hexdigest(self):
method verify (line 293) | def verify(self, mac_tag):
method hexverify (line 312) | def hexverify(self, hex_mac_tag):
function new (line 325) | def new(key, msg = None, ciphermod = None):
FILE: lib/Crypto/Hash/HMAC.py
class HMAC (line 92) | class HMAC:
method __init__ (line 100) | def __init__(self, key, msg = None, digestmod = None):
method update (line 149) | def update(self, msg):
method copy (line 168) | def copy(self):
method digest (line 184) | def digest(self):
method verify (line 199) | def verify(self, mac_tag):
method hexdigest (line 218) | def hexdigest(self):
method hexverify (line 230) | def hexverify(self, hex_mac_tag):
function new (line 243) | def new(key, msg = None, digestmod = None):
FILE: lib/Crypto/Hash/MD5.py
function __make_constructor (line 48) | def __make_constructor():
FILE: lib/Crypto/Hash/SHA1.py
function __make_constructor (line 48) | def __make_constructor():
FILE: lib/Crypto/Hash/__init__.py
function new (line 62) | def new(algo, *args):
function _md2_new (line 111) | def _md2_new(*args):
function _md4_new (line 118) | def _md4_new(*args):
function _md5_new (line 125) | def _md5_new(*args):
function _ripemd160_new (line 132) | def _ripemd160_new(*args):
function _sha1_new (line 141) | def _sha1_new(*args):
function _sha224_new (line 150) | def _sha224_new(*args):
function _sha256_new (line 157) | def _sha256_new(*args):
function _sha384_new (line 164) | def _sha384_new(*args):
function _sha512_new (line 171) | def _sha512_new(*args):
FILE: lib/Crypto/IO/PEM.py
function encode (line 49) | def encode(data, marker, passphrase=None, randfunc=None):
function decode (line 96) | def decode(pem_data, passphrase=None):
FILE: lib/Crypto/IO/PKCS8.py
function decode_der (line 62) | def decode_der(obj_class, binstr):
function wrap (line 70) | def wrap(private_key, key_oid, passphrase=None, protection=None,
function unwrap (line 154) | def unwrap(p8_private_key, passphrase=None):
FILE: lib/Crypto/IO/_PBES.py
function decode_der (line 74) | def decode_der(obj_class, binstr):
class PBES1 (line 82) | class PBES1(object):
method decrypt (line 89) | def decrypt(data, passphrase):
class PBES2 (line 149) | class PBES2(object):
method encrypt (line 155) | def encrypt(data, passphrase, protection, prot_params=None, randfunc=N...
method decrypt (line 258) | def decrypt(data, passphrase):
FILE: lib/Crypto/Protocol/AllOrNothing.py
function isInt (line 52) | def isInt(x):
class AllOrNothing (line 60) | class AllOrNothing:
method __init__ (line 72) | def __init__(self, ciphermodule, mode=None, IV=None):
method digest (line 95) | def digest(self, text):
method undigest (line 177) | def undigest(self, blocks):
method _inventkey (line 231) | def _inventkey(self, key_size):
method __newcipher (line 236) | def __newcipher(self, key):
function usage (line 272) | def usage(code, msg=None):
FILE: lib/Crypto/Protocol/Chaffing.py
class Chaff (line 74) | class Chaff:
method __init__ (line 90) | def __init__(self, factor=1.0, blocksper=1):
method chaff (line 117) | def chaff(self, blocks):
method _randnum (line 171) | def _randnum(self, size):
FILE: lib/Crypto/Protocol/KDF.py
function PBKDF1 (line 50) | def PBKDF1(password, salt, dkLen, count=1000, hashAlgo=None):
function PBKDF2 (line 91) | def PBKDF2(password, salt, dkLen=16, count=1000, prf=None):
class _S2V (line 129) | class _S2V(object):
method __init__ (line 138) | def __init__(self, key, ciphermod):
method new (line 154) | def new(key, ciphermod):
method _double (line 167) | def _double(self, bs):
method update (line 173) | def update(self, item):
method derive (line 197) | def derive(self):
FILE: lib/Crypto/PublicKey/DSA.py
function decode_der (line 111) | def decode_der(obj_class, binstr):
class _DSAobj (line 146) | class _DSAobj(pubkey.pubkey):
method __init__ (line 165) | def __init__(self, implementation, key, randfunc=None):
method __getattr__ (line 172) | def __getattr__(self, attrname):
method sign (line 180) | def sign(self, M, K):
method verify (line 211) | def verify(self, M, signature):
method _encrypt (line 224) | def _encrypt(self, c, K):
method _decrypt (line 227) | def _decrypt(self, c):
method _blind (line 230) | def _blind(self, m, r):
method _unblind (line 233) | def _unblind(self, m, r):
method _sign (line 236) | def _sign(self, m, k):
method _verify (line 240) | def _verify(self, m, sig):
method has_private (line 244) | def has_private(self):
method size (line 247) | def size(self):
method can_blind (line 250) | def can_blind(self):
method can_encrypt (line 253) | def can_encrypt(self):
method can_sign (line 256) | def can_sign(self):
method publickey (line 259) | def publickey(self):
method __getstate__ (line 262) | def __getstate__(self):
method __setstate__ (line 271) | def __setstate__(self, d):
method __repr__ (line 283) | def __repr__(self):
method exportKey (line 295) | def exportKey(self, format='PEM', pkcs8=None, passphrase=None,
class DSAImplementation (line 413) | class DSAImplementation(object):
method __init__ (line 421) | def __init__(self, **kwargs):
method _get_randfunc (line 463) | def _get_randfunc(self, randfunc):
method generate (line 470) | def generate(self, bits, randfunc=None, progress_func=None):
method _generate (line 513) | def _generate(self, bits, randfunc=None, progress_func=None):
method construct (line 519) | def construct(self, tup):
method _importKeyDER (line 547) | def _importKeyDER(self, key_data, passphrase=None, params=None):
method importKey (line 602) | def importKey(self, extern_key, passphrase=None):
FILE: lib/Crypto/PublicKey/ElGamal.py
class error (line 116) | class error (Exception):
function generate (line 120) | def generate(bits, randfunc, progress_func=None):
function construct (line 194) | def construct(tup):
class ElGamalobj (line 227) | class ElGamalobj(pubkey):
method __init__ (line 246) | def __init__(self, randfunc=None):
method encrypt (line 251) | def encrypt(self, plaintext, K):
method decrypt (line 278) | def decrypt(self, ciphertext):
method sign (line 290) | def sign(self, M, K):
method verify (line 319) | def verify(self, M, signature):
method _encrypt (line 332) | def _encrypt(self, M, K):
method _decrypt (line 337) | def _decrypt(self, M):
method _sign (line 347) | def _sign(self, M, K):
method _verify (line 359) | def _verify(self, M, sig):
method size (line 369) | def size(self):
method has_private (line 372) | def has_private(self):
method publickey (line 378) | def publickey(self):
FILE: lib/Crypto/PublicKey/RSA.py
function decode_der (line 94) | def decode_der(obj_class, binstr):
class _RSAobj (line 101) | class _RSAobj(pubkey.pubkey):
method __init__ (line 121) | def __init__(self, implementation, key, randfunc=None):
method __getattr__ (line 128) | def __getattr__(self, attrname):
method encrypt (line 136) | def encrypt(self, plaintext, K):
method decrypt (line 160) | def decrypt(self, ciphertext):
method sign (line 184) | def sign(self, M, K):
method verify (line 209) | def verify(self, M, signature):
method _encrypt (line 231) | def _encrypt(self, c, K):
method _decrypt (line 236) | def _decrypt(self, c):
method _blind (line 256) | def _blind(self, m, r):
method _unblind (line 259) | def _unblind(self, m, r):
method _sign (line 262) | def _sign(self, m, K=None):
method _verify (line 265) | def _verify(self, m, sig):
method has_private (line 272) | def has_private(self):
method size (line 275) | def size(self):
method can_blind (line 278) | def can_blind(self):
method can_encrypt (line 281) | def can_encrypt(self):
method can_sign (line 284) | def can_sign(self):
method publickey (line 287) | def publickey(self):
method __getstate__ (line 290) | def __getstate__(self):
method __setstate__ (line 299) | def __setstate__(self, d):
method __repr__ (line 311) | def __repr__(self):
method exportKey (line 323) | def exportKey(self, format='PEM', passphrase=None, pkcs=1, protection=...
class RSAImplementation (line 443) | class RSAImplementation(object):
method __init__ (line 453) | def __init__(self, **kwargs):
method _get_randfunc (line 492) | def _get_randfunc(self, randfunc):
method generate (line 499) | def generate(self, bits, randfunc=None, progress_func=None, e=65537):
method construct (line 550) | def construct(self, tup):
method _importKeyDER (line 580) | def _importKeyDER(self, extern_key, passphrase=None):
method importKey (line 629) | def importKey(self, extern_key, passphrase=None):
FILE: lib/Crypto/PublicKey/_DSA.py
class error (line 36) | class error (Exception):
function generateQ (line 39) | def generateQ(randfunc):
function generate_py (line 57) | def generate_py(bits, randfunc, progress_func=None):
class DSAobj (line 113) | class DSAobj:
FILE: lib/Crypto/PublicKey/_RSA.py
function generate_py (line 32) | def generate_py(bits, randfunc, progress_func=None, e=65537):
class RSAobj (line 74) | class RSAobj(pubkey.pubkey):
method size (line 76) | def size(self):
FILE: lib/Crypto/PublicKey/_slowmath.py
class error (line 37) | class error(Exception):
class _RSAKey (line 40) | class _RSAKey(object):
method _blind (line 41) | def _blind(self, m, r):
method _unblind (line 45) | def _unblind(self, m, r):
method _decrypt (line 49) | def _decrypt(self, c):
method _encrypt (line 63) | def _encrypt(self, m):
method _sign (line 67) | def _sign(self, m): # alias for _decrypt
method _verify (line 72) | def _verify(self, m, sig):
method has_private (line 75) | def has_private(self):
method size (line 78) | def size(self):
function rsa_construct (line 82) | def rsa_construct(n, e, d=None, p=None, q=None, u=None):
class _DSAKey (line 142) | class _DSAKey(object):
method size (line 143) | def size(self):
method has_private (line 147) | def has_private(self):
method _sign (line 150) | def _sign(self, m, k, blind): # alias for _decrypt
method _verify (line 162) | def _verify(self, m, r, s):
function dsa_construct (line 172) | def dsa_construct(y, g, p, q, x=None):
FILE: lib/Crypto/PublicKey/pubkey.py
class pubkey (line 33) | class pubkey:
method __init__ (line 38) | def __init__(self):
method __getstate__ (line 41) | def __getstate__(self):
method __setstate__ (line 51) | def __setstate__(self, d):
method encrypt (line 58) | def encrypt(self, plaintext, K):
method decrypt (line 79) | def decrypt(self, ciphertext):
method sign (line 97) | def sign(self, M, K):
method verify (line 114) | def verify (self, M, signature):
method validate (line 129) | def validate (self, M, signature):
method blind (line 133) | def blind(self, M, B):
method unblind (line 152) | def unblind(self, M, B):
method can_sign (line 173) | def can_sign (self):
method can_encrypt (line 184) | def can_encrypt (self):
method can_blind (line 195) | def can_blind (self):
method size (line 209) | def size (self):
method has_private (line 216) | def has_private (self):
method publickey (line 223) | def publickey (self):
method __eq__ (line 230) | def __eq__ (self, other):
method __ne__ (line 236) | def __ne__ (self, other):
FILE: lib/Crypto/Random/Fortuna/FortunaAccumulator.py
class FortunaPool (line 44) | class FortunaPool(object):
method __init__ (line 57) | def __init__(self):
method append (line 60) | def append(self, data):
method digest (line 64) | def digest(self):
method hexdigest (line 67) | def hexdigest(self):
method reset (line 73) | def reset(self):
function which_pools (line 77) | def which_pools(r):
class FortunaAccumulator (line 98) | class FortunaAccumulator(object):
method __init__ (line 120) | def __init__(self):
method _forget_last_reseed (line 132) | def _forget_last_reseed(self):
method random_data (line 141) | def random_data(self, bytes):
method _reseed (line 153) | def _reseed(self, current_time=None):
method add_random_event (line 166) | def add_random_event(self, source_number, pool_number, data):
FILE: lib/Crypto/Random/Fortuna/FortunaGenerator.py
class AESGenerator (line 40) | class AESGenerator(object):
method __init__ (line 65) | def __init__(self):
method reseed (line 78) | def reseed(self, seed):
method pseudo_random_data (line 86) | def pseudo_random_data(self, bytes):
method _set_key (line 99) | def _set_key(self, key):
method _pseudo_random_data (line 103) | def _pseudo_random_data(self, bytes):
method _generate_blocks (line 121) | def _generate_blocks(self, num_blocks):
FILE: lib/Crypto/Random/Fortuna/SHAd256.py
class _SHAd256 (line 45) | class _SHAd256(object):
method __init__ (line 55) | def __init__(self, internal_api_check, sha256_hash_obj):
method copy (line 61) | def copy(self):
method digest (line 66) | def digest(self):
method hexdigest (line 73) | def hexdigest(self):
method update (line 83) | def update(self, data):
function new (line 90) | def new(data=None):
FILE: lib/Crypto/Random/OSRNG/fallback.py
class PythonOSURandomRNG (line 32) | class PythonOSURandomRNG(BaseRNG):
method __init__ (line 36) | def __init__(self):
method _close (line 40) | def _close(self):
function new (line 43) | def new(*args, **kwargs):
FILE: lib/Crypto/Random/OSRNG/nt.py
class WindowsRNG (line 31) | class WindowsRNG(BaseRNG):
method __init__ (line 35) | def __init__(self):
method flush (line 39) | def flush(self):
method _close (line 58) | def _close(self):
method _read (line 61) | def _read(self, N):
function new (line 71) | def new(*args, **kwargs):
FILE: lib/Crypto/Random/OSRNG/posix.py
class DevURandomRNG (line 35) | class DevURandomRNG(BaseRNG):
method __init__ (line 37) | def __init__(self, devname=None):
method _close (line 54) | def _close(self):
method _read (line 57) | def _read(self, N):
function new (line 82) | def new(*args, **kwargs):
FILE: lib/Crypto/Random/OSRNG/rng_base.py
class BaseRNG (line 30) | class BaseRNG(object):
method __init__ (line 32) | def __init__(self):
method __del__ (line 36) | def __del__(self):
method _selftest (line 39) | def _selftest(self):
method __enter__ (line 52) | def __enter__(self):
method __exit__ (line 54) | def __exit__(self):
method close (line 58) | def close(self):
method flush (line 63) | def flush(self):
method read (line 66) | def read(self, N=-1):
method _close (line 81) | def _close(self):
method _read (line 84) | def _read(self, N):
FILE: lib/Crypto/Random/_UserFriendlyRNG.py
class _EntropySource (line 40) | class _EntropySource(object):
method __init__ (line 41) | def __init__(self, accumulator, src_num):
method feed (line 46) | def feed(self, data):
class _EntropyCollector (line 50) | class _EntropyCollector(object):
method __init__ (line 52) | def __init__(self, accumulator):
method reinit (line 58) | def reinit(self):
method collect (line 68) | def collect(self):
class _UserFriendlyRNG (line 81) | class _UserFriendlyRNG(object):
method __init__ (line 83) | def __init__(self):
method reinit (line 89) | def reinit(self):
method close (line 111) | def close(self):
method flush (line 116) | def flush(self):
method read (line 119) | def read(self, N):
method _check_pid (line 142) | def _check_pid(self):
class _LockingUserFriendlyRNG (line 156) | class _LockingUserFriendlyRNG(_UserFriendlyRNG):
method __init__ (line 157) | def __init__(self):
method close (line 161) | def close(self):
method reinit (line 168) | def reinit(self):
method read (line 175) | def read(self, bytes):
class RNGFile (line 182) | class RNGFile(object):
method __init__ (line 183) | def __init__(self, singleton):
method __enter__ (line 188) | def __enter__(self):
method __exit__ (line 190) | def __exit__(self):
method close (line 194) | def close(self):
method read (line 199) | def read(self, bytes):
method flush (line 204) | def flush(self):
function _get_singleton (line 210) | def _get_singleton():
function new (line 220) | def new():
function reinit (line 223) | def reinit():
function get_random_bytes (line 226) | def get_random_bytes(n):
FILE: lib/Crypto/Random/__init__.py
function new (line 31) | def new(*args, **kwargs):
function atfork (line 35) | def atfork():
function get_random_bytes (line 39) | def get_random_bytes(n):
FILE: lib/Crypto/Random/random.py
class StrongRandom (line 35) | class StrongRandom(object):
method __init__ (line 36) | def __init__(self, rng=None, randfunc=None):
method getrandbits (line 46) | def getrandbits(self, k):
method randrange (line 53) | def randrange(self, *args):
method randint (line 87) | def randint(self, a, b):
method choice (line 95) | def choice(self, seq):
method shuffle (line 104) | def shuffle(self, x):
method sample (line 114) | def sample(self, population, k):
FILE: lib/Crypto/SelfTest/Cipher/__init__.py
function get_tests (line 29) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Cipher/common.py
function dict (line 45) | def dict(**kwargs):
class _NoDefault (line 50) | class _NoDefault: pass # sentinel object
function _extract (line 51) | def _extract(d, k, default=_NoDefault):
class CipherSelfTest (line 63) | class CipherSelfTest(unittest.TestCase):
method __init__ (line 65) | def __init__(self, module, params):
method shortDescription (line 104) | def shortDescription(self):
method _new (line 107) | def _new(self, do_decryption=0):
method isMode (line 135) | def isMode(self, name):
method runTest (line 140) | def runTest(self):
class CipherStreamingSelfTest (line 190) | class CipherStreamingSelfTest(CipherSelfTest):
method shortDescription (line 192) | def shortDescription(self):
method runTest (line 198) | def runTest(self):
class CTRSegfaultTest (line 221) | class CTRSegfaultTest(unittest.TestCase):
method __init__ (line 223) | def __init__(self, module, params):
method shortDescription (line 229) | def shortDescription(self):
method runTest (line 232) | def runTest(self):
class CTRWraparoundTest (line 235) | class CTRWraparoundTest(unittest.TestCase):
method __init__ (line 237) | def __init__(self, module, params):
method shortDescription (line 243) | def shortDescription(self):
method runTest (line 246) | def runTest(self):
class CFBSegmentSizeTest (line 282) | class CFBSegmentSizeTest(unittest.TestCase):
method __init__ (line 284) | def __init__(self, module, params):
method shortDescription (line 290) | def shortDescription(self):
method runTest (line 293) | def runTest(self):
class CCMMACLengthTest (line 299) | class CCMMACLengthTest(unittest.TestCase):
method __init__ (line 302) | def __init__(self, module):
method shortDescription (line 308) | def shortDescription(self):
method runTest (line 311) | def runTest(self):
class CCMSplitEncryptionTest (line 325) | class CCMSplitEncryptionTest(unittest.TestCase):
method __init__ (line 330) | def __init__(self, module):
method shortDescription (line 337) | def shortDescription(self):
method runTest (line 340) | def runTest(self):
class AEADTests (line 392) | class AEADTests(unittest.TestCase):
method __init__ (line 395) | def __init__(self, module, mode_name, key_size):
method isMode (line 407) | def isMode(self, name):
method right_mac_test (line 412) | def right_mac_test(self):
method wrong_mac_test (line 436) | def wrong_mac_test(self):
method zero_data (line 458) | def zero_data(self):
method multiple_updates (line 466) | def multiple_updates(self):
method no_mix_encrypt_decrypt (line 510) | def no_mix_encrypt_decrypt(self):
method no_late_update (line 542) | def no_late_update(self):
method loopback (line 562) | def loopback(self):
method runTest (line 582) | def runTest(self):
method shortDescription (line 591) | def shortDescription(self):
class RoundtripTest (line 594) | class RoundtripTest(unittest.TestCase):
method __init__ (line 595) | def __init__(self, module, params):
method shortDescription (line 604) | def shortDescription(self):
method runTest (line 607) | def runTest(self):
class PGPTest (line 636) | class PGPTest(unittest.TestCase):
method __init__ (line 637) | def __init__(self, module, params):
method shortDescription (line 642) | def shortDescription(self):
method runTest (line 645) | def runTest(self):
class IVLengthTest (line 649) | class IVLengthTest(unittest.TestCase):
method __init__ (line 650) | def __init__(self, module, params):
method shortDescription (line 655) | def shortDescription(self):
method runTest (line 658) | def runTest(self):
method _dummy_counter (line 674) | def _dummy_counter(self):
function make_block_tests (line 677) | def make_block_tests(module, module_name, test_data, additional_params=d...
function make_stream_tests (line 772) | def make_stream_tests(module, module_name, test_data):
FILE: lib/Crypto/SelfTest/Cipher/test_AES.py
function get_tests (line 1997) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Cipher/test_ARC2.py
class BufferOverflowTest (line 97) | class BufferOverflowTest(unittest.TestCase):
method setUp (line 100) | def setUp(self):
method runTest (line 104) | def runTest(self):
function get_tests (line 110) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Cipher/test_ARC4.py
class RFC6229_Tests (line 75) | class RFC6229_Tests(unittest.TestCase):
method test_keystream (line 412) | def test_keystream(self):
class Drop_Tests (line 426) | class Drop_Tests(unittest.TestCase):
method setUp (line 430) | def setUp(self):
method test_drop256_encrypt (line 433) | def test_drop256_encrypt(self):
method test_drop256_decrypt (line 439) | def test_drop256_decrypt(self):
function get_tests (line 445) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Cipher/test_Blowfish.py
function get_tests (line 103) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Cipher/test_CAST.py
function get_tests (line 47) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Cipher/test_DES.py
class RonRivestTest (line 290) | class RonRivestTest(unittest.TestCase):
method runTest (line 312) | def runTest(self):
function get_tests (line 329) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Cipher/test_DES3.py
function get_tests (line 323) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Cipher/test_XOR.py
class TruncationSelfTest (line 53) | class TruncationSelfTest(unittest.TestCase):
method runTest (line 55) | def runTest(self):
function get_tests (line 61) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py
function rws (line 34) | def rws(t):
function t2b (line 40) | def t2b(t):
class PKCS1_15_Tests (line 48) | class PKCS1_15_Tests(unittest.TestCase):
method setUp (line 50) | def setUp(self):
method testEncrypt1 (line 105) | def testEncrypt1(self):
method testEncrypt2 (line 125) | def testEncrypt2(self):
method testVerify1 (line 131) | def testVerify1(self):
method testVerify2 (line 140) | def testVerify2(self):
method testEncryptVerify1 (line 154) | def testEncryptVerify1(self):
function get_tests (line 165) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py
function rws (line 37) | def rws(t):
function t2b (line 43) | def t2b(t):
class PKCS1_OAEP_Tests (line 50) | class PKCS1_OAEP_Tests(unittest.TestCase):
method setUp (line 52) | def setUp(self):
method testEncrypt1 (line 268) | def testEncrypt1(self):
method testEncrypt2 (line 290) | def testEncrypt2(self):
method testDecrypt1 (line 296) | def testDecrypt1(self):
method testDecrypt2 (line 307) | def testDecrypt2(self):
method testEncryptDecrypt1 (line 313) | def testEncryptDecrypt1(self):
method testEncryptDecrypt2 (line 322) | def testEncryptDecrypt2(self):
method testEncryptDecrypt3 (line 341) | def testEncryptDecrypt3(self):
method testEncryptDecrypt4 (line 349) | def testEncryptDecrypt4(self):
function get_tests (line 364) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/__init__.py
function get_tests (line 29) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/common.py
function dict (line 41) | def dict(**kwargs):
class HashDigestSizeSelfTest (line 49) | class HashDigestSizeSelfTest(unittest.TestCase):
method __init__ (line 51) | def __init__(self, hashmod, description, expected):
method shortDescription (line 57) | def shortDescription(self):
method runTest (line 60) | def runTest(self):
class HashSelfTest (line 68) | class HashSelfTest(unittest.TestCase):
method __init__ (line 70) | def __init__(self, hashmod, description, expected, input):
method shortDescription (line 77) | def shortDescription(self):
method runTest (line 80) | def runTest(self):
class HashTestOID (line 124) | class HashTestOID(unittest.TestCase):
method __init__ (line 125) | def __init__(self, hashmod, oid):
method runTest (line 130) | def runTest(self):
class HashDocStringTest (line 135) | class HashDocStringTest(unittest.TestCase):
method __init__ (line 136) | def __init__(self, hashmod):
method runTest (line 140) | def runTest(self):
class GenericHashConstructorTest (line 146) | class GenericHashConstructorTest(unittest.TestCase):
method __init__ (line 147) | def __init__(self, hashmod):
method runTest (line 151) | def runTest(self):
class MACSelfTest (line 165) | class MACSelfTest(unittest.TestCase):
method __init__ (line 167) | def __init__(self, module, description, result, input, key, params):
method shortDescription (line 176) | def shortDescription(self):
method runTest (line 179) | def runTest(self):
function make_hash_tests (line 232) | def make_hash_tests(module, module_name, test_data, digest_size, oid=None):
function make_mac_tests (line 252) | def make_mac_tests(module, module_name, test_data):
FILE: lib/Crypto/SelfTest/Hash/test_CMAC.py
function get_tests (line 233) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/test_HMAC.py
function get_tests (line 206) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/test_MD2.py
function get_tests (line 52) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/test_MD4.py
function get_tests (line 52) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/test_MD5.py
function get_tests (line 52) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/test_RIPEMD160.py
function get_tests (line 61) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/test_SHA1.py
function get_tests (line 52) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/test_SHA224.py
function get_tests (line 53) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/test_SHA256.py
class LargeSHA256Test (line 32) | class LargeSHA256Test(unittest.TestCase):
method runTest (line 33) | def runTest(self):
function get_tests (line 51) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/test_SHA384.py
function get_tests (line 51) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Hash/test_SHA512.py
function get_tests (line 48) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/IO/__init__.py
function get_tests (line 24) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/IO/test_PKCS8.py
function txt2bin (line 337) | def txt2bin(inputs):
class Rng (line 341) | class Rng:
method __init__ (line 342) | def __init__(self, output):
method __call__ (line 345) | def __call__(self, n):
class PKCS8_Decrypt (line 350) | class PKCS8_Decrypt(unittest.TestCase):
method setUp (line 352) | def setUp(self):
method test1 (line 368) | def test1(self):
method test2 (line 374) | def test2(self):
method test3 (line 383) | def test3(self):
method test4 (line 391) | def test4(self):
function get_tests (line 409) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Protocol/__init__.py
function get_tests (line 29) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Protocol/test_AllOrNothing.py
class AllOrNothingTest (line 51) | class AllOrNothingTest (unittest.TestCase):
method runTest (line 53) | def runTest(self):
function get_tests (line 72) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Protocol/test_KDF.py
function t2b (line 36) | def t2b(t): return unhexlify(b(t))
class PBKDF1_Tests (line 38) | class PBKDF1_Tests(unittest.TestCase):
method test1 (line 52) | def test1(self):
class PBKDF2_Tests (line 57) | class PBKDF2_Tests(unittest.TestCase):
method test1 (line 78) | def test1(self):
class S2V_Tests (line 91) | class S2V_Tests(unittest.TestCase):
method test1 (line 127) | def test1(self):
method test2 (line 136) | def test2(self):
function get_tests (line 147) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Protocol/test_chaffing.py
class ChaffingTest (line 50) | class ChaffingTest (unittest.TestCase):
method runTest (line 52) | def runTest(self):
function get_tests (line 70) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Protocol/test_rfc1751.py
class RFC1751Test_k2e (line 40) | class RFC1751Test_k2e (unittest.TestCase):
method runTest (line 42) | def runTest (self):
class RFC1751Test_e2k (line 48) | class RFC1751Test_e2k (unittest.TestCase):
method runTest (line 50) | def runTest (self):
function get_tests (line 58) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/PublicKey/__init__.py
function get_tests (line 31) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/PublicKey/test_DSA.py
function _sws (line 38) | def _sws(s):
class DSATest (line 45) | class DSATest(unittest.TestCase):
method setUp (line 75) | def setUp(self):
method test_generate_1arg (line 83) | def test_generate_1arg(self):
method test_generate_2arg (line 90) | def test_generate_2arg(self):
method test_construct_4tuple (line 97) | def test_construct_4tuple(self):
method test_construct_5tuple (line 103) | def test_construct_5tuple(self):
method _check_private_key (line 110) | def _check_private_key(self, dsaObj):
method _check_public_key (line 131) | def _check_public_key(self, dsaObj):
method _test_signing (line 163) | def _test_signing(self, dsaObj):
method _test_verification (line 171) | def _test_verification(self, dsaObj):
class DSAFastMathTest (line 178) | class DSAFastMathTest(DSATest):
method setUp (line 179) | def setUp(self):
method test_generate_1arg (line 183) | def test_generate_1arg(self):
method test_generate_2arg (line 187) | def test_generate_2arg(self):
method test_construct_4tuple (line 191) | def test_construct_4tuple(self):
method test_construct_5tuple (line 195) | def test_construct_5tuple(self):
class DSASlowMathTest (line 199) | class DSASlowMathTest(DSATest):
method setUp (line 200) | def setUp(self):
method test_generate_1arg (line 204) | def test_generate_1arg(self):
method test_generate_2arg (line 208) | def test_generate_2arg(self):
method test_construct_4tuple (line 212) | def test_construct_4tuple(self):
method test_construct_5tuple (line 216) | def test_construct_5tuple(self):
function get_tests (line 221) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/PublicKey/test_ElGamal.py
class ElGamalTest (line 34) | class ElGamalTest(unittest.TestCase):
method test_generate_128 (line 96) | def test_generate_128(self):
method test_generate_512 (line 99) | def test_generate_512(self):
method test_encryption (line 102) | def test_encryption(self):
method test_decryption (line 111) | def test_decryption(self):
method test_signing (line 119) | def test_signing(self):
method test_verification (line 128) | def test_verification(self):
method convert_tv (line 140) | def convert_tv(self, tv, as_longs=0):
method _test_random_key (line 155) | def _test_random_key(self, bits):
method _check_private_key (line 163) | def _check_private_key(self, elgObj):
method _check_public_key (line 176) | def _check_public_key(self, elgObj):
method _exercise_primitive (line 187) | def _exercise_primitive(self, elgObj):
method _exercise_public_primitive (line 198) | def _exercise_public_primitive(self, elgObj):
function get_tests (line 202) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/PublicKey/test_RSA.py
class RSATest (line 39) | class RSATest(unittest.TestCase):
method setUp (line 106) | def setUp(self):
method test_generate_1arg (line 121) | def test_generate_1arg(self):
method test_generate_2arg (line 130) | def test_generate_2arg(self):
method test_generate_3args (line 139) | def test_generate_3args(self):
method test_construct_2tuple (line 148) | def test_construct_2tuple(self):
method test_construct_3tuple (line 155) | def test_construct_3tuple(self):
method test_construct_4tuple (line 163) | def test_construct_4tuple(self):
method test_construct_5tuple (line 171) | def test_construct_5tuple(self):
method test_construct_6tuple (line 180) | def test_construct_6tuple(self):
method test_factoring (line 189) | def test_factoring(self):
method test_serialization (line 197) | def test_serialization(self):
method test_serialization_compat (line 214) | def test_serialization_compat(self):
method test_raw_rsa_boundary (line 222) | def test_raw_rsa_boundary(self):
method _check_private_key (line 233) | def _check_private_key(self, rsaObj):
method _check_public_key (line 257) | def _check_public_key(self, rsaObj):
method _exercise_primitive (line 291) | def _exercise_primitive(self, rsaObj):
method _exercise_public_primitive (line 318) | def _exercise_public_primitive(self, rsaObj):
method _check_encryption (line 327) | def _check_encryption(self, rsaObj):
method _check_decryption (line 335) | def _check_decryption(self, rsaObj):
method _check_verification (line 350) | def _check_verification(self, rsaObj):
method _check_signing (line 364) | def _check_signing(self, rsaObj):
class RSAFastMathTest (line 371) | class RSAFastMathTest(RSATest):
method setUp (line 372) | def setUp(self):
method test_generate_1arg (line 376) | def test_generate_1arg(self):
method test_generate_2arg (line 380) | def test_generate_2arg(self):
method test_construct_2tuple (line 384) | def test_construct_2tuple(self):
method test_construct_3tuple (line 388) | def test_construct_3tuple(self):
method test_construct_4tuple (line 392) | def test_construct_4tuple(self):
method test_construct_5tuple (line 396) | def test_construct_5tuple(self):
method test_construct_6tuple (line 400) | def test_construct_6tuple(self):
method test_factoring (line 404) | def test_factoring(self):
method test_serialization (line 408) | def test_serialization(self):
method test_serialization_compat (line 415) | def test_serialization_compat(self):
class RSASlowMathTest (line 421) | class RSASlowMathTest(RSATest):
method setUp (line 422) | def setUp(self):
method test_generate_1arg (line 426) | def test_generate_1arg(self):
method test_generate_2arg (line 430) | def test_generate_2arg(self):
method test_construct_2tuple (line 434) | def test_construct_2tuple(self):
method test_construct_3tuple (line 438) | def test_construct_3tuple(self):
method test_construct_4tuple (line 442) | def test_construct_4tuple(self):
method test_construct_5tuple (line 446) | def test_construct_5tuple(self):
method test_construct_6tuple (line 450) | def test_construct_6tuple(self):
method test_factoring (line 454) | def test_factoring(self):
method test_serialization (line 457) | def test_serialization(self):
method test_serialization_compat (line 463) | def test_serialization_compat(self):
function get_tests (line 468) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/PublicKey/test_import_DSA.py
class ImportKeyTests (line 31) | class ImportKeyTests(unittest.TestCase):
method setUp (line 39) | def setUp(self):
method testImportKey1 (line 67) | def testImportKey1(self):
method testExportKey1 (line 75) | def testExportKey1(self):
method testImportKey2 (line 96) | def testImportKey2(self):
method testExportKey2 (line 105) | def testExportKey2(self):
method testImportKey3 (line 128) | def testImportKey3(self):
method testExportKey3 (line 137) | def testExportKey3(self):
method testImportKey4 (line 158) | def testImportKey4(self):
method testExportKey4 (line 168) | def testExportKey4(self):
method testImportKey5 (line 188) | def testImportKey5(self):
method testExportKey5 (line 197) | def testExportKey5(self):
method testImportKey6 (line 217) | def testImportKey6(self):
method testExportKey6 (line 227) | def testExportKey6(self):
method testImportKey7 (line 238) | def testImportKey7(self):
method testExportKey7 (line 247) | def testExportKey7(self):
method testImportKey8 (line 271) | def testImportKey8(self):
method testExportKey8 (line 281) | def testExportKey8(self):
method testImportKey9 (line 306) | def testImportKey9(self):
method testImportKey10 (line 336) | def testImportKey10(self):
method testExportKey10 (line 345) | def testExportKey10(self):
method testImportError1 (line 355) | def testImportError1(self):
method testExportError2 (line 358) | def testExportError2(self):
class ImportKeyTestsSlow (line 363) | class ImportKeyTestsSlow(ImportKeyTests):
method setUp (line 364) | def setUp(self):
class ImportKeyTestsFast (line 368) | class ImportKeyTestsFast(ImportKeyTests):
method setUp (line 369) | def setUp(self):
function get_tests (line 376) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/PublicKey/test_import_RSA.py
function der2pem (line 35) | def der2pem(der, text='PUBLIC'):
class ImportKeyTests (line 43) | class ImportKeyTests(unittest.TestCase):
method testImportKey1 (line 157) | def testImportKey1(self):
method testImportKey2 (line 167) | def testImportKey2(self):
method testImportKey3unicode (line 174) | def testImportKey3unicode(self):
method testImportKey3bytes (line 184) | def testImportKey3bytes(self):
method testImportKey4unicode (line 194) | def testImportKey4unicode(self):
method testImportKey4bytes (line 201) | def testImportKey4bytes(self):
method testImportKey5 (line 208) | def testImportKey5(self):
method testImportKey6 (line 214) | def testImportKey6(self):
method testImportKey7 (line 220) | def testImportKey7(self):
method testImportKey8 (line 226) | def testImportKey8(self):
method testImportKey9 (line 237) | def testImportKey9(self):
method testImportKey10 (line 247) | def testImportKey10(self):
method testImportKey11 (line 257) | def testImportKey11(self):
method testImportKey12 (line 264) | def testImportKey12(self):
method testExportKey1 (line 273) | def testExportKey1(self):
method testExportKey2 (line 278) | def testExportKey2(self):
method testExportKey3 (line 283) | def testExportKey3(self):
method testExportKey4 (line 288) | def testExportKey4(self):
method testExportKey5 (line 293) | def testExportKey5(self):
method testExportKey7 (line 300) | def testExportKey7(self):
method testExportKey8 (line 305) | def testExportKey8(self):
method testExportKey9 (line 310) | def testExportKey9(self):
method testExportKey10 (line 314) | def testExportKey10(self):
method testExportKey11 (line 326) | def testExportKey11(self):
method testExportKey12 (line 338) | def testExportKey12(self):
method testExportKey13 (line 350) | def testExportKey13(self):
method testExportKey14 (line 363) | def testExportKey14(self):
method testExportKey15 (line 373) | def testExportKey15(self):
class ImportKeyTestsSlow (line 379) | class ImportKeyTestsSlow(ImportKeyTests):
method setUp (line 380) | def setUp(self):
class ImportKeyTestsFast (line 383) | class ImportKeyTestsFast(ImportKeyTests):
method setUp (line 384) | def setUp(self):
function get_tests (line 390) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/Fortuna/__init__.py
function get_tests (line 31) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/Fortuna/test_FortunaAccumulator.py
class FortunaAccumulatorTests (line 38) | class FortunaAccumulatorTests(unittest.TestCase):
method setUp (line 39) | def setUp(self):
method test_FortunaPool (line 43) | def test_FortunaPool(self):
method test_which_pools (line 68) | def test_which_pools(self):
method test_accumulator (line 96) | def test_accumulator(self):
method test_accumulator_pool_length (line 158) | def test_accumulator_pool_length(self):
function get_tests (line 183) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/Fortuna/test_FortunaGenerator.py
class FortunaGeneratorTests (line 37) | class FortunaGeneratorTests(unittest.TestCase):
method setUp (line 38) | def setUp(self):
method test_generator (line 42) | def test_generator(self):
function get_tests (line 75) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/Fortuna/test_SHAd256.py
function get_tests (line 45) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/OSRNG/__init__.py
function get_tests (line 31) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/OSRNG/test_fallback.py
class SimpleTest (line 31) | class SimpleTest(unittest.TestCase):
method runTest (line 32) | def runTest(self):
function get_tests (line 41) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/OSRNG/test_generic.py
class SimpleTest (line 31) | class SimpleTest(unittest.TestCase):
method runTest (line 32) | def runTest(self):
function get_tests (line 41) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/OSRNG/test_nt.py
class SimpleTest (line 31) | class SimpleTest(unittest.TestCase):
method runTest (line 32) | def runTest(self):
function get_tests (line 41) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/OSRNG/test_posix.py
class SimpleTest (line 31) | class SimpleTest(unittest.TestCase):
method runTest (line 32) | def runTest(self):
function get_tests (line 41) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/OSRNG/test_winrandom.py
class SimpleTest (line 31) | class SimpleTest(unittest.TestCase):
method runTest (line 32) | def runTest(self):
function get_tests (line 41) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/__init__.py
function get_tests (line 29) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/test__UserFriendlyRNG.py
class RNGForkTest (line 48) | class RNGForkTest(unittest.TestCase):
method _get_reseed_count (line 50) | def _get_reseed_count(self):
method runTest (line 62) | def runTest(self):
function _task_main (line 115) | def _task_main(q):
class RNGMultiprocessingForkTest (line 124) | class RNGMultiprocessingForkTest(unittest.TestCase):
method runTest (line 126) | def runTest(self):
function get_tests (line 160) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/test_random.py
class SimpleTest (line 35) | class SimpleTest(unittest.TestCase):
method runTest (line 36) | def runTest(self):
function get_tests (line 164) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Random/test_rpoolcompat.py
class SimpleTest (line 32) | class SimpleTest(unittest.TestCase):
method runTest (line 33) | def runTest(self):
function get_tests (line 48) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Signature/__init__.py
function get_tests (line 29) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Signature/test_pkcs1_15.py
function isStr (line 35) | def isStr(s):
function rws (line 43) | def rws(t):
function t2b (line 49) | def t2b(t):
class PKCS1_15_Tests (line 56) | class PKCS1_15_Tests(unittest.TestCase):
method testSign1 (line 155) | def testSign1(self):
method testVerify1 (line 176) | def testVerify1(self):
method testSignVerify (line 197) | def testSignVerify(self):
class PKCS1_15_NoParams (line 210) | class PKCS1_15_NoParams(unittest.TestCase):
method testVerify (line 231) | def testVerify(self):
function get_tests (line 237) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Signature/test_pkcs1_pss.py
function isStr (line 37) | def isStr(s):
function rws (line 45) | def rws(t):
function t2b (line 51) | def t2b(t):
class MyKey (line 60) | class MyKey:
method __init__ (line 61) | def __init__(self, key):
method _randfunc (line 65) | def _randfunc(self, N):
method sign (line 68) | def sign(self, m):
method has_private (line 70) | def has_private(self):
method decrypt (line 72) | def decrypt(self, m):
method verify (line 74) | def verify(self, m, p):
method encrypt (line 76) | def encrypt(self, m, p):
class PKCS1_PSS_Tests (line 79) | class PKCS1_PSS_Tests(unittest.TestCase):
method testSign1 (line 347) | def testSign1(self):
method testVerify1 (line 365) | def testVerify1(self):
method testSignVerify (line 383) | def testSignVerify(self):
function get_tests (line 438) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Util/__init__.py
function get_tests (line 31) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Util/test_Counter.py
class CounterTests (line 36) | class CounterTests(unittest.TestCase):
method setUp (line 37) | def setUp(self):
method test_BE_shortcut (line 41) | def test_BE_shortcut(self):
method test_LE_shortcut (line 46) | def test_LE_shortcut(self):
method test_BE_no_shortcut (line 50) | def test_BE_no_shortcut(self):
method test_LE_no_shortcut (line 56) | def test_LE_no_shortcut(self):
method test_BE_defaults (line 61) | def test_BE_defaults(self):
method test_LE_defaults (line 74) | def test_LE_defaults(self):
method test_BE8_wraparound (line 87) | def test_BE8_wraparound(self):
method test_LE8_wraparound (line 98) | def test_LE8_wraparound(self):
method test_BE8_wraparound_allowed (line 109) | def test_BE8_wraparound_allowed(self):
method test_LE8_wraparound_allowed (line 119) | def test_LE8_wraparound_allowed(self):
method test_BE8_carry (line 129) | def test_BE8_carry(self):
method test_LE8_carry (line 138) | def test_LE8_carry(self):
function get_tests (line 147) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Util/test_Padding.py
class PKCS7_Tests (line 30) | class PKCS7_Tests(unittest.TestCase):
method test1 (line 32) | def test1(self):
method test2 (line 40) | def test2(self):
method test3 (line 46) | def test3(self):
method test4 (line 52) | def test4(self):
method testn1 (line 58) | def testn1(self):
method testn2 (line 61) | def testn2(self):
method testn3 (line 64) | def testn3(self):
class X923_Tests (line 69) | class X923_Tests(unittest.TestCase):
method test1 (line 71) | def test1(self):
method test2 (line 77) | def test2(self):
method test3 (line 83) | def test3(self):
method test4 (line 89) | def test4(self):
method testn1 (line 95) | def testn1(self):
class ISO7816_Tests (line 100) | class ISO7816_Tests(unittest.TestCase):
method test1 (line 102) | def test1(self):
method test2 (line 108) | def test2(self):
method test3 (line 114) | def test3(self):
method test4 (line 121) | def test4(self):
method testn1 (line 127) | def testn1(self):
function get_tests (line 130) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Util/test_asn1.py
class DerObjectTests (line 39) | class DerObjectTests(unittest.TestCase):
method testObjInit1 (line 41) | def testObjInit1(self):
method testObjEncode1 (line 49) | def testObjEncode1(self):
method testObjEncode2 (line 66) | def testObjEncode2(self):
method testObjEncode3 (line 71) | def testObjEncode3(self):
method testObjEncode4 (line 77) | def testObjEncode4(self):
method testObjDecode1 (line 89) | def testObjDecode1(self):
method testObjDecode2 (line 96) | def testObjDecode2(self):
method testObjDecode3 (line 103) | def testObjDecode3(self):
method testObjDecode4 (line 111) | def testObjDecode4(self):
method testObjDecode5 (line 123) | def testObjDecode5(self):
method testObjDecode6 (line 128) | def testObjDecode6(self):
class DerIntegerTests (line 135) | class DerIntegerTests(unittest.TestCase):
method testInit1 (line 137) | def testInit1(self):
method testEncode1 (line 141) | def testEncode1(self):
method testEncode2 (line 153) | def testEncode2(self):
method testEncode3 (line 184) | def testEncode3(self):
method testDecode1 (line 198) | def testDecode1(self):
method testDecode2 (line 211) | def testDecode2(self):
method testDecode3 (line 240) | def testDecode3(self):
method testDecode5 (line 250) | def testDecode5(self):
method testErrDecode1 (line 263) | def testErrDecode1(self):
class DerSequenceTests (line 268) | class DerSequenceTests(unittest.TestCase):
method testInit1 (line 270) | def testInit1(self):
method testEncode1 (line 274) | def testEncode1(self):
method testEncode2 (line 289) | def testEncode2(self):
method testEncode3 (line 304) | def testEncode3(self):
method testEncode4 (line 310) | def testEncode4(self):
method testEncode5 (line 335) | def testEncode5(self):
method testEncode6 (line 341) | def testEncode6(self):
method testEncode7 (line 366) | def testEncode7(self):
method testDecode1 (line 376) | def testDecode1(self):
method testDecode2 (line 390) | def testDecode2(self):
method testDecode4 (line 397) | def testDecode4(self):
method testDecode6 (line 423) | def testDecode6(self):
method testDecode7 (line 431) | def testDecode7(self):
method testDecode8 (line 440) | def testDecode8(self):
method testErrDecode1 (line 452) | def testErrDecode1(self):
method testErrDecode2 (line 459) | def testErrDecode2(self):
method testErrDecode3 (line 464) | def testErrDecode3(self):
class DerOctetStringTests (line 473) | class DerOctetStringTests(unittest.TestCase):
method testInit1 (line 475) | def testInit1(self):
method testEncode1 (line 479) | def testEncode1(self):
method testDecode1 (line 489) | def testDecode1(self):
method testErrDecode1 (line 498) | def testErrDecode1(self):
class DerNullTests (line 503) | class DerNullTests(unittest.TestCase):
method testEncode1 (line 505) | def testEncode1(self):
method testDecode1 (line 511) | def testDecode1(self):
class DerObjectIdTests (line 516) | class DerObjectIdTests(unittest.TestCase):
method testInit1 (line 518) | def testInit1(self):
method testEncode1 (line 522) | def testEncode1(self):
method testDecode1 (line 532) | def testDecode1(self):
class DerBitStringTests (line 538) | class DerBitStringTests(unittest.TestCase):
method testInit1 (line 540) | def testInit1(self):
method testEncode1 (line 544) | def testEncode1(self):
method testDecode1 (line 558) | def testDecode1(self):
class DerSetOfTests (line 567) | class DerSetOfTests(unittest.TestCase):
method testInit1 (line 569) | def testInit1(self):
method testEncode1 (line 573) | def testEncode1(self):
method testEncode2 (line 583) | def testEncode2(self):
method testEncode3 (line 593) | def testEncode3(self):
method testEncode4 (line 599) | def testEncode4(self):
method testDecode1 (line 608) | def testDecode1(self):
method testDecode2 (line 618) | def testDecode2(self):
method testDecode3 (line 627) | def testDecode3(self):
method testErrDecode1 (line 634) | def testErrDecode1(self):
function get_tests (line 640) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Util/test_number.py
class MyError (line 36) | class MyError(Exception):
class MiscTests (line 42) | class MiscTests(unittest.TestCase):
method setUp (line 43) | def setUp(self):
method test_ceil_shift (line 48) | def test_ceil_shift(self):
method test_ceil_div (line 100) | def test_ceil_div(self):
method test_exact_log2 (line 169) | def test_exact_log2(self):
method test_exact_div (line 196) | def test_exact_div(self):
method test_floor_div (line 225) | def test_floor_div(self):
method test_getStrongPrime (line 236) | def test_getStrongPrime(self):
method test_isPrime (line 258) | def test_isPrime(self):
method test_size (line 277) | def test_size(self):
class FastmathTests (line 284) | class FastmathTests(unittest.TestCase):
method setUp (line 285) | def setUp(self):
method test_negative_number_roundtrip_mpzToLongObj_longObjToMPZ (line 289) | def test_negative_number_roundtrip_mpzToLongObj_longObjToMPZ(self):
method test_isPrime_randfunc_exception (line 297) | def test_isPrime_randfunc_exception(self):
method test_getStrongPrime_randfunc_exception (line 304) | def test_getStrongPrime_randfunc_exception(self):
method test_isPrime_randfunc_bogus (line 310) | def test_isPrime_randfunc_bogus(self):
method test_getStrongPrime_randfunc_bogus (line 317) | def test_getStrongPrime_randfunc_bogus(self):
function get_tests (line 323) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/Util/test_winrandom.py
class WinRandomImportTest (line 31) | class WinRandomImportTest(unittest.TestCase):
method runTest (line 32) | def runTest(self):
function get_tests (line 41) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/__init__.py
class SelfTestError (line 37) | class SelfTestError(Exception):
method __init__ (line 38) | def __init__(self, message, result):
function run (line 43) | def run(module=None, verbosity=0, stream=None, tests=None, config=None, ...
function get_tests (line 79) | def get_tests(config={}):
FILE: lib/Crypto/SelfTest/st_common.py
class _list_testloader (line 36) | class _list_testloader(unittest.TestLoader):
function list_test_cases (line 39) | def list_test_cases(class_):
function strip_whitespace (line 46) | def strip_whitespace(s):
function a2b_hex (line 53) | def a2b_hex(s):
function b2a_hex (line 57) | def b2a_hex(s):
function handle_fastmath_import_error (line 62) | def handle_fastmath_import_error():
function docstrings_disabled (line 75) | def docstrings_disabled():
function assert_disabled (line 79) | def assert_disabled():
FILE: lib/Crypto/Signature/PKCS1_PSS.py
class PSS_SigScheme (line 77) | class PSS_SigScheme:
method __init__ (line 80) | def __init__(self, key, mgfunc, saltLen):
method can_sign (line 97) | def can_sign(self):
method sign (line 101) | def sign(self, mhash):
method verify (line 149) | def verify(self, mhash, S):
function MGF1 (line 202) | def MGF1(mgfSeed, maskLen, hash):
function EMSA_PSS_ENCODE (line 215) | def EMSA_PSS_ENCODE(mhash, emBits, randFunc, mgf, sLen):
function EMSA_PSS_VERIFY (line 278) | def EMSA_PSS_VERIFY(mhash, em, emBits, mgf, sLen):
function new (line 350) | def new(key, mgfunc=None, saltLen=None):
FILE: lib/Crypto/Signature/PKCS1_v1_5.py
class PKCS115_SigScheme (line 72) | class PKCS115_SigScheme:
method __init__ (line 75) | def __init__(self, key):
method can_sign (line 85) | def can_sign(self):
method sign (line 89) | def sign(self, mhash):
method verify (line 121) | def verify(self, mhash, S):
function EMSA_PKCS1_V1_5_ENCODE (line 173) | def EMSA_PKCS1_V1_5_ENCODE(hash, emLen, with_hash_parameters=True):
function new (line 245) | def new(key):
FILE: lib/Crypto/Util/Counter.py
function new (line 70) | def new(nbits, prefix=b(""), suffix=b(""), initial_value=1, overflow=0, ...
function _encode (line 127) | def _encode(n, nbytes, little_endian=False):
FILE: lib/Crypto/Util/Padding.py
function pad (line 35) | def pad(data_to_pad, block_size, style='pkcs7'):
function unpad (line 61) | def unpad(padded_data, block_size, style='pkcs7'):
FILE: lib/Crypto/Util/RFC1751.py
function _key2bin (line 37) | def _key2bin(s):
function _extract (line 43) | def _extract(key, start, length):
function key_to_english (line 49) | def key_to_english (key):
function english_to_key (line 67) | def english_to_key (s):
FILE: lib/Crypto/Util/_number_new.py
function ceil_shift (line 34) | def ceil_shift(n, b):
function ceil_div (line 50) | def ceil_div(a, b):
function floor_div (line 62) | def floor_div(a, b):
function exact_log2 (line 69) | def exact_log2(num):
function exact_div (line 93) | def exact_div(p, d, allow_divzero=False):
FILE: lib/Crypto/Util/asn1.py
function _isInt (line 48) | def _isInt(x, onlyNonNegative=False):
class BytesIO_EOF (line 56) | class BytesIO_EOF(BytesIO):
method __init__ (line 60) | def __init__(self, *params):
method setRecord (line 64) | def setRecord(self, record):
method read (line 68) | def read(self, length):
method read_byte (line 76) | def read_byte(self):
class _NoDerElementError (line 79) | class _NoDerElementError(EOFError):
class DerObject (line 82) | class DerObject(object):
method __init__ (line 88) | def __init__(self, asn1Id=None, payload=b(''), implicit=None, construc...
method _convertTag (line 135) | def _convertTag(self, tag):
method _lengthOctets (line 147) | def _lengthOctets(self):
method encode (line 159) | def encode(self):
method _decodeLen (line 165) | def _decodeLen(self, s):
method decode (line 178) | def decode(self, derEle):
method _decodeFromStream (line 201) | def _decodeFromStream(self, s):
class DerInteger (line 216) | class DerInteger(DerObject):
method __init__ (line 241) | def __init__(self, value=0, implicit=None):
method encode (line 256) | def encode(self):
method decode (line 271) | def decode(self, derEle):
method _decodeFromStream (line 286) | def _decodeFromStream(self, s):
function newDerInteger (line 302) | def newDerInteger(number):
class DerSequence (line 308) | class DerSequence(DerObject):
method __init__ (line 351) | def __init__(self, startSeq=None, implicit=None):
method __delitem__ (line 372) | def __delitem__(self, n):
method __getitem__ (line 374) | def __getitem__(self, n):
method __setitem__ (line 376) | def __setitem__(self, key, value):
method __setslice__ (line 378) | def __setslice__(self,i,j,sequence):
method __delslice__ (line 380) | def __delslice__(self,i,j):
method __getslice__ (line 382) | def __getslice__(self, i, j):
method __len__ (line 384) | def __len__(self):
method __iadd__ (line 386) | def __iadd__(self, item):
method append (line 389) | def append(self, item):
method hasInts (line 393) | def hasInts(self, onlyNonNegative=True):
method hasOnlyInts (line 405) | def hasOnlyInts(self, onlyNonNegative=True):
method encode (line 418) | def encode(self):
method decode (line 437) | def decode(self, derEle):
method _decodeFromStream (line 455) | def _decodeFromStream(self, s):
function newDerSequence (line 483) | def newDerSequence(*der_objs):
class DerOctetString (line 495) | class DerOctetString(DerObject):
method __init__ (line 522) | def __init__(self, value=b(''), implicit=None):
function newDerOctetString (line 536) | def newDerOctetString(binstring):
class DerNull (line 546) | class DerNull(DerObject):
method __init__ (line 549) | def __init__(self):
class DerObjectId (line 554) | class DerObjectId(DerObject):
method __init__ (line 581) | def __init__(self, value='', implicit=None):
method encode (line 594) | def encode(self):
method decode (line 611) | def decode(self, derEle):
method _decodeFromStream (line 627) | def _decodeFromStream(self, s):
function newDerObjectId (line 648) | def newDerObjectId(dottedstring):
class DerBitString (line 655) | class DerBitString(DerObject):
method __init__ (line 682) | def __init__(self, value=b(''), implicit=None):
method encode (line 696) | def encode(self):
method decode (line 704) | def decode(self, derEle):
method _decodeFromStream (line 720) | def _decodeFromStream(self, s):
function newDerBitString (line 735) | def newDerBitString(binstring):
class DerSetOf (line 745) | class DerSetOf(DerObject):
method __init__ (line 772) | def __init__(self, startSet=None, implicit=None):
method __getitem__ (line 789) | def __getitem__(self, n):
method __iter__ (line 792) | def __iter__(self):
method __len__ (line 795) | def __len__(self):
method add (line 798) | def add(self, elem):
method decode (line 817) | def decode(self, derEle):
method _decodeFromStream (line 836) | def _decodeFromStream(self, s):
method encode (line 872) | def encode(self):
function newDerSetOf (line 889) | def newDerSetOf(*der_objs):
FILE: lib/Crypto/Util/number.py
function size (line 75) | def size (N):
function getRandomNumber (line 84) | def getRandomNumber(N, randfunc=None):
function getRandomInteger (line 91) | def getRandomInteger(N, randfunc=None):
function getRandomRange (line 112) | def getRandomRange(a, b, randfunc=None):
function getRandomNBitInteger (line 128) | def getRandomNBitInteger(N, randfunc=None):
function GCD (line 143) | def GCD(x,y):
function inverse (line 152) | def inverse(u, v):
function getPrime (line 169) | def getPrime(N, randfunc=None):
function _rabinMillerTest (line 185) | def _rabinMillerTest(n, rounds, randfunc=None):
function getStrongPrime (line 233) | def getStrongPrime(N, e=0, false_positive_prob=1e-6, randfunc=None):
function isPrime (line 355) | def isPrime(N, false_positive_prob=1e-6, randfunc=None):
function long_to_bytes (line 387) | def long_to_bytes(n, blocksize=0):
function bytes_to_long (line 417) | def bytes_to_long(s):
function long2str (line 436) | def long2str(n, blocksize=0):
function str2long (line 439) | def str2long(s):
function _import_Random (line 443) | def _import_Random():
FILE: lib/Crypto/Util/py21compat.py
class object (line 52) | class object: pass
function isinstance (line 73) | def isinstance(obj, t):
class A (line 92) | class A:
method a (line 93) | def a(): pass
class staticmethod (line 96) | class staticmethod:
method __init__ (line 97) | def __init__(self, anycallable):
FILE: lib/Crypto/Util/py3compat.py
function b (line 68) | def b(s):
function bchr (line 70) | def bchr(s):
function bstr (line 72) | def bstr(s):
function bord (line 74) | def bord(s):
function tobytes (line 76) | def tobytes(s):
function tostr (line 81) | def tostr(bs):
function b (line 86) | def b(s):
function bchr (line 88) | def bchr(s):
function bstr (line 90) | def bstr(s):
function bord (line 95) | def bord(s):
function tobytes (line 97) | def tobytes(s):
function tostr (line 105) | def tostr(bs):
FILE: lib/Crypto/Util/randpool.py
class RandomPool (line 33) | class RandomPool:
method __init__ (line 38) | def __init__(self, numbytes = 160, cipher=None, hash=None, file=None):
method get_bytes (line 46) | def get_bytes(self, N):
method _updateEntropyEstimate (line 49) | def _updateEntropyEstimate(self, nbits):
method _randomize (line 56) | def _randomize(self, N=0, devname="/dev/urandom"):
method randomize (line 60) | def randomize(self, N=0):
method stir (line 64) | def stir(self, s=''):
method stir_n (line 68) | def stir_n(self, N=3):
method add_event (line 72) | def add_event(self, s=''):
method getBytes (line 76) | def getBytes(self, N):
method addEvent (line 80) | def addEvent(self, event, s=""):
FILE: lib/Crypto/pct_warnings.py
class CryptoWarning (line 30) | class CryptoWarning(Warning):
class CryptoDeprecationWarning (line 33) | class CryptoDeprecationWarning(DeprecationWarning, CryptoWarning):
class CryptoRuntimeWarning (line 36) | class CryptoRuntimeWarning(RuntimeWarning, CryptoWarning):
class RandomPool_DeprecationWarning (line 43) | class RandomPool_DeprecationWarning(CryptoDeprecationWarning):
class ClockRewindWarning (line 46) | class ClockRewindWarning(CryptoRuntimeWarning):
class GetRandomNumber_DeprecationWarning (line 49) | class GetRandomNumber_DeprecationWarning(CryptoDeprecationWarning):
class DisableShortcut_DeprecationWarning (line 52) | class DisableShortcut_DeprecationWarning(CryptoDeprecationWarning):
class PowmInsecureWarning (line 55) | class PowmInsecureWarning(CryptoRuntimeWarning):
FILE: pct-speedtest.py
class Benchmark (line 68) | class Benchmark:
method __init__ (line 70) | def __init__(self):
method random_keys (line 73) | def random_keys(self, bytes, n=10**5):
method random_blocks (line 81) | def random_blocks(self, bytes_per_block, blocks):
method random_data (line 90) | def random_data(self, bytes):
method _random_bytes (line 102) | def _random_bytes(self, b):
method announce_start (line 105) | def announce_start(self, test_name):
method announce_result (line 109) | def announce_result(self, value, units):
method test_random_module (line 113) | def test_random_module(self, module_name, module):
method test_pubkey_setup (line 123) | def test_pubkey_setup(self, pubkey_name, module, key_bytes):
method test_key_setup (line 134) | def test_key_setup(self, cipher_name, module, key_bytes, mode):
method test_encryption (line 167) | def test_encryption(self, cipher_name, module, key_bytes, mode):
method test_hash_small (line 203) | def test_hash_small(self, hash_name, hash_constructor, digest_size):
method test_hash_large (line 217) | def test_hash_large(self, hash_name, hash_constructor, digest_size):
method test_hmac_small (line 233) | def test_hmac_small(self, mac_name, hmac_constructor, digestmod, diges...
method test_hmac_large (line 241) | def test_hmac_large(self, mac_name, hmac_constructor, digestmod, diges...
method test_cmac_small (line 246) | def test_cmac_small(self, mac_name, cmac_constructor, ciphermod, key_s...
method test_cmac_large (line 254) | def test_cmac_large(self, mac_name, cmac_constructor, ciphermod, key_s...
method test_pkcs1_sign (line 259) | def test_pkcs1_sign(self, scheme_name, scheme_constructor, hash_name, ...
method test_pkcs1_verify (line 281) | def test_pkcs1_verify(self, scheme_name, scheme_constructor, hash_name...
method run (line 312) | def run(self):
FILE: setup.py
function PrintErr (line 92) | def PrintErr(*args, **kwd):
function endianness_macro (line 103) | def endianness_macro():
class PCTBuildExt (line 111) | class PCTBuildExt (build_ext):
method build_extensions (line 112) | def build_extensions(self):
method detect_modules (line 137) | def detect_modules (self):
method __add_extension_compile_option (line 178) | def __add_extension_compile_option(self, names, options):
method __add_extension_link_option (line 184) | def __add_extension_link_option(self, names, options):
method __change_extension_lib (line 192) | def __change_extension_lib(self, names, libs):
method __remove_extensions (line 200) | def __remove_extensions(self, names):
method __remove_compiler_option (line 210) | def __remove_compiler_option(self, option):
method __add_compiler_option (line 224) | def __add_compiler_option(self, option):
method __read_autoconf (line 230) | def __read_autoconf(self, filename):
method run (line 253) | def run(self):
method has_configure (line 289) | def has_configure(self):
class PCTBuildConfigure (line 295) | class PCTBuildConfigure(Command):
method initialize_options (line 298) | def initialize_options(self):
method finalize_options (line 301) | def finalize_options(self):
method run (line 304) | def run(self):
class PCTBuildPy (line 317) | class PCTBuildPy(build_py):
method find_package_modules (line 318) | def find_package_modules(self, package, package_dir, *args, **kwargs):
class TestCommand (line 332) | class TestCommand(Command):
method initialize_options (line 343) | def initialize_options(self):
method finalize_options (line 348) | def finalize_options(self):
method run (line 352) | def run(self):
function touch (line 512) | def touch(path):
FILE: src/AES.c
type u8 (line 39) | typedef uint8_t u8;
type u16 (line 40) | typedef uint16_t u16;
type u32 (line 41) | typedef uint32_t u32;
type block_state (line 43) | typedef struct {
function rijndaelKeySetupEnc (line 755) | static int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKe...
function rijndaelKeySetupDec (line 841) | static int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKe...
function rijndaelEncrypt (line 881) | static void rijndaelEncrypt(u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[...
function rijndaelDecrypt (line 1062) | static void rijndaelDecrypt(u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[...
function rijndaelEncryptRound (line 1245) | static void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u...
function rijndaelDecryptRound (line 1338) | static void rijndaelDecryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u...
function block_init (line 1429) | static void block_init(block_state *state, unsigned char *key,
function block_finalize (line 1449) | static void block_finalize(block_state* self)
function block_encrypt (line 1453) | static void block_encrypt(block_state *self, u8 *in, u8 *out)
function block_decrypt (line 1458) | static void block_decrypt(block_state *self, u8 *in, u8 *out)
FILE: src/AESNI.c
type u8 (line 40) | typedef unsigned char u8;
type block_state (line 42) | typedef struct {
function __m128i (line 78) | static __m128i aes128_keyexpand(__m128i key)
function __m128i (line 85) | static __m128i aes192_keyexpand_2(__m128i key, __m128i key2)
function aes_key_setup_enc (line 102) | static void aes_key_setup_enc(__m128i rk[], const u8* cipherKey, int key...
function aes_key_setup_dec (line 176) | static void aes_key_setup_dec(__m128i dk[], const __m128i ek[], int rounds)
function block_init (line 185) | static void block_init(block_state* self, unsigned char* key, int keylen)
function block_finalize (line 217) | static void block_finalize(block_state* self)
function block_encrypt (line 227) | static void block_encrypt(block_state* self, const u8* in, u8* out)
function block_decrypt (line 255) | static void block_decrypt(block_state* self, const u8* in, u8* out)
FILE: src/ARC2.c
type U32 (line 52) | typedef uint32_t U32;
type U16 (line 53) | typedef uint16_t U16;
type U8 (line 54) | typedef uint8_t U8;
type block_state (line 56) | typedef struct
function block_encrypt (line 62) | static void
function block_decrypt (line 106) | static void
function block_init (line 154) | static void
function block_finalize (line 219) | static void
FILE: src/ARC4.c
type stream_state (line 35) | typedef struct
function stream_encrypt (line 44) | static void stream_encrypt(stream_state *self, unsigned char *block,
function stream_init (line 70) | static void stream_init(stream_state *self, unsigned char *key, int keylen)
FILE: src/Blowfish.c
type Blowfish_state (line 39) | typedef struct {
function bytes_to_word (line 55) | static inline uint32_t bytes_to_word(const unsigned char *in)
function word_to_bytes (line 61) | static inline void word_to_bytes(uint32_t w, unsigned char *out)
function inline_encrypt (line 70) | static inline void inline_encrypt(Blowfish_state *self, uint32_t *pxL, u...
function inline_decrypt (line 100) | static inline void inline_decrypt(Blowfish_state *self, uint32_t *pxL, u...
function Blowfish_encrypt (line 130) | static void Blowfish_encrypt(Blowfish_state *self, const unsigned char *...
function Blowfish_decrypt (line 148) | static void Blowfish_decrypt(Blowfish_state *self, const unsigned char *...
function Blowfish_init (line 166) | static void Blowfish_init(Blowfish_state *self, const unsigned char *key...
function block_finalize (line 234) | static void block_finalize(block_state *self)
FILE: src/CAST.c
type uint32 (line 53) | typedef uint32_t uint32;
type uint8 (line 54) | typedef uint8_t uint8;
type block_state (line 57) | typedef struct {
function uint32 (line 72) | static uint32 castfunc(uint32 D, uint32 Kmi, uint8 Kri, int type)
function castcrypt (line 115) | static void castcrypt(block_state *key, uint8 *block, int decrypt)
function schedulekeys_half (line 193) | static void schedulekeys_half(uint32 *in, uint32 *keys)
function castschedulekeys (line 234) | static void castschedulekeys(block_state *schedule, uint8 *key, int keyb...
function encrypt (line 276) | void encrypt(key, keylen, in, out)
function tst (line 291) | void tst(key, keylen, data, result)
function block_init (line 417) | static void
function block_finalize (line 437) | static void
function block_encrypt (line 442) | static void
function block_decrypt (line 450) | static void block_decrypt(block_state *self,
FILE: src/DES.c
type block_state (line 38) | typedef struct {
function ltcseterr (line 42) | static void ltcseterr(int rc)
function block_init (line 68) | static void block_init(block_state *self, unsigned char *key, int keylen)
function block_finalize (line 97) | static void block_finalize(block_state *self)
function block_encrypt (line 101) | static void block_encrypt(block_state *self, unsigned char *in, unsigned...
function block_decrypt (line 112) | static void block_decrypt(block_state *self, unsigned char *in, unsigned...
FILE: src/MD2.c
type U8 (line 60) | typedef uint8_t U8;
type U32 (line 61) | typedef uint32_t U32;
type hash_state (line 63) | typedef struct {
function hash_init (line 69) | static void hash_init (hash_state *ptr)
function hash_copy (line 97) | static void
function hash_update (line 107) | static void hash_update (hash_state *self, const U8 *buf, U32 len)
function PyObject (line 142) | static PyObject *
FILE: src/MD4.c
type U32 (line 59) | typedef uint32_t U32;
type U8 (line 60) | typedef uint8_t U8;
type hash_state (line 63) | typedef struct {
function hash_init (line 76) | static void
function hash_copy (line 86) | static void
function hash_update (line 99) | static void
function PyObject (line 190) | static PyObject *
FILE: src/RIPEMD160.c
type ripemd160_state (line 80) | typedef struct {
function ripemd160_init (line 181) | static void ripemd160_init(ripemd160_state *self)
function ripemd160_wipe (line 192) | static void ripemd160_wipe(ripemd160_state *self)
function byteswap32 (line 198) | static inline void byteswap32(uint32_t *v)
function byteswap_digest (line 213) | static inline void byteswap_digest(uint32_t *p)
function ripemd160_compress (line 226) | static void ripemd160_compress(ripemd160_state *self)
function ripemd160_update (line 322) | static void ripemd160_update(ripemd160_state *self, const unsigned char ...
function ripemd160_copy (line 365) | static void ripemd160_copy(const ripemd160_state *source, ripemd160_stat...
function ripemd160_digest (line 370) | static int ripemd160_digest(const ripemd160_state *self, unsigned char *...
function PyObject (line 425) | static PyObject *hash_digest(hash_state *self)
FILE: src/XOR.c
type stream_state (line 35) | typedef struct
function stream_init (line 41) | static void
function stream_encrypt (line 65) | static void stream_encrypt(stream_state *self, unsigned char *block,
FILE: src/_counter.c
function CounterObject_init (line 32) | static int
function CounterObject_dealloc (line 118) | static void
function PyObject (line 137) | static inline PyObject *
function PyObject (line 207) | static PyObject *
function PyObject (line 213) | static PyObject *
function CounterLEObject_increment (line 219) | static void
function CounterBEObject_increment (line 241) | static void
function PyObject (line 263) | static PyObject *
function PyObject (line 298) | static PyObject *
function PyObject (line 320) | static PyObject *
function PyObject (line 415) | static PyObject *
function PyObject (line 441) | static PyObject *
type PyModuleDef (line 478) | struct PyModuleDef
FILE: src/_counter.h
type PCT_CounterObject (line 31) | typedef struct {
FILE: src/_fastmath.c
function longObjToMPZ (line 63) | static void
function PyObject (line 90) | static PyObject *
type dsaKey (line 117) | typedef struct
type rsaKey (line 127) | typedef struct
function dsaSign (line 158) | static int
function dsaVerify (line 184) | static int
function rsaEncrypt (line 220) | static int
function rsaDecrypt (line 231) | static int
function rsaBlind (line 282) | static int
function rsaUnBlind (line 299) | static int
function PyObject (line 420) | static PyObject *
function dsaKey_dealloc (line 449) | static void
function PyObject (line 460) | static PyObject *
function PyObject (line 496) | static PyObject *
function PyObject (line 540) | static PyObject *
function PyObject (line 570) | static PyObject *
function PyObject (line 578) | static PyObject *
function factorize_N_from_D (line 596) | static int factorize_N_from_D(rsaKey *key)
function PyObject (line 648) | static PyObject *
function rsaKey_dealloc (line 698) | static void
function PyObject (line 710) | static PyObject *
function PyObject (line 772) | static PyObject *
function PyObject (line 801) | static PyObject *
function PyObject (line 837) | static PyObject *
function PyObject (line 862) | static PyObject *
function PyObject (line 901) | static PyObject *
function PyObject (line 944) | static PyObject *
function PyObject (line 952) | static PyObject *
function PyObject (line 967) | static PyObject *
function size (line 1024) | inline size_t size (mpz_t n)
function bytes_to_mpz (line 1029) | void bytes_to_mpz (mpz_t result, const unsigned char *bytes, size_t size)
function PyObject (line 1050) | static PyObject *
function getRandomInteger (line 1087) | static int
function getRandomNBitInteger (line 1163) | static int
function getRandomRange (line 1183) | static int
function sieve_field (line 1210) | static void
function rabinMillerTest (line 1247) | static int
function PyObject (line 1363) | static PyObject *
type PyModuleDef (line 1591) | struct PyModuleDef
FILE: src/block_template.c
type ALGobject (line 57) | typedef struct
function ALGobject (line 72) | static ALGobject *
function ALGdealloc (line 83) | static void
function ALGobject (line 110) | static ALGobject *
function PyObject (line 247) | static PyObject *
function PyObject (line 505) | static PyObject *
function ALGsetattr (line 619) | static int
function PyObject (line 653) | static PyObject *
type PyMethodDef (line 691) | struct PyMethodDef
type PyModuleDef (line 733) | struct PyModuleDef
function PyMODINIT_FUNC (line 747) | PyMODINIT_FUNC
FILE: src/cpuid.c
function PyObject (line 55) | static PyObject *
type PyModuleDef (line 88) | struct PyModuleDef
FILE: src/galois.c
type t_exp_key (line 46) | typedef struct {
function be_to_word (line 54) | static uint64_t be_to_word(const uint8_t fb[8])
function word_to_be (line 67) | static void word_to_be(uint8_t fb[8], uint64_t w)
function make_v_tables (line 81) | static void make_v_tables(const uint8_t h[16], t_v_tables *tables)
function gcm_mult2 (line 116) | static void gcm_mult2(uint8_t out[16], const t_v_tables *key_tables, con...
function ghash (line 155) | static void ghash(
function realign_v_tables (line 177) | static void realign_v_tables(t_exp_key *exp_key)
function PyObject (line 198) | static PyObject *
function PyObject (line 243) | static PyObject *
type PyModuleDef (line 311) | struct PyModuleDef
function PyMODINIT_FUNC (line 323) | PyMODINIT_FUNC
function PyMODINIT_FUNC (line 337) | PyMODINIT_FUNC
FILE: src/hash_SHA2.h
type U8 (line 73) | typedef uint8_t U8;
type U32 (line 74) | typedef uint32_t U32;
type U64 (line 75) | typedef uint64_t U64;
type U64 (line 79) | typedef U64 sha2_word_t;
type U32 (line 81) | typedef U32 sha2_word_t;
type hash_state (line 87) | typedef struct{
FILE: src/hash_SHA2_template.c
function sha_compress (line 36) | static void sha_compress(hash_state * hs)
function add_length (line 89) | static int add_length(hash_state *hs, sha2_word_t inc) {
function sha_init (line 103) | static void sha_init(hash_state * hs)
function sha_process (line 111) | static void sha_process(hash_state * hs, unsigned char *buf, int len)
function sha_done (line 126) | static void sha_done(hash_state * hs, unsigned char *hash)
function hash_init (line 167) | static void hash_init (hash_state *ptr)
function hash_update (line 173) | static void
function hash_copy (line 180) | static void
function PyObject (line 187) | static PyObject *
FILE: src/hash_template.c
type ALGobject (line 41) | typedef struct {
function ALGobject (line 54) | static ALGobject *
function ALG_dealloc (line 65) | static void
function PyObject (line 89) | static PyObject *
function PyObject (line 115) | static PyObject *
function PyObject (line 133) | static PyObject *
function PyObject (line 187) | static PyObject *
function PyObject (line 230) | static PyObject *
function PyObject (line 290) | static PyObject *
type PyMethodDef (line 323) | struct PyMethodDef
type PyModuleDef (line 329) | struct PyModuleDef
function PyMODINIT_FUNC (line 344) | PyMODINIT_FUNC
FILE: src/libtom/tomcrypt_cipher.h
type blowfish_key (line 7) | struct blowfish_key {
type rc5_key (line 14) | struct rc5_key {
type rc6_key (line 21) | struct rc6_key {
type saferp_key (line 27) | struct saferp_key {
type rijndael_key (line 34) | struct rijndael_key {
type kseed_key (line 41) | struct kseed_key {
type kasumi_key (line 47) | struct kasumi_key {
type xtea_key (line 55) | struct xtea_key {
type twofish_key (line 62) | struct twofish_key {
type twofish_key (line 66) | struct twofish_key {
type safer_key (line 83) | struct safer_key { safer_key_t key; }
type rc2_key (line 87) | struct rc2_key { unsigned xkey[64]; }
type des_key (line 91) | struct des_key {
type des3_key (line 95) | struct des3_key {
type cast5_key (line 101) | struct cast5_key {
type noekeon_key (line 107) | struct noekeon_key {
type skipjack_key (line 113) | struct skipjack_key {
type khazad_key (line 119) | struct khazad_key {
type anubis_key (line 126) | struct anubis_key {
type multi2_key (line 135) | struct multi2_key {
type symmetric_key (line 141) | typedef union Symmetric_key {
type symmetric_ECB (line 202) | typedef struct {
type symmetric_CFB (line 214) | typedef struct {
type symmetric_OFB (line 232) | typedef struct {
type symmetric_CBC (line 248) | typedef struct {
type symmetric_CTR (line 263) | typedef struct {
type symmetric_LRW (line 287) | typedef struct {
type symmetric_F8 (line 312) | typedef struct {
type ltc_cipher_descriptor (line 331) | struct ltc_cipher_descriptor {
type ltc_cipher_descriptor (line 555) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 565) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 575) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 585) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 595) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 611) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 638) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 639) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 649) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 659) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 675) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 685) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 695) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 705) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 715) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 725) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 735) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 745) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 756) | struct ltc_cipher_descriptor
type symmetric_xts (line 852) | typedef struct {
type ltc_cipher_descriptor (line 883) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 884) | struct ltc_cipher_descriptor
FILE: src/libtom/tomcrypt_des.c
type ltc_cipher_descriptor (line 23) | struct ltc_cipher_descriptor
type ltc_cipher_descriptor (line 37) | struct ltc_cipher_descriptor
function deskey (line 1306) | static void deskey(const unsigned char *key, short edf, ulong32 *keyout)
function deskey (line 1356) | static void deskey(const unsigned char *key, short edf, ulong32 *keyout)
function cookey (line 1366) | static void cookey(const ulong32 *raw1, ulong32 *keyout)
function cookey (line 1392) | static void cookey(const ulong32 *raw1, ulong32 *keyout)
function _desfunc (line 1402) | static void _desfunc(ulong32 *block, const ulong32 *keys)
function desfunc (line 1514) | static void desfunc(ulong32 *block, const ulong32 *keys)
function des_setup (line 1529) | static int des_setup(const unsigned char *key, int keylen, int num_round...
function des3_setup (line 1556) | static int des3_setup(const unsigned char *key, int keylen, int num_roun...
function des_ecb_encrypt (line 1587) | static int des_ecb_encrypt(const unsigned char *pt, unsigned char *ct, s...
function des_ecb_decrypt (line 1608) | static int des_ecb_decrypt(const unsigned char *ct, unsigned char *pt, s...
function des3_ecb_encrypt (line 1629) | static int des3_ecb_encrypt(const unsigned char *pt, unsigned char *ct, ...
function des3_ecb_decrypt (line 1653) | static int des3_ecb_decrypt(const unsigned char *ct, unsigned char *pt, ...
function des_test (line 1673) | static int des_test(void)
function des3_test (line 1816) | static int des3_test(void)
function des_done (line 1855) | static void des_done(symmetric_key *skey)
function des3_done (line 1862) | static void des3_done(symmetric_key *skey)
function des_keysize (line 1872) | static int des_keysize(int *keysize)
function des3_keysize (line 1887) | static int des3_keysize(int *keysize)
FILE: src/libtom/tomcrypt_hash.h
type sha512_state (line 3) | struct sha512_state {
type sha256_state (line 11) | struct sha256_state {
type sha1_state (line 19) | struct sha1_state {
type md5_state (line 27) | struct md5_state {
type md4_state (line 35) | struct md4_state {
type tiger_state (line 43) | struct tiger_state {
type md2_state (line 51) | struct md2_state {
type rmd128_state (line 58) | struct rmd128_state {
type rmd160_state (line 66) | struct rmd160_state {
type rmd256_state (line 74) | struct rmd256_state {
type rmd320_state (line 82) | struct rmd320_state {
type whirlpool_state (line 90) | struct whirlpool_state {
type chc_state (line 98) | struct chc_state {
type hash_state (line 105) | typedef union Hash_state {
type ltc_hash_descriptor (line 150) | struct ltc_hash_descriptor {
type ltc_hash_descriptor (line 200) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 208) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 216) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 227) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 235) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 245) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 254) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 262) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 270) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 278) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 286) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 294) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 302) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 310) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 318) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 326) | struct ltc_hash_descriptor
type ltc_hash_descriptor (line 327) | struct ltc_hash_descriptor
FILE: src/libtom/tomcrypt_mac.h
type hmac_state (line 2) | typedef struct Hmac_state {
type omac_state (line 28) | typedef struct {
type pmac_state (line 58) | typedef struct {
type eax_state (line 105) | typedef struct {
type ocb_state (line 141) | typedef struct {
FILE: src/libtom/tomcrypt_macros.h
type ulong64 (line 4) | typedef unsigned __int64 ulong64;
type ulong64 (line 7) | typedef unsigned long long ulong64;
type ulong32 (line 14) | typedef unsigned ulong32;
type ulong32 (line 16) | typedef unsigned long ulong32;
function ROL (line 247) | static inline unsigned ROL(unsigned word, int i)
function ROR (line 255) | static inline unsigned ROR(unsigned word, int i)
function ROLc (line 265) | static inline unsigned ROLc(unsigned word, const int i)
function RORc (line 273) | static inline unsigned RORc(unsigned word, const int i)
function ROL (line 290) | static inline unsigned ROL(unsigned word, int i)
function ROR (line 298) | static inline unsigned ROR(unsigned word, int i)
function ROLc (line 308) | static inline unsigned ROLc(unsigned word, const int i)
function RORc (line 316) | static inline unsigned RORc(unsigned word, const int i)
function ROL64 (line 346) | static inline unsigned long ROL64(unsigned long word, int i)
function ROR64 (line 354) | static inline unsigned long ROR64(unsigned long word, int i)
function ROL64c (line 364) | static inline unsigned long ROL64c(unsigned long word, const int i)
function ROR64c (line 372) | static inline unsigned long ROR64c(unsigned long word, const int i)
FILE: src/libtom/tomcrypt_math.h
type ecc_point (line 11) | typedef void ecc_point;
type rsa_key (line 15) | typedef void rsa_key;
type ltc_math_descriptor (line 19) | typedef struct {
FILE: src/libtom/tomcrypt_pk.h
type rsa_key (line 18) | typedef struct Rsa_key {
type katja_key (line 99) | typedef struct KAT_key {
type ltc_ecc_set_type (line 156) | typedef struct {
type ecc_point (line 180) | typedef struct {
type ecc_key (line 192) | typedef struct {
type dsa_key (line 310) | typedef struct {
type ltc_asn1_list (line 393) | typedef struct ltc_asn1_list_ {
type ulong32 (line 510) | typedef ulong32 wchar_t;
type ltc_utctime (line 527) | typedef struct {
FILE: src/libtom/tomcrypt_pkcs.h
type ltc_pkcs_1_v1_5_blocks (line 6) | enum ltc_pkcs_1_v1_5_blocks
type ltc_pkcs_1_paddings (line 12) | enum ltc_pkcs_1_paddings
FILE: src/libtom/tomcrypt_prng.h
type rc4_prng (line 12) | struct rc4_prng {
type fortuna_prng (line 19) | struct fortuna_prng {
type ltc_prng_descriptor (line 67) | struct ltc_prng_descriptor {
type ltc_prng_descriptor (line 130) | struct ltc_prng_descriptor
type ltc_prng_descriptor (line 142) | struct ltc_prng_descriptor
type ltc_prng_descriptor (line 154) | struct ltc_prng_descriptor
type ltc_prng_descriptor (line 166) | struct ltc_prng_descriptor
type ltc_prng_descriptor (line 178) | struct ltc_prng_descriptor
type ltc_prng_descriptor (line 182) | struct ltc_prng_descriptor
type ltc_prng_descriptor (line 183) | struct ltc_prng_descriptor
FILE: src/pycrypto_compat.h
type Py_ssize_t (line 96) | typedef int Py_ssize_t;
type PyMODINIT_FUNC (line 103) | typedef void PyMODINIT_FUNC;
FILE: src/stream_template.c
type ALGobject (line 47) | typedef struct
function ALGobject (line 58) | static ALGobject *
function ALGdealloc (line 66) | static void
function ALGobject (line 81) | static ALGobject *
function PyObject (line 122) | static PyObject *
function PyObject (line 154) | static PyObject *
function PyObject (line 191) | static PyObject *
type PyMethodDef (line 219) | struct PyMethodDef
type PyModuleDef (line 262) | struct PyModuleDef
function PyMODINIT_FUNC (line 277) | PyMODINIT_FUNC
FILE: src/strxor.c
function xor_strings (line 38) | static void
function xor_string_with_char (line 59) | static void
function runtime_test (line 87) | static void
function PyObject (line 132) | static PyObject *
function PyObject (line 173) | static PyObject *
type PyModuleDef (line 215) | struct PyModuleDef
FILE: src/winrand.c
type WRobject (line 52) | typedef struct
function WRdealloc (line 64) | static void
function WRobject (line 100) | static WRobject *
function PyObject (line 127) | static PyObject *
function PyObject (line 193) | static PyObject *
type PyModuleDef (line 254) | struct PyModuleDef
Condensed preview — 225 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,480K chars).
[
{
"path": ".gitignore",
"chars": 310,
"preview": "# setup.py can generate these directories:\n/dist/\n/build/\n/Doc/apidoc/\n\n# Ignore these files:\n*.py[co]\n.DS_Store\nMANIFES"
},
{
"path": ".mailmap",
"chars": 721,
"preview": "A.M. Kuchling <amk@amk.ca> <akuchling@rivest.dlitz.net>\nA.M. Kuchling <amk@amk.ca> <amk@rivest.dlitz.net>\nDarsey Litzenb"
},
{
"path": ".travis.yml",
"chars": 2402,
"preview": "# PyCrypto .travis.yml file, for travis-ci.org testing.\n# See https://travis-ci.org/dlitz/pycrypto for build status.\nenv"
},
{
"path": "ACKS",
"chars": 937,
"preview": "Acknowledgements\n----------------\n\nThis list is sorted in alphabetical order, and is probably incomplete.\nI'd like to th"
},
{
"path": "COPYRIGHT",
"chars": 3649,
"preview": "Copyright and licensing of the Python Cryptography Toolkit (\"PyCrypto\"):\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
},
{
"path": "ChangeLog",
"chars": 28337,
"preview": "2.7a1\n=====\n\t* Experimental release. This introduces a new API for AEAD modes, and\n\t makes a few other minor API chang"
},
{
"path": "Doc/AEAD_API.txt",
"chars": 12659,
"preview": "AEAD (Authenticated Encryption with Associated Data) modes of operations\nfor symmetric block ciphers provide authenticat"
},
{
"path": "Doc/epydoc-config",
"chars": 730,
"preview": "# epydoc configuration file for PyCrypto.\n# See http://epydoc.sourceforge.net/configfile.html for sample configuration.\n"
},
{
"path": "Doc/pycrypt.rst",
"chars": 52950,
"preview": "====================================\nPython Cryptography Toolkit\n====================================\n\n**Version 2.7a1**"
},
{
"path": "LEGAL/00INDEX",
"chars": 177,
"preview": "00INDEX - This file\ntsu-notify.mbox - Notification sent per U.S. export regulations\ncopy/ "
},
{
"path": "LEGAL/CodeSubmissionRequirements-RevA.txt",
"chars": 2816,
"preview": "PyCrypto Licensing Requirements - Rev. A\n\nLast updated: 2008-09-14\n\nIn an effort to further clarify PyCrypto's licensing"
},
{
"path": "LEGAL/CodeSubmissionRequirements-RevB.txt",
"chars": 2998,
"preview": "PyCrypto Code Submission Requirements - Rev. B\n\nLast updated: 2008-09-14\n\nIn an effort to further clarify PyCrypto's lic"
},
{
"path": "LEGAL/CodeSubmissionRequirements-RevC.txt",
"chars": 2101,
"preview": "PyCrypto Code Submission Requirements - Rev. C\n\nLast updated: 2009-02-28\n\nIn an effort to further clarify PyCrypto's lic"
},
{
"path": "LEGAL/CodeSubmissionRequirements.txt",
"chars": 1940,
"preview": "PyCrypto Code Submission Requirements - Rev. D\n\nLast updated: 2010-11-29\n\nIn an effort to further clarify PyCrypto's lic"
},
{
"path": "LEGAL/copy/00INDEX",
"chars": 197,
"preview": "00INDEX This file\nLICENSE.orig Original (deprecated) license for the Python Cryptography Toolkit\nLICENSE.libt"
},
{
"path": "LEGAL/copy/LICENSE.libtom",
"chars": 82,
"preview": "LibTomCrypt is public domain. As should all quality software be.\n\nTom St Denis\n\n\n"
},
{
"path": "LEGAL/copy/LICENSE.orig",
"chars": 693,
"preview": "===================================================================\nDistribute and use freely; there are no restrictions"
},
{
"path": "LEGAL/copy/LICENSE.python-2.2",
"chars": 12647,
"preview": "A. HISTORY OF THE SOFTWARE\n==========================\n\nPython was created in the early 1990s by Guido van Rossum at Stic"
},
{
"path": "LEGAL/copy/stmts/Andrew_M_Kuchling.mbox",
"chars": 6647,
"preview": "From dlitz@dlitz.net Sun Nov 23 00:17:22 2008\nDate: Sun, 23 Nov 2008 00:17:22 -0500\nFrom: \"Dwayne C. Litzenberger\" <dlit"
},
{
"path": "LEGAL/copy/stmts/Barry_A_Warsaw.mbox",
"chars": 5704,
"preview": "From dlitz@dlitz.net Sat Feb 28 21:45:09 2009\nDate: Sat, 28 Feb 2009 21:45:09 -0500\nFrom: \"Dwayne C. Litzenberger\" <dlit"
},
{
"path": "LEGAL/copy/stmts/Jeethu_Rao.mbox",
"chars": 13348,
"preview": "From dlitz@dlitz.net Sat Feb 28 23:24:14 2009\nDate: Sat, 28 Feb 2009 23:24:14 -0500\nFrom: \"Dwayne C. Litzenberger\" <dlit"
},
{
"path": "LEGAL/copy/stmts/Joris_Bontje.mbox",
"chars": 13470,
"preview": "From dlitz@dlitz.net Mon May 4 22:49:14 2009\nDate: Mon, 4 May 2009 22:49:14 -0400\nFrom: \"Dwayne C. Litzenberger\" <dlitz"
},
{
"path": "LEGAL/copy/stmts/Mark_Moraes.mbox",
"chars": 13657,
"preview": "From dlitz@dlitz.net Sat Apr 18 09:14:20 2009\nDate: Sat, 18 Apr 2009 09:14:20 -0400\nFrom: \"Dwayne C. Litzenberger\" <dlit"
},
{
"path": "LEGAL/copy/stmts/Paul_Swartz.mbox",
"chars": 9589,
"preview": "From dlitz@dlitz.net Sun Aug 2 21:48:25 2009\nDate: Sun, 2 Aug 2009 21:48:25 -0400\nFrom: \"Dwayne C. Litzenberger\" <dlitz"
},
{
"path": "LEGAL/copy/stmts/Robey_Pointer.asc",
"chars": 1907,
"preview": "Date: Mon, 16 Feb 2009 12:58:00 -0800\nFrom: Robey Pointer <robey@lag.net>\nSubject: Re: PyCrypto license clarification\nTo"
},
{
"path": "LEGAL/copy/stmts/Wim_Lewis.asc",
"chars": 1811,
"preview": "Date: Sun, 23 Nov 2008 15:54:35 -0800\nFrom: Wim Lewis <wiml@hhhh.org>\nSubject: Re: PyCrypto license clarification\nTo: \"D"
},
{
"path": "LEGAL/tsu-notify.mbox",
"chars": 5205,
"preview": "From dlitz@dlitz.net Wed Aug 27 20:54:38 EDT 2008\nX-Maildir-Dup-Checked: Yes\nReturn-Path: <dlitz@dlitz.net>\nX-Original-T"
},
{
"path": "MANIFEST.in",
"chars": 193,
"preview": "include MANIFEST.in\ninclude ACKS build-aux/* ChangeLog COPYRIGHT Doc/* TODO\ngraft LEGAL\nrecursive-include src *.h *.c\nin"
},
{
"path": "README.md",
"chars": 4949,
"preview": "| ⚠️ WARNING |\n|:------------------------------------"
},
{
"path": "TODO",
"chars": 991,
"preview": "- Clean up and stabilize the Crypto.PublicKey API. The previous attempt to\n unify fundamentally different algorithms, "
},
{
"path": "bootstrap.sh",
"chars": 359,
"preview": "#!/bin/sh\n# Generates ./src/config.h.in and ./configure\n\nset -e\naclocal --force -I m4\nautoconf --force\nautoheader --forc"
},
{
"path": "build-aux/compile",
"chars": 7333,
"preview": "#! /bin/sh\n# Wrapper for compilers which do not understand '-c -o'.\n\nscriptversion=2012-10-14.11; # UTC\n\n# Copyright (C)"
},
{
"path": "build-aux/config.guess",
"chars": 44826,
"preview": "#! /bin/sh\n# Attempt to guess a canonical system name.\n# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,"
},
{
"path": "build-aux/config.sub",
"chars": 35454,
"preview": "#! /bin/sh\n# Configuration validation subroutine script.\n# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 199"
},
{
"path": "build-aux/install-sh",
"chars": 13997,
"preview": "#!/bin/sh\n# install - install a program, script, or datafile\n\nscriptversion=2011-11-20.07; # UTC\n\n# This originates from"
},
{
"path": "build-aux/missing",
"chars": 10179,
"preview": "#! /bin/sh\n# Common stub for a few missing GNU programs while installing.\n\nscriptversion=2012-01-06.18; # UTC\n\n# Copyrig"
},
{
"path": "buildenv.in",
"chars": 75,
"preview": "# @configure_input@\nCC = @CC@\nCFLAGS = @CFLAGS@ @DEFS@\nLDFLAGS = @LDFLAGS@\n"
},
{
"path": "configure",
"chars": 197639,
"preview": "#! /bin/sh\n# Guess values for system-dependent variables and create Makefiles.\n# Generated by GNU Autoconf 2.69 for FULL"
},
{
"path": "configure.ac",
"chars": 3459,
"preview": "# -*- Autoconf -*-\n# PyCrypto's configure.ac file.\n# Process this file wit"
},
{
"path": "lib/Crypto/Cipher/AES.py",
"chars": 7762,
"preview": "# -*- coding: utf-8 -*-\n#\n# Cipher/AES.py : AES\n#\n# ==================================================================="
},
{
"path": "lib/Crypto/Cipher/ARC2.py",
"chars": 5299,
"preview": "# -*- coding: utf-8 -*-\n#\n# Cipher/ARC2.py : ARC2.py\n#\n# =============================================================="
},
{
"path": "lib/Crypto/Cipher/ARC4.py",
"chars": 5079,
"preview": "# -*- coding: utf-8 -*-\n#\n# Cipher/ARC4.py : ARC4\n#\n# ================================================================="
},
{
"path": "lib/Crypto/Cipher/Blowfish.py",
"chars": 4843,
"preview": "# -*- coding: utf-8 -*-\n#\n# Cipher/Blowfish.py : Blowfish\n#\n# ========================================================="
},
{
"path": "lib/Crypto/Cipher/CAST.py",
"chars": 4881,
"preview": "# -*- coding: utf-8 -*-\n#\n# Cipher/CAST.py : CAST\n#\n# ================================================================="
},
{
"path": "lib/Crypto/Cipher/DES.py",
"chars": 4774,
"preview": "# -*- coding: utf-8 -*-\n#\n# Cipher/DES.py : DES\n#\n# ==================================================================="
},
{
"path": "lib/Crypto/Cipher/DES3.py",
"chars": 5515,
"preview": "# -*- coding: utf-8 -*-\n#\n# Cipher/DES3.py : DES3\n#\n# ================================================================="
},
{
"path": "lib/Crypto/Cipher/PKCS1_OAEP.py",
"chars": 9386,
"preview": "# -*- coding: utf-8 -*-\n#\n# Cipher/PKCS1_OAEP.py : PKCS#1 OAEP\n#\n# ===================================================="
},
{
"path": "lib/Crypto/Cipher/PKCS1_v1_5.py",
"chars": 9104,
"preview": "# -*- coding: utf-8 -*-\n#\n# Cipher/PKCS1-v1_5.py : PKCS#1 v1.5\n#\n# ===================================================="
},
{
"path": "lib/Crypto/Cipher/XOR.py",
"chars": 2737,
"preview": "# -*- coding: utf-8 -*-\n#\n# Cipher/XOR.py : XOR\n#\n# ==================================================================="
},
{
"path": "lib/Crypto/Cipher/__init__.py",
"chars": 3440,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/Cipher/blockalgo.py",
"chars": 40770,
"preview": "# -*- coding: utf-8 -*-\n#\n# Cipher/blockalgo.py\n#\n# ==================================================================="
},
{
"path": "lib/Crypto/Hash/CMAC.py",
"chars": 11991,
"preview": "# -*- coding: utf-8 -*-\n#\n# Hash/CMAC.py - Implements the CMAC algorithm\n#\n# ==========================================="
},
{
"path": "lib/Crypto/Hash/HMAC.py",
"chars": 8895,
"preview": "# HMAC.py - Implements the HMAC algorithm as described by RFC 2104.\n#\n# ================================================"
},
{
"path": "lib/Crypto/Hash/MD5.py",
"chars": 3230,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/Hash/RIPEMD.py",
"chars": 1199,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/Hash/SHA.py",
"chars": 1148,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/Hash/SHA1.py",
"chars": 3214,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/Hash/__init__.py",
"chars": 6298,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/IO/PEM.py",
"chars": 6131,
"preview": "# -*- coding: ascii -*-\n#\n# Util/PEM.py : Privacy Enhanced Mail utilities\n#\n# ========================================="
},
{
"path": "lib/Crypto/IO/PKCS8.py",
"chars": 7523,
"preview": "# -*- coding: utf-8 -*-\n#\n# PublicKey/PKCS8.py : PKCS#8 functions\n#\n# ================================================="
},
{
"path": "lib/Crypto/IO/_PBES.py",
"chars": 12632,
"preview": "#\n# PublicKey/_PBES.py : Password-Based Encryption functions\n#\n# ======================================================"
},
{
"path": "lib/Crypto/IO/__init__.py",
"chars": 1506,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/Protocol/AllOrNothing.py",
"chars": 11897,
"preview": "#\n# AllOrNothing.py : all-or-nothing package transformations\n#\n# Part of the Python Cryptography Toolkit\n#\n# Written by"
},
{
"path": "lib/Crypto/Protocol/Chaffing.py",
"chars": 10245,
"preview": "#\n# Chaffing.py : chaffing & winnowing support\n#\n# Part of the Python Cryptography Toolkit\n#\n# Written by Andrew M. Kuc"
},
{
"path": "lib/Crypto/Protocol/KDF.py",
"chars": 7959,
"preview": "#\n# KDF.py : a collection of Key Derivation Functions\n#\n# Part of the Python Cryptography Toolkit\n#\n# ================="
},
{
"path": "lib/Crypto/Protocol/__init__.py",
"chars": 1573,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/PublicKey/DSA.py",
"chars": 25226,
"preview": "# -*- coding: utf-8 -*-\n#\n# PublicKey/DSA.py : DSA signature primitive\n#\n# Written in 2008 by Dwayne C. Litzenberger <d"
},
{
"path": "lib/Crypto/PublicKey/ElGamal.py",
"chars": 13587,
"preview": "#\n# ElGamal.py : ElGamal encryption/decryption and signatures\n#\n# Part of the Python Cryptography Toolkit\n#\n# Origin"
},
{
"path": "lib/Crypto/PublicKey/RSA.py",
"chars": 29242,
"preview": "# -*- coding: utf-8 -*-\n#\n# PublicKey/RSA.py : RSA public key primitive\n#\n# Written in 2008 by Dwayne C. Litzenberger <"
},
{
"path": "lib/Crypto/PublicKey/_DSA.py",
"chars": 3477,
"preview": "\n#\n# DSA.py : Digital Signature Algorithm\n#\n# Part of the Python Cryptography Toolkit\n#\n# Written by Andrew Kuchling"
},
{
"path": "lib/Crypto/PublicKey/_RSA.py",
"chars": 2762,
"preview": "#\n# RSA.py : RSA encryption/decryption\n#\n# Part of the Python Cryptography Toolkit\n#\n# Written by Andrew Kuchling, P"
},
{
"path": "lib/Crypto/PublicKey/__init__.py",
"chars": 1876,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/PublicKey/_slowmath.py",
"chars": 6510,
"preview": "# -*- coding: utf-8 -*-\n#\n# PubKey/RSA/_slowmath.py : Pure Python implementation of the RSA portions of _fastmath\n#\n# W"
},
{
"path": "lib/Crypto/PublicKey/pubkey.py",
"chars": 8221,
"preview": "#\n# pubkey.py : Internal functions for public key operations\n#\n# Part of the Python Cryptography Toolkit\n#\n# Written"
},
{
"path": "lib/Crypto/Random/Fortuna/FortunaAccumulator.py",
"chars": 6899,
"preview": "# -*- coding: ascii -*-\n#\n# FortunaAccumulator.py : Fortuna's internal accumulator\n#\n# Written in 2008 by Dwayne C. Lit"
},
{
"path": "lib/Crypto/Random/Fortuna/FortunaGenerator.py",
"chars": 5264,
"preview": "# -*- coding: ascii -*-\n#\n# FortunaGenerator.py : Fortuna's internal PRNG\n#\n# Written in 2008 by Dwayne C. Litzenberger"
},
{
"path": "lib/Crypto/Random/Fortuna/SHAd256.py",
"chars": 3098,
"preview": "# -*- coding: ascii -*-\n#\n# Random/Fortuna/SHAd256.py : SHA_d-256 hash function implementation\n#\n# Written in 2008 by D"
},
{
"path": "lib/Crypto/Random/Fortuna/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "lib/Crypto/Random/OSRNG/__init__.py",
"chars": 1542,
"preview": "#\n# Random/OSRNG/__init__.py : Platform-independent OS RNG API\n#\n# Written in 2008 by Dwayne C. Litzenberger <dlitz@dli"
},
{
"path": "lib/Crypto/Random/OSRNG/fallback.py",
"chars": 1520,
"preview": "#\n# Random/OSRNG/fallback.py : Fallback entropy source for systems with os.urandom\n#\n# Written in 2008 by Dwayne C. Lit"
},
{
"path": "lib/Crypto/Random/OSRNG/nt.py",
"chars": 2715,
"preview": "#\n# Random/OSRNG/nt.py : OS entropy source for MS Windows\n#\n# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.ne"
},
{
"path": "lib/Crypto/Random/OSRNG/posix.py",
"chars": 2835,
"preview": "#\n# Random/OSRNG/posix.py : OS entropy source for POSIX systems\n#\n# Written in 2008 by Dwayne C. Litzenberger <dlitz@dl"
},
{
"path": "lib/Crypto/Random/OSRNG/rng_base.py",
"chars": 2875,
"preview": "#\n# Random/OSRNG/rng_base.py : Base class for OSRNG\n#\n# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>\n#\n#"
},
{
"path": "lib/Crypto/Random/_UserFriendlyRNG.py",
"chars": 7629,
"preview": "# -*- coding: utf-8 -*-\n#\n# Random/_UserFriendlyRNG.py : A user-friendly random number generator\n#\n# Written in 2008 by"
},
{
"path": "lib/Crypto/Random/__init__.py",
"chars": 1669,
"preview": "# -*- coding: utf-8 -*-\n#\n# Random/__init__.py : PyCrypto random number generation\n#\n# Written in 2008 by Dwayne C. Lit"
},
{
"path": "lib/Crypto/Random/random.py",
"chars": 5482,
"preview": "# -*- coding: utf-8 -*-\n#\n# Random/random.py : Strong alternative for the standard 'random' module\n#\n# Written in 2008 "
},
{
"path": "lib/Crypto/SelfTest/Cipher/__init__.py",
"chars": 2401,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Cipher/__init__.py: Self-test for cipher modules\n#\n# Written in 2008 by Dwayne C. "
},
{
"path": "lib/Crypto/SelfTest/Cipher/common.py",
"chars": 31692,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/common.py: Common code for Crypto.SelfTest.Hash\n#\n# Written in 2008 by Dwayne"
},
{
"path": "lib/Crypto/SelfTest/Cipher/test_AES.py",
"chars": 104775,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Cipher/AES.py: Self-test for the AES cipher\n#\n# Written in 2008 by Dwayne C. Litze"
},
{
"path": "lib/Crypto/SelfTest/Cipher/test_ARC2.py",
"chars": 4945,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Cipher/ARC2.py: Self-test for the Alleged-RC2 cipher\n#\n# Written in 2008 by Dwayne"
},
{
"path": "lib/Crypto/SelfTest/Cipher/test_ARC4.py",
"chars": 24516,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Cipher/ARC4.py: Self-test for the Alleged-RC4 cipher\n#\n# Written in 2008 by Dwayne"
},
{
"path": "lib/Crypto/SelfTest/Cipher/test_Blowfish.py",
"chars": 5832,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Cipher/test_Blowfish.py: Self-test for the Blowfish cipher\n#\n# Written in 2008 by "
},
{
"path": "lib/Crypto/SelfTest/Cipher/test_CAST.py",
"chars": 1977,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Cipher/CAST.py: Self-test for the CAST-128 (CAST5) cipher\n#\n# Written in 2008 by D"
},
{
"path": "lib/Crypto/SelfTest/Cipher/test_DES.py",
"chars": 15009,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Cipher/DES.py: Self-test for the (Single) DES cipher\n#\n# Written in 2008 by Dwayne"
},
{
"path": "lib/Crypto/SelfTest/Cipher/test_DES3.py",
"chars": 15558,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Cipher/DES3.py: Self-test for the Triple-DES cipher\n#\n# Written in 2008 by Dwayne "
},
{
"path": "lib/Crypto/SelfTest/Cipher/test_XOR.py",
"chars": 2538,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Cipher/XOR.py: Self-test for the XOR \"cipher\"\n#\n# Written in 2008 by Dwayne C. Lit"
},
{
"path": "lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py",
"chars": 7342,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Cipher/test_pkcs1_15.py: Self-test for PKCS#1 v1.5 encryption\n#\n# ================"
},
{
"path": "lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py",
"chars": 17319,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Cipher/test_pkcs1_oaep.py: Self-test for PKCS#1 OAEP encryption\n#\n# =============="
},
{
"path": "lib/Crypto/SelfTest/Hash/__init__.py",
"chars": 2648,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/__init__.py: Self-test for hash modules\n#\n# Written in 2008 by Dwayne C. Litz"
},
{
"path": "lib/Crypto/SelfTest/Hash/common.py",
"chars": 9725,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/common.py: Common code for Crypto.SelfTest.Hash\n#\n# Written in 2008 by Dwayne"
},
{
"path": "lib/Crypto/SelfTest/Hash/test_CMAC.py",
"chars": 7052,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/CMAC.py: Self-test for the CMAC module\n#\n# =================================="
},
{
"path": "lib/Crypto/SelfTest/Hash/test_HMAC.py",
"chars": 8472,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/HMAC.py: Self-test for the HMAC module\n#\n# Written in 2008 by Dwayne C. Litze"
},
{
"path": "lib/Crypto/SelfTest/Hash/test_MD2.py",
"chars": 2346,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/MD2.py: Self-test for the MD2 hash function\n#\n# Written in 2008 by Dwayne C. "
},
{
"path": "lib/Crypto/SelfTest/Hash/test_MD4.py",
"chars": 2346,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/MD4.py: Self-test for the MD4 hash function\n#\n# Written in 2008 by Dwayne C. "
},
{
"path": "lib/Crypto/SelfTest/Hash/test_MD5.py",
"chars": 2346,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/MD5.py: Self-test for the MD5 hash function\n#\n# Written in 2008 by Dwayne C. "
},
{
"path": "lib/Crypto/SelfTest/Hash/test_RIPEMD160.py",
"chars": 2685,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/test_RIPEMD160.py: Self-test for the RIPEMD-160 hash function\n#\n# Written in "
},
{
"path": "lib/Crypto/SelfTest/Hash/test_SHA1.py",
"chars": 2300,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/SHA1.py: Self-test for the SHA-1 hash function\n#\n# Written in 2008 by Dwayne "
},
{
"path": "lib/Crypto/SelfTest/Hash/test_SHA224.py",
"chars": 2559,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/test_SHA224.py: Self-test for the SHA-224 hash function\n#\n# Written in 2008 b"
},
{
"path": "lib/Crypto/SelfTest/Hash/test_SHA256.py",
"chars": 3641,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/test_SHA256.py: Self-test for the SHA-256 hash function\n#\n# Written in 2008 b"
},
{
"path": "lib/Crypto/SelfTest/Hash/test_SHA384.py",
"chars": 2740,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/test_SHA.py: Self-test for the SHA-384 hash function\n#\n# Written in 2008 by D"
},
{
"path": "lib/Crypto/SelfTest/Hash/test_SHA512.py",
"chars": 2827,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Hash/test_SHA512.py: Self-test for the SHA-512 hash function\n#\n# Written in 2008 b"
},
{
"path": "lib/Crypto/SelfTest/IO/__init__.py",
"chars": 1347,
"preview": "#\n# SelfTest/IO/__init__.py: Self-test for input/output module\n#\n# ===================================================="
},
{
"path": "lib/Crypto/SelfTest/IO/test_PKCS8.py",
"chars": 17101,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/PublicKey/test_PKCS8.py: Self-test for the PKCS8 module\n#\n# ======================"
},
{
"path": "lib/Crypto/SelfTest/Protocol/__init__.py",
"chars": 1852,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Protocol/__init__.py: Self-tests for Crypto.Protocol\n#\n# Written in 2008 by Dwayne"
},
{
"path": "lib/Crypto/SelfTest/Protocol/test_AllOrNothing.py",
"chars": 3024,
"preview": "#\n# Test script for Crypto.Protocol.AllOrNothing\n#\n# Part of the Python Cryptography Toolkit\n#\n# Written by Andrew Kuchl"
},
{
"path": "lib/Crypto/SelfTest/Protocol/test_KDF.py",
"chars": 5777,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Protocol/test_KDF.py: Self-test for key derivation functions\n#\n# ================="
},
{
"path": "lib/Crypto/SelfTest/Protocol/test_chaffing.py",
"chars": 2972,
"preview": "#\n# Test script for Crypto.Protocol.Chaffing\n#\n# Part of the Python Cryptography Toolkit\n#\n# Written by Andrew Kuchling "
},
{
"path": "lib/Crypto/SelfTest/Protocol/test_rfc1751.py",
"chars": 2208,
"preview": "#\n# Test script for Crypto.Util.RFC1751.\n#\n# Part of the Python Cryptography Toolkit\n#\n# Written by Andrew Kuchling and "
},
{
"path": "lib/Crypto/SelfTest/PublicKey/__init__.py",
"chars": 1969,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/PublicKey/__init__.py: Self-test for public key crypto\n#\n# Written in 2008 by Dway"
},
{
"path": "lib/Crypto/SelfTest/PublicKey/test_DSA.py",
"chars": 9439,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/PublicKey/test_DSA.py: Self-test for the DSA primitive\n#\n# Written in 2008 by Dway"
},
{
"path": "lib/Crypto/SelfTest/PublicKey/test_ElGamal.py",
"chars": 8518,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/PublicKey/test_ElGamal.py: Self-test for the ElGamal primitive\n#\n# ==============="
},
{
"path": "lib/Crypto/SelfTest/PublicKey/test_RSA.py",
"chars": 19810,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/PublicKey/test_RSA.py: Self-test for the RSA primitive\n#\n# Written in 2008 by Dway"
},
{
"path": "lib/Crypto/SelfTest/PublicKey/test_import_DSA.py",
"chars": 18637,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/PublicKey/test_import_DSA.py: Self-test for importing DSA keys\n#\n# ==============="
},
{
"path": "lib/Crypto/SelfTest/PublicKey/test_import_RSA.py",
"chars": 17917,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/PublicKey/test_importKey.py: Self-test for importing RSA keys\n#\n# ================"
},
{
"path": "lib/Crypto/SelfTest/Random/Fortuna/__init__.py",
"chars": 1825,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Random/Fortuna/__init__.py: Self-test for Fortuna modules\n#\n# Written in 2008 by D"
},
{
"path": "lib/Crypto/SelfTest/Random/Fortuna/test_FortunaAccumulator.py",
"chars": 8753,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Random/Fortuna/test_FortunaAccumulator.py: Self-test for the FortunaAccumulator mo"
},
{
"path": "lib/Crypto/SelfTest/Random/Fortuna/test_FortunaGenerator.py",
"chars": 3506,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Random/Fortuna/test_FortunaGenerator.py: Self-test for the FortunaGenerator module"
},
{
"path": "lib/Crypto/SelfTest/Random/Fortuna/test_SHAd256.py",
"chars": 2419,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Random/Fortuna/test_SHAd256.py: Self-test for the SHAd256 hash function\n#\n# Writte"
},
{
"path": "lib/Crypto/SelfTest/Random/OSRNG/__init__.py",
"chars": 2082,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Random/OSRNG/__init__.py: Self-test for OSRNG modules\n#\n# Written in 2008 by Dwayn"
},
{
"path": "lib/Crypto/SelfTest/Random/OSRNG/test_fallback.py",
"chars": 1795,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_fallback.py: Self-test for the OSRNG.fallback.new() function\n#\n# Written"
},
{
"path": "lib/Crypto/SelfTest/Random/OSRNG/test_generic.py",
"chars": 1746,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_generic.py: Self-test for the OSRNG.new() function\n#\n# Written in 2008 b"
},
{
"path": "lib/Crypto/SelfTest/Random/OSRNG/test_nt.py",
"chars": 1764,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_generic.py: Self-test for the OSRNG.nt.new() function\n#\n# Written in 200"
},
{
"path": "lib/Crypto/SelfTest/Random/OSRNG/test_posix.py",
"chars": 1777,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_posix.py: Self-test for the OSRNG.posix.new() function\n#\n# Written in 20"
},
{
"path": "lib/Crypto/SelfTest/Random/OSRNG/test_winrandom.py",
"chars": 1777,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_winrandom.py: Self-test for the winrandom module\n#\n# Written in 2008 by "
},
{
"path": "lib/Crypto/SelfTest/Random/__init__.py",
"chars": 1973,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Random/__init__.py: Self-test for random number generation modules\n#\n# Written in "
},
{
"path": "lib/Crypto/SelfTest/Random/test__UserFriendlyRNG.py",
"chars": 5702,
"preview": "# -*- coding: utf-8 -*-\n# Self-tests for the user-friendly Crypto.Random interface\n#\n# Written in 2013 by Dwayne C. Litz"
},
{
"path": "lib/Crypto/SelfTest/Random/test_random.py",
"chars": 7112,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_generic.py: Self-test for the Crypto.Random.new() function\n#\n# Written i"
},
{
"path": "lib/Crypto/SelfTest/Random/test_rpoolcompat.py",
"chars": 2030,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_winrandom.py: Self-test for the winrandom module\n#\n# Written in 2008 by "
},
{
"path": "lib/Crypto/SelfTest/Signature/__init__.py",
"chars": 1514,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Signature/__init__.py: Self-test for signature modules\n#\n# ======================="
},
{
"path": "lib/Crypto/SelfTest/Signature/test_pkcs1_15.py",
"chars": 10948,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Signature/test_pkcs1_15.py: Self-test for PKCS#1 v1.5 signatures\n#\n# ============="
},
{
"path": "lib/Crypto/SelfTest/Signature/test_pkcs1_pss.py",
"chars": 20665,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Signature/test_pkcs1_pss.py: Self-test for PKCS#1 PSS signatures\n#\n# ============="
},
{
"path": "lib/Crypto/SelfTest/Util/__init__.py",
"chars": 1841,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/__init__.py: Self-test for utility modules\n#\n# Written in 2008 by Dwayne C. L"
},
{
"path": "lib/Crypto/SelfTest/Util/test_Counter.py",
"chars": 6415,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_Counter: Self-test for the Crypto.Util.Counter module\n#\n# Written in 200"
},
{
"path": "lib/Crypto/SelfTest/Util/test_Padding.py",
"chars": 5102,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_Padding.py: Self-test for padding functions\n#\n# ========================"
},
{
"path": "lib/Crypto/SelfTest/Util/test_asn1.py",
"chars": 25019,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_asn.py: Self-test for the Crypto.Util.asn1 module\n#\n# =================="
},
{
"path": "lib/Crypto/SelfTest/Util/test_number.py",
"chars": 14833,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_number.py: Self-test for parts of the Crypto.Util.number module\n#\n# Writ"
},
{
"path": "lib/Crypto/SelfTest/Util/test_winrandom.py",
"chars": 1772,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/Util/test_winrandom.py: Self-test for the winrandom module\n#\n# Written in 2008 by "
},
{
"path": "lib/Crypto/SelfTest/__init__.py",
"chars": 3547,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/__init__.py: Self-test for PyCrypto\n#\n# Written in 2008 by Dwayne C. Litzenberger "
},
{
"path": "lib/Crypto/SelfTest/st_common.py",
"chars": 3057,
"preview": "# -*- coding: utf-8 -*-\n#\n# SelfTest/st_common.py: Common functions for SelfTest modules\n#\n# Written in 2008 by Dwayne "
},
{
"path": "lib/Crypto/Signature/PKCS1_PSS.py",
"chars": 12874,
"preview": "# -*- coding: utf-8 -*-\n#\n# Signature/PKCS1_PSS.py : PKCS#1 PPS\n#\n# ==================================================="
},
{
"path": "lib/Crypto/Signature/PKCS1_v1_5.py",
"chars": 11949,
"preview": "# -*- coding: utf-8 -*-\n#\n# Signature/PKCS1-v1_5.py : PKCS#1 v1.5\n#\n# ================================================="
},
{
"path": "lib/Crypto/Signature/__init__.py",
"chars": 1202,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/Util/Counter.py",
"chars": 5536,
"preview": "# -*- coding: ascii -*-\n#\n# Util/Counter.py : Fast counter for use with CTR-mode ciphers\n#\n# Written in 2008 by Dwayne "
},
{
"path": "lib/Crypto/Util/Padding.py",
"chars": 3815,
"preview": "#\n# -*- coding: utf-8 -*-\n#\n# Util/Padding.py : Functions to manage padding\n#\n# ======================================"
},
{
"path": "lib/Crypto/Util/RFC1751.py",
"chars": 21186,
"preview": "# rfc1751.py : Converts between 128-bit strings and a human-readable\n# sequence of words, as defined in RFC1751: \"A Conv"
},
{
"path": "lib/Crypto/Util/__init__.py",
"chars": 1964,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/Util/_number_new.py",
"chars": 4051,
"preview": "# -*- coding: ascii -*-\n#\n# Util/_number_new.py : utility functions\n#\n# Written in 2008 by Dwayne C. Litzenberger <dlit"
},
{
"path": "lib/Crypto/Util/_time.py",
"chars": 1229,
"preview": "# -*- coding: ascii -*-\n#\n# _time.py : Internal monotonic time module.\n#\n# Written in 2013 by Dwayne C. Litzenberger <d"
},
{
"path": "lib/Crypto/Util/asn1.py",
"chars": 29507,
"preview": "# -*- coding: ascii -*-\n#\n# Util/asn1.py : Minimal support for ASN.1 DER binary encoding.\n#\n# ========================="
},
{
"path": "lib/Crypto/Util/number.py",
"chars": 95488,
"preview": "#\n# number.py : Number-theoretic functions\n#\n# Part of the Python Cryptography Toolkit\n#\n# Written by Andrew M. Kuch"
},
{
"path": "lib/Crypto/Util/py21compat.py",
"chars": 3261,
"preview": "# -*- coding: utf-8 -*-\n#\n# Util/py21compat.py : Compatibility code for Python 2.1\n#\n# Written in 2008 by Dwayne C. Lit"
},
{
"path": "lib/Crypto/Util/py3compat.py",
"chars": 4112,
"preview": "# -*- coding: utf-8 -*-\n#\n# Util/py3compat.py : Compatibility code for handling Py3k / Python 2.x\n#\n# Written in 2010 b"
},
{
"path": "lib/Crypto/Util/randpool.py",
"chars": 2768,
"preview": "#\n# randpool.py : Cryptographically strong random number generation\n#\n# Part of the Python Cryptography Toolkit\n#\n# Wri"
},
{
"path": "lib/Crypto/Util/winrandom.py",
"chars": 1196,
"preview": "#\n# Util/winrandom.py : Stub for Crypto.Random.OSRNG.winrandom\n#\n# Written in 2008 by Dwayne C. Litzenberger <dlitz@dli"
},
{
"path": "lib/Crypto/__init__.py",
"chars": 1997,
"preview": "# -*- coding: utf-8 -*-\n#\n# ===================================================================\n# The contents of this f"
},
{
"path": "lib/Crypto/pct_warnings.py",
"chars": 2432,
"preview": "# -*- coding: ascii -*-\n#\n# pct_warnings.py : PyCrypto warnings file\n#\n# Written in 2008 by Dwayne C. Litzenberger <dli"
},
{
"path": "m4/ax_append_flag.m4",
"chars": 2756,
"preview": "# ===========================================================================\n# http://www.gnu.org/software/autocon"
},
{
"path": "m4/ax_check_compile_flag.m4",
"chars": 3241,
"preview": "# ===========================================================================\n# http://www.gnu.org/software/autoconf-a"
},
{
"path": "m4/ax_check_link_flag.m4",
"chars": 3056,
"preview": "# ===========================================================================\n# http://www.gnu.org/software/autoconf-"
},
{
"path": "m4/ax_check_preproc_flag.m4",
"chars": 3180,
"preview": "# ===========================================================================\n# http://www.gnu.org/software/autoconf-a"
},
{
"path": "pct-speedtest.py",
"chars": 17786,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# pct-speedtest.py: Speed test for the Python Cryptography Toolkit\n#\n# "
},
{
"path": "python-3-changes.txt",
"chars": 4600,
"preview": "Py code:\n\nsetup.py invokes 2to3 automatically. This handles int/long and print issues,\n among others.\nsetup.py will touc"
},
{
"path": "setup.py",
"chars": 20471,
"preview": "#! /usr/bin/env python\n#\n# setup.py : Distutils setup script\n#\n# Part of the Python Cryptography Toolkit\n#\n# ========="
},
{
"path": "src/AES.c",
"chars": 61658,
"preview": "/**\n * rijndael-alg-fst.c\n *\n * @version 3.0 (December 2000)\n *\n * Optimised ANSI C code for the Rijndael cipher (now AE"
},
{
"path": "src/AESNI.c",
"chars": 10371,
"preview": "/*\n * AESNI.c: AES using AES-NI instructions\n *\n * Written in 2013 by Sebastian Ramacher <sebastian@ramacher.at>\n *\n * "
},
{
"path": "src/ARC2.c",
"chars": 7013,
"preview": "/*\n * rc2.c : Source code for the RC2 block cipher\n *\n * Part of the Python Cryptography Toolkit\n *\n * ================"
},
{
"path": "src/ARC4.c",
"chars": 2424,
"preview": "\n/*\n * arc4.c : Implementation for the Alleged-RC4 stream cipher\n *\n * Part of the Python Cryptography Toolkit\n *\n * Or"
},
{
"path": "src/Blowfish-tables.h",
"chars": 15935,
"preview": "/*\n *\n * Blowfish-tables.h : Initial-value tables for Blowfish\n *\n * Written in 2008 by Dwayne C. Litzenberger <dlitz@d"
},
{
"path": "src/Blowfish.c",
"chars": 6439,
"preview": "/*\n *\n * Blowfish.c : Blowfish implementation\n *\n * Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>\n *\n * ="
},
{
"path": "src/CAST.c",
"chars": 12166,
"preview": "/*\n cast.c -- implementation of CAST-128 (aka CAST5) as described in RFC2144\n\n Written in 1997 by Wim Lewis <wiml@hh"
},
{
"path": "src/DES.c",
"chars": 3891,
"preview": "/*\n * DES.c: DES/3DES support for PyCrypto using LibTomCrypt\n *\n * Written in 2009 by Dwayne C. Litzenberger <dlitz@dli"
},
{
"path": "src/DES3.c",
"chars": 1153,
"preview": "/*\n * DES3.c: 3DES support for PyCrypto using LibTomCrypt\n *\n * Written in 2009 by Dwayne C. Litzenberger <dlitz@dlitz."
},
{
"path": "src/MD2.c",
"chars": 4641,
"preview": "\n/*\n * md2.c : MD2 hash algorithm.\n *\n * Part of the Python Cryptography Toolkit\n *\n * Originally written by: A.M. Kuch"
},
{
"path": "src/MD4.c",
"chars": 6775,
"preview": "\n/*\n * md4.c : MD4 hash algorithm.\n *\n * Part of the Python Cryptography Toolkit\n *\n * Originally written by: A.M. Kuch"
},
{
"path": "src/RIPEMD160.c",
"chars": 15303,
"preview": "/*\n *\n * RIPEMD160.c : RIPEMD-160 implementation\n *\n * Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>\n *\n "
},
{
"path": "src/SHA224.c",
"chars": 3562,
"preview": "/*\n * An implementation of the SHA-224 hash function.\n *\n * The Federal Information Processing Standards (FIPS) Specific"
},
{
"path": "src/SHA256.c",
"chars": 3570,
"preview": "/*\n * An implementation of the SHA-256 hash function.\n *\n * The Federal Information Processing Standards (FIPS) Specific"
},
{
"path": "src/SHA384.c",
"chars": 4495,
"preview": "/*\n * An implementation of the SHA-384 hash function.\n *\n * The Federal Information Processing Standards (FIPS) Specific"
},
{
"path": "src/SHA512.c",
"chars": 4495,
"preview": "/*\n * An implementation of the SHA-512 hash function.\n *\n * The Federal Information Processing Standards (FIPS) Specific"
},
{
"path": "src/XOR.c",
"chars": 2132,
"preview": "/*\n * xor.c : Source for the trivial cipher which XORs the message with the key.\n * The key can be up to 32 by"
},
{
"path": "src/_counter.c",
"chars": 16305,
"preview": "/*\n * _counter.c: Fast counter for use with CTR-mode ciphers\n *\n * Written in 2008 by Dwayne C. Litzenberger <dlitz@dli"
},
{
"path": "src/_counter.h",
"chars": 2103,
"preview": "/*\n * _counter.h: Fast counter for use with CTR-mode ciphers\n *\n * Written in 2008 by Dwayne C. Litzenberger <dlitz@dli"
},
{
"path": "src/_fastmath.c",
"chars": 119764,
"preview": "/*\n * _fastmath.c: Accelerator module that uses GMP for faster numerics.\n *\n * Part of the Python Cryptography Toolkit\n"
},
{
"path": "src/block_template.c",
"chars": 23391,
"preview": "\n/* -*- C -*- */\n/*\n * block_template.c : Generic framework for block encryption algorithms\n *\n * Written by Andrew Kuc"
},
{
"path": "src/cast5.c",
"chars": 24950,
"preview": "/*\n These are the S-boxes for CAST5 as given in RFC 2144.\n*/\n\n#include \"pycrypto_common.h\"\n\nstatic const uint32 S1[256"
},
{
"path": "src/config.h.in",
"chars": 5372,
"preview": "/* src/config.h.in. Generated from configure.ac by autoheader. */\n\n/* Define to 1 if you have the `aligned_alloc' func"
},
{
"path": "src/cpuid.c",
"chars": 2812,
"preview": "/*\n * cpuid.c: check CPU capabilities\n *\n * Written in 2013 by Sebastian Ramacher <sebastian@ramacher.at>\n *\n * ======="
},
{
"path": "src/galois.c",
"chars": 8608,
"preview": "/*\n * galois.c: arithmetic in Galois Fields\n *\n * ===================================================================\n "
},
{
"path": "src/hash_SHA2.h",
"chars": 2959,
"preview": "/*\n * An generic header for the SHA-2 hash family.\n *\n * Written in 2010 by Lorenz Quack <don@amberfisharts.com>\n * \n * "
},
{
"path": "src/hash_SHA2_template.c",
"chars": 5966,
"preview": "/*\n * An generic implementation of the SHA-2 hash family, this is endian neutral\n * so should work just about anywhere.\n"
}
]
// ... and 25 more files (download for full content)
About this extraction
This page contains the full source code of the pycrypto/pycrypto GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 225 files (2.3 MB), approximately 603.5k tokens, and a symbol index with 1451 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.