Commit graph

4 commits

Author SHA1 Message Date
Legrandin
8675e6f03f Start licensing under BSD 2-Clause 2014-06-23 22:23:38 +02:00
Legrandin
7214ce9929 Removed most 'import *' statements
[dlitz@dlitz.net: Re-ordered commits; so don't import S2V yet]
[dlitz@dlitz.net: Included an additional 'import *' change from the following commit:]
    commit 4ec64d8eaaa4965889eb8e3b801fc77aa84e0a4e
    Author: Legrandin <helderijs@gmail.com>
    Date:   Tue Sep 10 07:28:08 2013 +0200

        Removed last references to ApiUsageError

[dlitz@dlitz.net: Removed unrelated whitespace changes]
2013-10-20 13:30:21 -07:00
Dwayne Litzenberger
d7cc92168a Fix unhexlify in Python 3.2
Under Python 3.2, unhexlify expects to receive a `bytes` object.
Passing it a (unicodr) `str` object causes it to raise the following
exception:

    TypeError: 'str' does not support the buffer interface
2013-07-14 22:11:54 -07: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