summaryrefslogtreecommitdiffstats
path: root/openpgp/tests
AgeCommit message (Collapse)Author
2019-06-11openpgp: Convert signature s-expressions to mpis::Signature.Justus Winter
2019-06-06openpgp: New type representing s-expressions.Justus Winter
- *S-Expressions* as described in the internet draft [S-Expressions], are a way to communicate cryptographic primitives like keys, signatures, and ciphertexts between agents or implementations. [S-Expressions]: https://people.csail.mit.edu/rivest/Sexp.txt
2019-05-03openpgp: Improve test to also SerializeInto.Justus Winter
2019-04-29openpgp: New TSK type.Justus Winter
- With a1e226f8f1418de43e577fdaa1d087b68bbb09ae in place, we have a more general way to add components to a TPK. Retire the current `TSK` type and replace it with a thin shim that only allows serialization of secret keys. - Fixes #107.
2019-04-24openpgp: Improve test.Justus Winter
2019-04-05openpgp: New test key.Justus Winter
2019-04-05openpgp: Improve test by roundtripping all messages.Justus Winter
- Fixes #243.
2019-04-05openpgp: Improve test by roundtripping all TPKs.Justus Winter
2019-04-04openpgp: Add a new test.Justus Winter
- For every file in openpgp/tests/data, parse it, and roundtrip each packet. - Fixes 243.
2019-04-02openpgp: Fix the compression quine.Justus Winter
- Previously, the framing information was off by four bytes.
2019-03-27openpgp: Move test file.Justus Winter
2019-02-15openpgp: add NIST ECDH test casesKai Michaelis
2019-01-11ffi: Add preliminary Python bindings.Justus Winter
- The bingings support basic manipulation of OpenPGP data, but are quite incomplete. Furthermore, the Python API is not very pythonic in some places, so expect it to break in the future.
2018-12-14openpgp: add test verifying 3rd party cert by GPGKai Michaelis
2018-11-02openpgp: improve handling uid revocations.Kai Michaelis
Revocation signatures only revoke earlier self-sigs, not signatures made after the rev-sig.
2018-10-11openpgp: Add support for the AEAD encrypted data packet.Justus Winter
- This adds a new packet type, and enough infrastructure to decrypt messages encrypted using AEAD.
2018-10-01openpgp: Stop compressed data packets from swallowing MDC packetsNeal H. Walfield
- When parsing a compression packet using an old-style indeterminate length encoding, the parser is supposed to read until it encounters a "natural" EOF (i.e., the end of the compressed data), but the decompressor blindly buffers data, so it usually swallows the MDC packet. - Since we know the size of the MDC packet apriori, we can use a BufferedReaderReserve to prevent it from being consumed by the decompressor.
2018-09-21openpgp: Fix last commit.Neal H. Walfield
- Add the new files referenced in last commit (f260618), but not committed.
2018-08-27openpgp: Keep bad signatures for later.Justus Winter
- When we find signatures that are bad or unused, keep them around, they might be useful when merging the TPK later on. This may happen if we see a partial TPK. For instance, if we have a key server that doesn't return user id packets, it should still return any self-signatures on those user id packets to allow propagation of revocation certificates, etc. - Fixes #34.
2018-08-27tool: Ignore multiple signatures from the same TPK by default.Justus Winter
- This behavior can be changed using a switch. - Fixes #18.
2018-08-27openpgp: Add a signing subkey.Justus Winter
2018-08-27tool: Ignore duplicate signatures in sqv.Justus Winter
- See #18.
2018-08-22openpgp: Implement proper handling of nested signatures.Justus Winter
- Outer signatures are over any inner signatures and the intervening content. Since outer signatures are notarizations, they should treat literal data packets the same way normal signatures (i.e., inner most signatures) do and ignore the filename, date, etc. fields when hashing the content. - Add a test vector for this, and an example that creates these kinds of notarizations. - Fixes #29.
2018-08-20openpgp: Add test case.Justus Winter
2018-08-14tool: Implement sqv --not-before and --not-after.Justus Winter
- Fixes #43.
2018-08-14openpgp: Make armor parsing more robust.Justus Winter
- ASCII Armor, designed to protect OpenPGP data in transit, has been a source of problems if the armor structure is damaged. For example, copying data manually from one program to another might introduce or drop newlines. - This change introduces a heuristic that simply tries to detect the base64-encoded OpenPGP data. This way, if the framing is in any way damaged, or even stripped, we can still recover the message. - Fixes #40.
2018-07-29openpgp Add missing file.Neal H. Walfield
- Forgot to add test data in 2808fa2c.
2018-07-28openpgp: Add missing test data.Neal H. Walfield
- Fixes 67f8f4adb.
2018-07-12openpgp: Fix reading large chunks of armored data.Justus Winter
- When requesting more data, we need to add what we want to what we got, not what we previously requested. Note that `BufferedReader::data(n)` may return more than n bytes, so requesting n+2 bytes may not return more than when requesting n bytes.
2018-06-19openpgp: Implement decryption using ECDH/Curve25519.Justus Winter
2018-06-19openpgp: PKESK decryption.Kai Michaelis
Implements PKESK::decrypt(). Supports onlt RSA for now.
2018-06-19openpgp: simple secret key handling.Kai Michaelis
Adds a SecretKey type for holding (optionally encrypted) secret keys. For now, secret keys are handled as TPKs.
2018-06-11openpgp: Implement verification of EdDSA signatures using Ed25519.Justus Winter
2018-06-11openpgp: Implement verification of ECDSA signatures.Justus Winter
- This implements verification of ECDSA signatures using the NIST curves as specified in RFC6637.
2018-06-08openpgp: Implement verification of DSA signatures.Justus Winter
2018-05-14openpgp: Add support for verifying binding signatures.Neal H. Walfield
- Add support for verifying primary key bindings, subkey bindings, user id bindings, and user attribute bindings. - When canonicalizing a TPK, check all self-signatures. - If a self-signature does not verify, check whether it is out of order. See https://dev.gnupg.org/T2236 for the motivation. Guilhem reports: "Of the 100 keys with lowest MSD http://pgp.cs.uu.nl/doc/top_1000.html, 27 have badly ordered packets." - Drop invalid self-signatures. - Drop user ids / user attributes / subkeys without a valid self-siganture.
2018-05-14openpgp: Accept just a primary key as a valid TPK.Neal H. Walfield
2018-05-11openpgp: Add test for the plain Decryptor.Justus Winter
2018-04-26openpgp: Add signature verification support.Neal H. Walfield
2018-04-14openpgp: Add support for OnePassSig packets.Neal H. Walfield
- Handling OnePassSig packets in an unbuffered manner introduces a layering violation: when we encounter a OnePassSig packet, we want to push a HashedReader on the BufferedReader stack, but that is popped when the readers associated with the OnePassSig are popped! Thus, we need to introduce a bit of ugliness (OnePassSig::parse needs to pop its readers and then push the HashedReader at the high level). This is unfortunate, but it appears to be necessary. - Hashing literal data packets is ugly! Only the content of a literal data packet is hashed; neither the packet's headers, the packet's meta-data nor the length information is included in the hash. This, in particular, adds some ugliness to the BufferedReaderPartialBodyFilter implementation: it needs to disable hashing when decoding a literal data packet. - This implementation has several limitations: - We only handle a single level of Signature nesting. That is, we don't support things like having two OnePassSig packets, both of which have their 'last' bit set (meaning that the outer signature is over the inner Signature and the content, not just the content). If the parser encounters such a message, it silently ignores the nesting. In practice, this functionality is rarely used: GnuPG neither produces such messages nor does it correctly handle them. - Each OnePassSig packet pushes another HashedReader on the BufferedReader stack. This can cause a stack overflow if there are too many OnePassSig packets. Instead, there should only be a single HashedReader per level of nesting, and the amount of nesting must be limited. - If there are multiple OnePassSig packets at a nesting level using the same hash algorithm, we don't reuse hashes, because Nettle doesn't currently support cloning hashes.
2018-02-28openpgp: Add support for SEIP and MDC packets.Neal H. Walfield
- Note: due to the way that we handle indeterminate length packets, if the SEIP packet has an indeterminate length, then only the first packet in the SEIP container will be parsed.
2018-02-02openpgp: Use shorter filenames so that ecryptfs doesn't complainNeal H. Walfield
2018-01-17openpgp: Add parsing and serialization support for SK-ESK packets.Neal H. Walfield
- This also adds s2k support.
2018-01-14openpgp: Implement hashing.Neal H. Walfield
- Switch to using nettle for low-level hash functionality. - Add functionality for hasing UserID, UserAttribute, Key and Signature packets. - Add functionliaty to compute the hashes for primary key bindings, subkey bindings, user id bindings and user attribute bindings.
2018-01-14openpgp: Improve subpacket parsing.Neal H. Walfield
- Improve the internal subpacket parsing mechanism. - Add support for the remaining subpackets defined in RFC 4880. - Improve documentation. - Add much more thorough unit tests.
2018-01-10openpgp: Only parse v4 packets.Neal H. Walfield
- We don't support version 3 packets (or any other version but version 4). If we encounter a non-v4 key or non-v4 signature, return an Unknown packet instead. - Use Unknown::parse to return unknown packets.
2018-01-08store: New store module.Justus Winter
- The store stores transferable public keys in a SQLite database. It runs either in an external process, or is co-located in the current process. - The store provides any number of stores for each application, identified by domain and name. Each store maps labels to TPKs. - The store uses a unified pool of TPKs. In the future, this pool is automatically kept up-to-date.
2018-01-07openpgp: Add an interface to merge TPKs.Neal H. Walfield
- This is trival now that the canonicalization routine does dedups. - Add a few tests.
2018-01-04openpgp: Add missing new files from last commit.Neal H. Walfield
2018-01-03openpgp: Fix test case to iterate over all files. Add missing files.Neal H. Walfield
- Improve test documentation while we're at it.