Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Get files ready for 1.0 release1.0Arthur de Jong2017-12-295-4/+388
|
* Not all XML serialisers write namespaces in same orderArthur de Jong2017-12-291-6/+6
| | | | | | This ignores the namespace declarations in the generated XML files because not all implementations on all environments write these in the same order.
* Add Sphinx documentation checksArthur de Jong2017-12-293-4/+8
| | | | This also slightly tunes the way Sphinx documentation is built.
* Add support for PyPyArthur de Jong2017-12-292-1/+3
|
* Add support for Python 3.7Arthur de Jong2017-12-292-2/+3
|
* Use README as package long descriptionArthur de Jong2017-12-292-15/+13
|
* Add an is_encrypted propertyArthur de Jong2017-12-274-12/+27
| | | | | | This property can be use to see whether the PSKC file needs an additional pre-shared key or passphrase to decrypt any stored information.
* Implement XML signature checkingArthur de Jong2017-12-2723-28/+750
|\
| * Add documentation for signed PSKC filesArthur de Jong2017-12-275-3/+123
| |
| * Implement signature checkingArthur de Jong2017-12-2717-13/+486
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for creating and verifying embedded XML signatures in PSKC files. This uses the third-party signxml library for actual signing and verification. The signxml library has a dependency on lxml and defusedxml (and a few others) but all parts of python-pskc still work correctly with our without lxml and/or defusedxml and signxml is only required when working with embedded signatures. This modifies the tox configuration to skip the signature checks if singxml is not installed and to only require 100% code coverage if the signature tests are done.
| * Move namespace moving to own functionArthur de Jong2017-12-271-11/+16
| |
| * Implement basic parsing of signature propertiesArthur de Jong2017-12-275-1/+125
|/
* Explicitly close output file in pskc2csvArthur de Jong2017-12-271-0/+2
| | | | | | This ensures that the file descriptor is closed if we opened the file. This is not a big problem for the script (because the script exists anyway) but causes problems for the tests.
* Fix typo in pin_max_failed_attempts attributeArthur de Jong2017-12-186-8/+44
| | | | | This makes the old name (pin_max_failed_attemtps) available as a deprecated property.
* Add limited support for very old draft PSKC versionsArthur de Jong2017-12-156-13/+396
| | | | | | | | | | | | This adds basic support for parsing the PSKC files as specified in draft-hoyer-keyprov-portable-symmetric-key-container-00 and draft-hoyer-keyprov-portable-symmetric-key-container-01. It should be able to extract secrets, counters, etc. but not all properties from the PSKC file are supported. It is speculated that this format resembles the "Verisign PSKC format" that some applications produce.
* Add test files from multiOTPArthur de Jong2017-12-1511-0/+2012
| | | | | | | This adds tests for parsing the files that are shipped as part of the multiOTP test suite. https://www.multiotp.net/
* Refactor internal storate of encrypted valuesArthur de Jong2017-12-156-179/+185
| | | | | | | | | | | This changes the way encrypted values are stored internally before being decrypted. For example, the internal _secret property can now be a decrypted plain value or an EncryptedValue instance instead of always being a DataType, simplifying some things (e.g. all XML encoding/decoding is now done in the corresponding module). This should not change the public API but does have consequences for those who use custom serialisers or parsers.
* Add support for KW-Camellia suite of algorithmsArthur de Jong2017-12-136-6/+137
|
* Add support for Camellia-CBC suite of algorithmsArthur de Jong2017-12-135-2/+161
|
* Add a manual page for pskc2csvArthur de Jong2017-10-113-4/+70
|
* Ignore missing docstring in __init__ in flakeArthur de Jong2017-10-091-1/+1
|
* Replace pycrypto with cryptographyArthur de Jong2017-10-0910-152/+87
| | | | | | | | | The cryptography library is better supported. This uses the functions from cryptography for AES and Triple DES encryption, replaces the (un)padding functions that were previously implemented in python-pskc with cryptography and uses PBKDF2 implementation from hashlib.
* Use PBKDF2 from hashlibArthur de Jong2017-10-091-9/+18
| | | | | | This uses pbkdf2_hmac() from hashlib for the PBKDF2 calculation. The downside of this is that this function is only available since Python 2.7.8.
* Replace use of pycrypto utility functionsArthur de Jong2017-10-016-29/+34
| | | | | | This uses os.urandom() as a source for random data and replaces other utility functions. This also removes one import for getting the lengths of Tripple DES keys.
* Implement our own XML formattingArthur de Jong2017-09-253-14/+40
| | | | | | This avoids a using xml.dom.minidom to indent the XML tree and keep the attributes ordered alphabetically. This also allows for customisations to the XML formatting.
* Support hashlib from Python 2.7.3Arthur de Jong2017-09-241-1/+4
| | | | | Some Python versions don't have the algorithms_available property but do have the algorithms property in hashlib.
* Use defusedxml if availableArthur de Jong2017-09-243-11/+27
| | | | | This uses the defusedxml library if available to defend agains a number of XML-based attacks.
* Fix bug in saving PBKDF2 salt on Python3Arthur de Jong2017-09-242-3/+21
| | | | | | | The PBKDF2 salt was saved in the wrong way (b'base64encodeddata' instead of base64encodeddata) when using Python 3. This fixes that problem and tests that saving and loading of a file that uses PBKDF2 key derivation works.
* Add tests for the pskc2csv scriptArthur de Jong2017-09-243-9/+198
| | | | | This makes minor changes to the pskc2csv script to make it more easily testable.
* Support adding custom CSV file headersArthur de Jong2017-09-221-4/+5
| | | | | | This allows adding an optional label to the --columns option that can be used to output a label different from the key property name in the CSV file header.
* Add --secret-encoding option to pskc2csvArthur de Jong2017-09-201-11/+15
| | | | | This option can be used to configure the encoding of the secret in the CSV file (still hex by default).
* Run flake8 from toxArthur de Jong2017-09-2010-16/+50
| | | | | This also makes a few small code formatting changes to ensure that the flake8 tests pass.
* Simplify Tox configurationArthur de Jong2017-09-111-21/+3
|
* Various minor code style improvementsArthur de Jong2017-06-106-11/+23
|
* Normalise key derivation algorithmsArthur de Jong2017-06-102-8/+27
| | | | | This makes KeyDerivation.algorithm and KeyDerivation.pbkdf2_prf properties automatically normalise assigned values.
* Switch to using non-deprecated methodArthur de Jong2017-06-101-1/+1
| | | | | | This uses ElementTree.iter() instead of ElementTree.getiterator() for going over all the child elements in the tree because the latter is deprecated.
* Provide Key.userid convenience propertyArthur de Jong2017-06-103-5/+16
| | | | | This provides a read-only userid property on Key objects that uses the key_userid or device_userid value, whichever one is defined.
* Document supported encryption and MAC algorithmsArthur de Jong2017-06-094-10/+76
| | | | This also includes a few other small documentation improvements.
* Refactor MAC lookupsArthur de Jong2017-06-094-40/+180
| | | | | | | | This switches to using the hashlib.new() function to be able to use all hashes that are available in Python (specifically RIPEMD160). This also adds a number of tests for HMACs using test vectors from RFC 2202, RFC 4231 and RFC 2857.
* Handle more algortihm URIsArthur de Jong2017-06-091-26/+51
| | | | | | This adds a number of algorithm URIs defined in RFC 6931 and also simplifies the definition of the list of URIs. It also adds more aliases for algorithms.
* Switch URLs to HTTPSArthur de Jong2017-01-253-6/+6
|
* Correct name of ActivIdentity test fileArthur de Jong2017-01-212-1/+1
|
* Get files ready for 0.5 release0.5Arthur de Jong2017-01-217-51/+347
|
* Split vendor testsArthur de Jong2017-01-152-27/+55
| | | | Have one doctest file per vendor to make tests a little more manageable.
* Add tests for Yubikey filesArthur de Jong2017-01-154-0/+295
| | | | This adds tests from draft-josefsson-keyprov-pskc-yubikey-00.
* Support legacy ActivIdentity filesArthur de Jong2017-01-153-12/+129
| | | | | | This adds support for parsing ActivIdentity files that conform to a very old version of an Internet Draft. The implementation and test were based on a file provided by Jaap Ruijgrok.
* Use original examples from old profiles Internet DraftArthur de Jong2017-01-115-129/+139
| | | | | | | | | | | | | This updates the tests to use the original examples from draft-hoyer-keyprov-pskc-algorithm-profiles-01 instead of modifying them to fit the RFC 6030 schema (but does include some minor changes to make them valid XML). This adds a few additions to the parser to handle legacy challenge and resposne encoding and a few key policy properties. This also includes a fix for 0b757ec in the handling of the <ChallengeFormat> element under a <Usage> element.
* Add all figures from RFC 6030 to test suiteArthur de Jong2016-12-213-10/+191
| | | | Note that asymmetric encryption and digital signature checking has not yet been implemented so the tests are pretty minimal.
* Add support for older Internet Draft versionArthur de Jong2016-12-2111-35/+839
| | | | | | | | | | | | | | This adds support for parsing most examples from draft-ietf-keyprov-pskc-02. That file uses a few other names for elements and attributes of the PSKC file and a few other minor differences. The XML parsing has been changed to allow specifying multiple matches and the find*() functions now return the first found match. While all examples from draft-ietf-keyprov-pskc-02 are tested support for verifying digital signatures and asymmetric keys have not yet been implemented.
* Fix typo in testArthur de Jong2016-12-201-4/+4
|