Commit graph

38 commits

Author SHA1 Message Date
vladdd
7be31965e7 Minor edits. 2014-06-29 21:33:22 -04:00
Vladimir Diaz
1c1cd0f192 Update / fix remaining Python 2 + 3 doctests.
Remove test_slow_retrieval_attack.py print statements.
2014-06-06 08:37:31 -04:00
Vladimir Diaz
fbb10a36c9 Refactor repository_tool.py and improve test coverage.
Created repository_lib.py.
2014-06-03 14:32:44 -04:00
Vladimir Diaz
65f30a7bd8 Improve test coverage.
Update unit tests for pycrypto_keys, schema, ed25519_keys, and affected modules.
2014-05-30 12:47:33 -04:00
Vladimir Diaz
dc167e4a27 Address Python 3.2 byte-string compatibility issues. 2014-05-29 12:59:36 -04:00
vladdd
6b8b2399a2 Finish unit tests for Python2 + 3 support.
All unit tests updated / running for Python 2 + 3.
TODO: Fix non-Python 3 issue with util.py.
2014-05-27 13:55:48 -04:00
vladdd
bc99524e2b Finish initial refactor of slow retrieval attack. 2014-05-13 12:53:50 -04:00
vladdd
c5fd17ab3e Merge branch 'develop' of https://github.com/theupdateframework/tuf into develop
Conflicts:
	tests/test_hash.py
	tests/test_keydb.py
	tuf/formats.py
	tuf/keydb.py
	tuf/repository_tool.py
2014-05-10 20:26:06 -04:00
vladdd
c9e3b6046e Address Issue #214.
Allow validation of specific libraries rather than checking all of them in check_crypto_libraries().
Log warning if the repository tool is imported but has not been properly installed: $ pip install tuf[tools].
Modify format string of console log messages.
2014-05-03 18:03:25 -04:00
Vladimir Diaz
ab95a4b3aa [WIP] Python 2+3 support.
Python 2+3 unicode.
libraries.
The following modules (and their tests) work in PY2.7+3.3:
keydb, hash, formats, mirrors
2014-04-29 14:27:34 -04:00
vladdd
08a2bad2c0 Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
Vladimir Diaz
7314f782aa Add error message for clients that lack a required crypto library.
TUF's crypto dependencies was recently changed: ED25519 signatures supported by default, and require PyCrypto or tuf[tools] to verify RSASSA-PSS signatures.
The error returned for clients that tried to verify rsassa-pss signatures without the required library was bad.  Error message returned now:

$ basic_client.py --repo http://localhost:8001
Error: No working mirror was found:
  localhost:8001: Metadata downloaded from the remote repository specified an RSA signature.  Verifying RSA signatures requires PyCrypto.
$ pip install PyCrypto, or pip install tuf[tools].
2014-04-03 13:18:58 -04:00
vladdd
2d015797ef Update affected ed25519 modules.
Update modules affected by the changes made to the latest versions of pyca-ed25519 and pyca-pynacl:
Do not use the unsafe key and signature generation functions of pure python ed25519, but do support the signature verification routine.  Developers must use the faster and secure pynacl+libsodium to generate ed25519 keys and signatures.

Temporarily suppress pynacl's import warning error.

