summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Blowfish: Rename decrypt() to inline_decrypt() to match previous commitDwayne C. Litzenberger2009-04-251-2/+2
|
* Blowfish: Fix conflicting declaration for "encrypt" on Mac OS XKouki Hashimoto2009-04-251-7/+7
| | | | | | | Apparently OS X declares an "encrypt" function in its unistd.h. Patch posted to Lauchpad by Kouki Hashimoto. See https://bugs.launchpad.net/pycrypto/+bug/361058
* Clean up remaining symbol table pollution (DES and DES3 modules)Dwayne C. Litzenberger2009-03-043-63/+27
|
* Reduce symbol table pollution by declaring most things "static".Dwayne C. Litzenberger2009-03-045-37/+37
| | | | Handy command: nm -g --extern-only `find . -name \*.so`
* DES: Rename des.c to tomcrypt_des.c to avoid confusion with DES.c on ↵Dwayne C. Litzenberger2009-03-012-1/+1
| | | | | | | case-insensitive filesystems I don't know if this would have caused problems on Windows, but I'm doing this anyway to avoid any potential issues.
* DES: Add new DES.c and DES3.c modules that use libtomcryptDwayne C. Litzenberger2009-03-012-0/+150
|
* Add files from libtomcrypt-1.16Dwayne C. Litzenberger2009-03-0114-0/+5944
| | | | | LibTomCrypt is a public domain cryptography library developed by Tom St. Denis and others. It is available at http://www.libtomcrypt.com/.
* Add new Blowfish implementationDwayne C. Litzenberger2009-03-012-0/+501
| | | | | I wrote this implementation last year without looking at any other implementation.
* Remove Blowfish, DES, DES3, IDEA, RC5, and XOR modulesDwayne C. Litzenberger2009-03-016-2325/+0
| | | | | | | | | | | | | | | | | | | | | | | Because: - Blowfish: Uses the original (ambiguous) PyCrypto license. The documentation says "the Blowfish algorithm has been placed in the public domain and can be used freely", but this seems to be referring to patents, not copyright. - DES: The file says "Copyright (C) 1993 Eric Young", and appears to have been taken from SSLeay. The license of SSLeay is not GPL-compatible, since it has an advertising clause. - DES3: Same reason as for the DES module. - IDEA: Patent-encumbered. - RC5: Patent-encumbered. - XOR: Insecure as a stream cipher, and it silently truncates "keys" to 32 bytes. The strxor module is a better replacement if you want to do a bitwise exclusive-or between strings.
* Legal: Clarify public-domain dedication of src/CAST.cDwayne C. Litzenberger2009-03-011-10/+27
| | | | | | | | | This is permissible under copyright law, since both authors (Wim Lewis and Andrew Kuchling) have explicitly dedicated their PyCrypto contributions to the public domain. This change also removes the out-of-date "History" section. Up-to-date changelog information can be obtained from the source code repository.
* Legal: Dedicate my files to the public domain.Dwayne C. Litzenberger2009-03-016-121/+102
| | | | | | | | | | | | | In an attempt to simplify the copyright status of PyCrypto, I'm placing my code into the public domain, and encouraging other contributors to do the same. I have used a public domain dedication that was recommended in a book on FOSS legal issues[1], followed by the warranty disclaimer boilerplate from the MIT license. [1] _Intellectual Property and Open Source: A Practical Guide to Protecting Code_, a book written by Van Lindberg and published by O'Reilly Media. (ISBN 978-0-596-51796-0)
* ARC2: Fix buffer overflowDwayne C. Litzenberger2009-02-061-0/+7
| | | | | Thanks to Mike Wiacek <mjwiacek@google.com> from the Google Security Team for reporting this bug.
* Add "signed" keyword to inc-msvc/stdint.h, just to be sure.Dwayne C. Litzenberger2008-11-161-4/+4
|
* MSVC-specific fixes and workaroundsDwayne C. Litzenberger2008-11-163-3/+50
|
* Counter: Fix segfault on 64-bit machines when calling .get_value() on a ↵Dwayne Litzenberger2008-11-051-1/+2
| | | | | | | | | | | little-endian counter .get_value() iterates throught the bytes from left-to-right (increment = 1) for big-endian counters, and right-to-left (increment = -1) for little-endian counters. Since we had declared the "increment" variable as "unsigned int", we instead were adding 2^32-1 to a pointer. This achieved the desired result on 32-bit machines, where pointers are also 32 bits, but caused a crash on 64-bit machines.
* Remove old dead code: src/_dsa.c and src/_rsa.cDwayne C. Litzenberger2008-11-022-677/+0
| | | | | | These were added by z3p in 934a38b75eca23cd6b46f651190e80ac0ca7cebf, and probably should have been removed in 960d827e5d7faa3add0187c96de92795bff56047 when they were merged to form src/_fastmath.c.
* Util.Counter: Speed up CTR mode using shortcutDwayne C. Litzenberger2008-10-193-70/+176
| | | | | This change allows CTR-mode ciphers to bypass the Python function call mechanism when using counter objects created using Crypto.Util.Counter.
* Util.Counter: Make the interface more intuitiveDwayne C. Litzenberger2008-10-191-17/+13
| | | | | - Replace ctr.next() with ctr() - Replace ctr.get_value() with ctr.next_value()
* Util.Counter: Rename typedef my_CounterObject -> PCT_CounterObjectDwayne C. Litzenberger2008-10-191-16/+16
|
* _fastmath:longObjToMPZ: Set variable to zero at startDwayne C. Litzenberger2008-10-161-0/+1
| | | | | | | Nothing in _fastmath.c needs this right now, but if longObjToMPZ were passed a non-zero integer variable, then its output would be incorrect. Thanks to Sergey Chernov <sergey.chernov@thrift.ru> for pointing out this bug.
* Util.Counter: Don't use new-style types, because Python 2.1 doesn't support ↵Dwayne C. Litzenberger2008-09-211-58/+80
| | | | that.
* Util.Counter: Add Crypto.Util.Counter and Crypto.Util._counter modulesDwayne C. Litzenberger2008-09-211-0/+391
|
* Add Py_CLEAR macro to pycrypto_compat.hDwayne C. Litzenberger2008-09-211-0/+13
|
* RC5: Fix buffer overrun and test failures.Dwayne C. Litzenberger2008-09-162-9/+22
| | | | | | | | | Before this fix, the RC5 module would overrun its "L" buffer whenever the specified number of rounds exceeded 49 (the runtime check allowed up to 255 rounds). Also, any time the length of the key was less than a multiple of 4 bytes, the RC5 module would operate incorrectly. This commit fixes both bugs.
* RIPEMD160: Detect endianness at build-time rather than at runtimeDwayne C. Litzenberger2008-09-151-22/+10
|
* RIPEMD160: Add new C implementation (RIPEMD160.c)Dwayne C. Litzenberger2008-09-151-0/+432
| | | | Also, disable the Python implementation (it's really slow)
* RIPEMD: Remove the old RIPEMD.c module due to copyright concernsDwayne C. Litzenberger2008-09-151-517/+0
| | | | | | | | | | | | | | | | The copyright notice and disclaimer at the top of RIPEMD.c says: Copyright (c) Katholieke Universiteit Leuven 1996, All Rights Reserved The Katholieke Universiteit Leuven makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. These notices must be retained in any copies of any part of this documentation and/or software. To me, it seems as though the software was intended to be freely distributed, as long as the notice and disclaimer are included. However, no such permission is explicitly granted, so I am removing the module (without looking at its contents).
* Fix some more compiler warnings (gcc/Linux-i386)Dwayne C. Litzenberger2008-09-152-4/+4
|
* Fix compiler warnings (MinGW/Win32)Dwayne C. Litzenberger2008-09-152-7/+6
|
* setup.py: Resurrect the winrandom module (Win32)Dwayne C. Litzenberger2008-09-151-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three things that, when combined, produce exploitably-weak random number generation reminiscent of the infamous Debian libssl fiasco (CVE-2008-0166): 1. Microsoft Windows 2. A long-standing bug in PyCrypto's setup.py that omits the "winrandom" module from the build procedure, causing RandomPool to be seeded weakly when it is instantiated. 3. A tendency among PyCrypto's users to (incorrectly) treat RandomPool as a portable substitute for reading from /dev/urandom. RandomPool was never intended as a complete RNG, but I have seen several cases where it has been treated as one. (See footnote.) This commit provides a quick fix for #2. Future work will attempt to fix #3 by providing users with a "works out-of-the-box" random number generation API. Fixing #1 probably won't happen any time soon, though reports of the initial success of Windows Vista suggest that Microsoft may be working hard on the problem. Footnote: For more information about the misuse of RandomPool, see: http://lists.dlitz.net/pipermail/pycrypto/2008q3/000000.html http://www.lag.net/pipermail/paramiko/2008-January/000599.html http://www.lag.net/pipermail/paramiko/2008-April/000678.html https://bugs.launchpad.net/pycrypto/+bug/249765
* Whitespace: Replace CRLF with LF in src/SHA256.cDwayne C. Litzenberger2008-09-151-209/+209
| | | | | | | The canonical line terminator in a git repository is the LF character (ASCII 10), and Win32 versions of git now do CRLF <-> LF conversions by default. So, despite what one might think, this actually makes things easier for developers using Win32.
* Add Crypto.Util.strxor module, and speed up HMAC using it. (For real this ↵Dwayne C. Litzenberger2008-09-142-0/+280
| | | | | | | | time.) Robey Pointer made an earlier commit that purported to do this (20092c55113afe61da2b6143d8fc5c979622c625), but he forgot to include the C code, and it never ended up being published.
* ARC2: Add 'effective_keylen' keyword parameter so we can pass the RFC 2268 testsDwayne C. Litzenberger2008-09-142-8/+28
|
* Clean up RCS keywords ($Id ... $ -> $Id$).Dwayne C. Litzenberger2008-08-081-1/+1
| | | | | RCS-style keywords don't well in distributed revision control systems. If you want to use them, do it as part of your build process.
* [project @ robey@lag.net-20060815024756-0ee4d018bde70abe]Robey Pointer2006-08-145-11/+21
| | | | fix a few gcc warnings about signed/unsigned char and system-header-defined macros
* [project @ akuchling-20051130021621-801cd274a9838593]akuchling2005-11-291-12/+21
| | | | | [project @ 2005-11-29 18:16:21 by akuchling] Fix 32-bit length limitation in SHA256
* [project @ akuchling-20051130003136-46251f33241838ee]akuchling2005-11-291-2/+2
| | | | | [project @ 2005-11-29 16:31:36 by akuchling] Fix SHA256 padding bug
* [project @ akuchling-20050611022255-6c23c4eace44d242]akuchling2005-06-101-1/+3
| | | | | [project @ 2005-06-10 19:22:55 by akuchling] [Mentioned in bug #1154530] SHA256 didn't work correctly on Alpha
* [project @ akuchling-20050611021758-7931db340216dfce]akuchling2005-06-101-11/+16
| | | | | [project @ 2005-06-10 19:17:58 by akuchling] [Bug #1185980] Fix SHA256 on AMD64
* [project @ akuchling-20050611020756-4c1a83ea8d5f96b6]akuchling2005-06-101-0/+2
| | | | | [project @ 2005-06-10 19:07:56 by akuchling] [Bug #1185980] Fix RIPEMD on AMD64
* [project @ akuchling-20031220025128-a9e2449d8bc6e4f2]akuchling2003-12-191-0/+193
| | | | | [project @ 2003-12-19 18:51:28 by akuchling] Add SHA256.c file
* [project @ akuchling-20031219220545-440db7cad1cceba5]akuchling2003-12-191-4/+4
| | | | | [project @ 2003-12-19 14:05:45 by akuchling] Compilation fixes for Borland C (from Jeethu Rao)
* [project @ jbontje-20030405032029-71b96c9493469cc8]jbontje2003-04-041-5/+9
| | | | | | [project @ 2003-04-04 19:20:29 by jbontje] calculate u if only p and q are given. jbontje 2003-04-04
* [project @ akuchling-20030404230213-a12af36a3f099773]akuchling2003-04-041-12/+1
| | | | | [project @ 2003-04-04 15:02:13 by akuchling] Delete commented-out decrefs
* [project @ akuchling-20030404225919-939985cdd158288b]akuchling2003-04-041-11/+61
| | | | | [project @ 2003-04-04 14:59:18 by akuchling] Add support for faster RSA decryption
* [project @ akuchling-20030404222839-62e9abf77ee8e8c9]akuchling2003-04-041-2/+2
| | | | | [project @ 2003-04-04 14:28:39 by akuchling] Correct error message
* [project @ akuchling-20030404052302-2c6ed96c80c415f8]akuchling2003-04-031-6/+8
| | | | | [project @ 2003-04-03 21:23:02 by akuchling] Remove redundant parens
* [project @ akuchling-20030404050012-9c266d466a642eb5]akuchling2003-04-031-14/+30
| | | | | [project @ 2003-04-03 21:00:12 by akuchling] Use PyFalse/PyTrue
* [project @ akuchling-20030404043941-da363b40d51bb9c6]akuchling2003-04-031-7/+7
| | | | | [project @ 2003-04-03 20:39:41 by akuchling] Rename hasprivate to has_private
* [project @ akuchling-20030404042652-58b7447277117f73]akuchling2003-04-031-1/+112
| | | | | [project @ 2003-04-03 20:26:52 by akuchling] Add fast helper functions for blinding