Commit graph

9 commits

Author SHA1 Message Date
Legrandin
6f310bc021 First implementation based on int 2014-12-06 12:04:10 +01:00
Legrandin
90d6d3dbcf Added support for PKCS#8-encrypted private keys.
The patch contains the following changes:

- Private RSA keys can be imported/exported in encrypted form,
  protected according to PKCS#8 and:

  * PBKDF2WithHMAC-SHA1AndDES-EDE3-CBC.
  * PBKDF2WithHMAC-SHA1AndAES128-CBC
  * PBKDF2WithHMAC-SHA1AndAES192-CBC
  * PBKDF2WithHMAC-SHA1AndAES256-CBC

  In addition to that, it is possible to import keys i the
  following weak formats:

  * pbeWithMD5AndDES-CBC
  * pbeWithSHA1AndRC2-CBC
  * pbeWithMD5AndRC2-CBC
  * pbeWithSHA1AndDES-CBC

- The following new module (and 1 new package) are added:

  * Crypto.Util.Padding for simple padding/unpadding logic
  * Crypto.IO._PBES for PBE-related PKCS#5 logic
  * Crypto.IO.PEM for PEM wrapping/unwrapping
  * Crypto.IO.PKCS8 for PKCS#8 wrapping/unwrapping

- All Object ID (OIDs) are now in dotted form to increase
  readability.

- Add AES support to PEM format (decode only).
  The PEM module can decrypt messages protected with AES-CBC.

- Update RSA import test cases.

- Updated to PKCS8 test cases
2013-07-14 21:16:46 -07:00
Sebastian Ramacher
501915bc13 Pass corret stream to TestTextRunner
If stream is not None, add it to kwargs and pass it to TestTextRunner.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-04-05 12:23:24 +02:00
Sebastian Ramacher
e60056466f Use correct stream
If stream is None, write the value of StringIO to sys.stderr.

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
2013-04-05 12:22:36 +02:00
Legrandin
114ca5b4d4 Merge from upstream 2011-12-22 14:55:40 +01:00
Dwayne C. Litzenberger
094d70b64d Python 3.x fixes:
- Use absolute imports
- Fix StringIO import so that 2to3 can translate it
2011-10-22 15:07:47 -04:00
Legrandin
8db8a40ffc Add tests for PKCS#1 v1.5 2011-02-03 01:35:59 +01:00
Dwayne C. Litzenberger
386de1947b Legal: Dedicate my files to the public domain.
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)
2009-03-01 10:22:51 -05:00
Dwayne C. Litzenberger
ff8a657a8d cleanup: Move modules to "lib/Crypto" subdirectory.
This will avoid the previous situation where scripts like the old "test.py"
get included accidentally in a release.  It also frees us to put additional
build scripts in the top-level directory of the source tree.
2009-02-28 13:14:53 -05:00
Renamed from SelfTest/__init__.py (Browse further)