Minor edits to comments and code.
2014-03-07 23:21:54 -05:00
Vladimir Diaz
73adff9edf Update format_rsakey_from_pem() in keys.py.
Update repository_tool.py and keys.py functions that import rsa publickey files.  Perform a simple check of the PEM string so that an improperly formatted PEMis detected sooner.  Reported by Santiago.
2014-02-19 09:13:01 -05:00
Vladimir Diaz
00c69116aa Implement key format requested in issue #171.
Exclude the 'private' attribute from metadata key objects, and when calculating keyids.
2014-02-13 12:10:12 -05:00
Vladimir Diaz
2c55b94a8b Modify the extension of rolename files.
rolename.txt -> rolename.json.
2014-01-27 11:35:38 -05:00
vladdd
b2e220f598 Fix Issue #167. 2014-01-18 17:09:32 -05:00
Vladimir Diaz
2a61a80162 Update modules affected by the vendored ed25519 and update libtuf.py 2013-12-20 16:06:25 -05:00
Vladimir Diaz
d27543258e Update libtuf.py documentation and address issues #143 and #144
Add support for encrypted (and public ed25519 keys) TUF key files.
Add support for ed25519 keys, signatures, and key files in libtuf.py.
Update libtuf.py diagram.
Move canonical encoding operations to the create and verify key functions.
2013-12-16 08:45:40 -05:00
Vladimir Diaz
8b7745cb09 Add final comment+docstring updates to keys.py
Minor comment change to libtuf.py
2013-12-12 09:26:25 -05:00
Vladimir Diaz
7a08bad781 Continue documentation effort and fix outdated libtuf.py 2013-12-11 14:14:16 -05:00
Vladimir Diaz
79c0c5d90b Re-add generate_rsa_encrypted_pem 2013-12-09 12:46:45 -05:00
Vladimir Diaz
56bdd48b53 Add comments and re-add ed25519 to conf.py 2013-12-09 11:22:37 -05:00
Vladimir Diaz
68eedeb477 Initial commit for Issue #143 and #144 2013-12-09 11:11:23 -05:00
Vladimir Diaz
c58906f9c2 Fix for issue #153
Update the key modules and their unit tests so that only the signature scheme is included in the signature label.

PyCrypto-PKCS#1 PSS -> RSASSA-PSS
ed25519-python and ed25519-pynacl -> ed25519
2013-11-27 12:11:16 -05:00
vladdd
b4db0f1770 [WIP] Continue libtuf.py implementation 2013-10-29 15:23:26 -04:00
vladdd
5eb0858e45 Add import and export functions for passphrase-protected pem files in keys.py 2013-10-22 14:01:06 -04:00
vladdd
45af91191a Update docstrings and comments in keys.py
Configurable crypto changes previously implemented but the docstrings and comments of keys.py still needed updating.  Minor edit to test_keys.py and a note added about a missing test case.
2013-10-18 14:01:51 -04:00
vladdd
760cd62d4e Rename functions in keys.py and update test_keys.py
create_in_metadata_format --> format_keyval_to_metadata
create_from_metadata_format --> format_metadata_to_key
2013-10-17 14:05:26 -04:00
vladdd
60574503fc Update keys.py with modified pycrypto_keys.py function names 2013-10-17 13:12:55 -04:00
vladdd
a091b1f84b Add test_keys.py and update keys.py 2013-10-10 14:01:55 -04:00
vladdd
31d603c710 Update all unit tests affected by configurable crypto
Add separate 'tuf.conf.py' options for key types.
2013-10-10 12:19:46 -04:00
vladdd
37b665bf9a Modify behavior of configurable crypto and update conf.py
Add missing doctest and minor edits.
2013-10-09 13:37:26 -04:00
vladdd
cc87d4fdb8 Add missing doctests to keys.py and pycrypto_keys.py 2013-10-09 11:21:09 -04:00
vladdd
115d844a57 Fix import, doctests, and function parameters in keys.py 2013-10-09 09:19:08 -04:00
vladdd
46d07be5ad Continue configurable crypto changes: add keys.py doctest 2013-10-09 08:15:09 -04:00
vladdd
4c866bc384 Continue configurable crypto design changes
Add new schema to formats.py and simplify input validation in keys.py
2013-10-08 13:32:07 -04:00
vladdd
5622e0c622 Commence configurable crypto changes
Refactored the majority of affected modules.  Added optimized version of the reference implementation of ed25519.
2013-10-08 13:09:59 -04:00
Renamed from tuf/rsa_key.py (Browse further)