Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/pskc/encryption.py
Commit message (Collapse)AuthorAgeFilesLines
* Support Python 3Arthur de Jong2015-10-061-1/+1
| | | | | | | | This enables support for Python 3 together with Python 2 support with a single codebase. On Python 3 key data is passed around as bytestrings which makes the doctests a little harder to maintain across Python versions.
* Fix issue with namespaced PBKDF2 parametersArthur de Jong2015-10-061-8/+10
| | | | | | | | | | | | The find() utility functions now allow specifying multiple paths to be searched where the first match is returned. This allows handling PSKC files where the PBKDF2 salt, iteration count, key length and PRF elements are prefixed with the xenc11 namespace. A test including such a PSKC file has been included. Thanks to Eric Plet for reporting this.
* Move encryption functions in pskc.crypto packageArthur de Jong2014-10-091-2/+2
| | | | | | This moves the encryption functions under the pskc.crypto package to more clearly separate it from the other code. Ideally this should be replaced by third-party library code.
* Rename pskc.parse to pskc.xmlArthur de Jong2014-10-091-3/+3
| | | | | | | This renames the parse module to xml to better reflect the purpose of the module and it's functions. This also introduces a parse() function that wraps etree.parse().
* PEP8 fixArthur de Jong2014-06-171-2/+2
|
* Support PBKDF2 PRF argumentArthur de Jong2014-06-151-5/+9
| | | | | Support specifying a pseudorandom function for PBKDF2 key derivation. It currently supports any HMAC that the MAC checking also supports.
* Handle missing MAC algorithm properlyArthur de Jong2014-06-141-1/+2
|
* Have parse module provide find() functionsArthur de Jong2014-06-141-30/+19
| | | | | | | | This changes the parse module functions to better match the ElementTree API and extends it with findint(), findtime() and findbin(). It also passes the namespaces to all calls that require it without duplicating this throughout the normal code.
* Use get() instead of attrib.get() (shorter)Arthur de Jong2014-06-141-4/+4
|
* Support kw-tripledes decryptionArthur de Jong2014-05-311-0/+6
| | | | | This adds support for key unwrapping using the RFC 3217 Triple DES key wrap algorithm if the PSKC file uses this.
* Support kw-aes128, kw-aes192 and kw-aes256Arthur de Jong2014-05-301-0/+9
| | | | | This adds support for key unwrapping using the RFC 3394 or RFC 5649 algorithm if the PSKC file uses this.
* Support Tripple DES decryptionArthur de Jong2014-05-291-0/+8
|
* Raise exception when key derivation failsArthur de Jong2014-05-291-2/+11
| | | | This also renames the internal function that implements the derivation.
* Add test for missing key encryption algorithmArthur de Jong2014-05-291-0/+2
| | | | | This also introduces a toplevel PSKCError exception that all exceptions have as parent.
* Support more AES-CBC encryption schemesArthur de Jong2014-05-291-4/+8
| | | | | This also moves the crypto imports to the places where they are used to avoid a depenency on pycrypto if no encryption is used.
* Be more lenient in accepting algorithmsArthur de Jong2014-05-251-12/+2
|
* Raise an exception if decryption failsArthur de Jong2014-05-251-2/+7
|
* Make decryption code better readableArthur de Jong2014-05-251-5/+9
|
* Provide pskc.encryption docstringsArthur de Jong2014-04-191-5/+41
| | | | This documents classes in the pskc.encryption module.
* Implement PBKDF2 key derivationArthur de Jong2014-04-131-0/+64
| | | | | This supports deriving the key from a passphrase and information present in the DerivedKey and PBKDF2-params XML elements.
* Add id attribute from EncryptionKeyArthur de Jong2014-04-131-2/+5
|
* Support decrypting with a pre-shared keyArthur de Jong2014-04-121-0/+88
This adds an encryption module that provides wrappers for handling decryption.