Update comments and docstrings following testing (self-tested with low-level updater.py, @nekt tested with interposition and C-bridge).
Complete refactored changes.
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
1. write_partial() increments version numbers if metadata is new or the first to be written.
2. write() increments version numbers if partial metadata is not loaded and a partial_write() is not needed.
add_targets() did not check for duplicate target file paths.
delegate() did not check for duplicate delegations.
load_repository() did not fully load and update delegated roles.
Issue #135: Duplicate signatures, rather than keys, was previously saved to metadata. libtuf.py should now store one signature per keyid. It should be noted that these duplicates were not identical, as PSS incorporates random salts and able to generate two valid signatures (and not equal) with the same key.
Issue #138: The write_partial() method added to libtuf.Repository.
Fixed a bug in load_repository() that did not properly detect some compressed delegated roles and failed to update the 'compressions' field of the Targets object.
Final self-review fixes:
Add heading.
109-111, 230: "pw" -> "password", to be consistent.
162: Add missing import statement.
Minor edits to comments, code, etc.
9-10: Remove extra whitespace.
58: Add missing period.
Update a few comments.
Add examples for nested delegations, restricted paths, metadata compression, and selection of target paths.
91-92: Move Metadata file output to new line to avoid wrapping.
153-154: Fix length of comment block to avoid wrapping.
159-160: Fix garbled comment block.
199-200: Shorten lengthy comment.
34, 37-38: Fix indentation, add missing period, and expand comment.
93: Add missing period.
152-153: Expand comment to make it clear that target files are not created and previous target paths are not replaced.
245: Fix typo.