Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Get files ready for 0.3 release0.3Arthur de Jong2015-10-075-3/+141
|
* Update documentationArthur de Jong2015-10-078-87/+150
| | | | | | | This updates the documentation with the new features (writing PSKC files) as well as many editorial improvements, some rewording and a few typo fixes. Some things were moved around a little in order to be more easily readable and easier to find.
* Support Python 3Arthur de Jong2015-10-0616-125/+166
| | | | | | | | 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-064-25/+141
| | | | | | | | | | | | 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.
* Provide a sample pskc2csv scriptArthur de Jong2014-10-121-0/+127
| | | | | This is a simple command-line utility that reads a PSKC file and outputs information on keys as CSV.
* Move encryption functions in pskc.crypto packageArthur de Jong2014-10-096-4/+4
| | | | | | 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-096-19/+26
| | | | | | | 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().
* Support writing unencrypted PSKC filesArthur de Jong2014-06-285-0/+317
|\
| * Add test for writing PSKC filesArthur de Jong2014-06-281-0/+143
| | | | | | | | | | This makes a simple doctest that checks the writing of the XML representation of the PSKC data.
| * Add function for writing XMLArthur de Jong2014-06-282-0/+17
| | | | | | | | This provides a function for pretty-printing the generated XML document.
| * Construct XML document with basic PKSC informationArthur de Jong2014-06-283-0/+109
| | | | | | | | | | | | This introduces make_xml() functions to build an XML document that contains the basic PSKC information and keys. This currently only supports writing unencrypted PSKC files.
| * Introduce mk_elem() to create elementsArthur de Jong2014-06-281-0/+48
|/ | | | | | This introduces the mk_elem() function that can be used to create ElementTree elements for building XML documents. This function transparetly handles namespaces, translation of values into XML etc.
* Simplify DataType value handlingArthur de Jong2014-06-271-38/+32
| | | | | | | Only store the native value of the property, not the text representation. This also results in the BinaryDataType and IntegerDataType subclasses only needing from_text() and from_bin() functions.
* Get files ready for 0.2 release0.2Arthur de Jong2014-06-197-3/+383
|
* Only catch normal exceptionsArthur de Jong2014-06-191-1/+1
|
* Remove unused importArthur de Jong2014-06-181-2/+0
|
* PEP8 fixArthur de Jong2014-06-171-2/+2
|
* Remove __str__ from exceptionArthur de Jong2014-06-171-3/+1
| | | | | The message property has been deprecated as of Python 2.6 and printing the first argument is the default.
* Update documentationArthur de Jong2014-06-167-55/+138
| | | | | | | | | This updates the documentation with the current API, adding information on exceptions raised, HMAC algorithms supported and changes to the MAC checking. This also includes some editorial changes to some of the text and making references shorter by not including the full package path.
* Simplify finding ElementTree implementationArthur de Jong2014-06-151-10/+1
| | | | | These are the only ElementTree implementations that have been tested to provide the needed functionality (mostly namespaces).
* Refactor out some functions to parseArthur de Jong2014-06-153-26/+26
| | | | | This introduces the getint() and getbool() functions in parse to avoid some code duplication.
* Add support for setting secretArthur de Jong2014-06-152-24/+51
| | | | | | This supports setters for the secret, counter, time_offset, time_interval and time_drift properties. Setting these values stores the values unencrypted internally.
* 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.
* Provide a get_hmac() functionArthur de Jong2014-06-151-11/+16
| | | | | Refactor the functionality to find an HMAC function into a separate function.
* Add tests for missing or invalid MACArthur de Jong2014-06-144-0/+172
| | | | This tests for incomplete, unknown or invalid MACs in PSKC files.
* Raise exception when MAC validation failsArthur de Jong2014-06-142-21/+24
| | | | | | | | | This changes the way the check() function works to raise an exception when the MAC is not correct. The MAC is also now always checked before attempting decryption. This also renames the internal DataType.value property to a get_value() method for clarity.
* Handle missing MAC algorithm properlyArthur de Jong2014-06-141-1/+2
|
* Add MAC tests to all CBC encrypted keysArthur de Jong2014-06-145-0/+52
| | | | | This adds hmac-sha224, hmac-sha256, hmac-sha384 and hmac-sha512 tests for values that are encrypted using CBC block cypher modes.
* Automatically support all MACs in hashlibArthur de Jong2014-06-141-5/+15
| | | | | This uses the name of the hash to automatically get the correct hash object from Python's hashlib.
* Support various ElementTree implementationsArthur de Jong2014-06-143-3/+19
| | | | | | | | | | | When using a recent enough lxml, even Python 2.6 should work now. The most important requirement is that the findall() function supports the namespaces argument. This also now catches all exceptions when parsing the PSKC file fails and wraps it in ParseError because various implementations raise different exceptions, even between versions (Python 2.6's ElementTree raises ExpatError, lxml raises XMLSyntaxError).
* Have parse module provide find() functionsArthur de Jong2014-06-146-108/+105
| | | | | | | | 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-145-38/+38
|
* Support kw-tripledes decryptionArthur de Jong2014-05-313-0/+47
| | | | | This adds support for key unwrapping using the RFC 3217 Triple DES key wrap algorithm if the PSKC file uses this.
* Implement RFC 3217 Triple DES key wrappingArthur de Jong2014-05-312-0/+152
|
* Merge test_minimal into test_miscArthur de Jong2014-05-312-51/+30
|
* Add an ActivIdentity-3DES testArthur de Jong2014-05-312-0/+79
| | | | | The test is taken from draft-hoyer-keyprov-pskc-algorithm-profiles-01 modified to fit the schema as described in RFC 6030.
* Add an SecurID-AES-Counter testArthur de Jong2014-05-312-0/+69
| | | | | The test is taken from draft-hoyer-keyprov-pskc-algorithm-profiles-01 modified to be valid XML and to fit the schema as described in RFC 6030.
* Add an TOTP testArthur de Jong2014-05-312-0/+72
| | | | | The test is taken from draft-hoyer-keyprov-pskc-algorithm-profiles-01 modified to fit the schema as described in RFC 6030.
* Add an OCRA testArthur de Jong2014-05-312-0/+92
| | | | | The test is taken from draft-hoyer-keyprov-pskc-algorithm-profiles-01 modified to fit the schema as described in RFC 6030.
* Add a test for an odd namespaceArthur de Jong2014-05-312-0/+59
|
* Support kw-aes128, kw-aes192 and kw-aes256Arthur de Jong2014-05-305-0/+126
| | | | | This adds support for key unwrapping using the RFC 3394 or RFC 5649 algorithm if the PSKC file uses this.
* Implement padding as specified in RFC 5649Arthur de Jong2014-05-302-26/+140
| | | | This adds a pad argument with which padding can be forced or disabled.
* Allow speciying an initial value for key wrappingArthur de Jong2014-05-302-6/+37
|
* Provide an RFC 3394 AES key wrapping algorithmArthur de Jong2014-05-303-0/+179
| | | | This also introduces an EncryptionError exception.
* Always put a space between RFC and numberArthur de Jong2014-05-2911-44/+47
|
* Support Tripple DES decryptionArthur de Jong2014-05-293-0/+48
|
* Add tests for key derivation problemsArthur de Jong2014-05-291-0/+39
| | | | | This tests for unknown or missing algorithms and unknown derivation parameters.
* Raise exception when key derivation failsArthur de Jong2014-05-292-2/+16
| | | | This also renames the internal function that implements the derivation.
* Add test for missing key encryption algorithmArthur de Jong2014-05-294-9/+37
| | | | | This also introduces a toplevel PSKCError exception that all exceptions have as parent.
* Add test for all AES-CBC encryption schemesArthur de Jong2014-05-294-0/+131
|