summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-02-17openpgp: Implement GCM mode.justus/openpgp-next-gcmJustus Winter
- The Galois/Counter mode for block ciphers is a FIPS-approved AEAD mode. It will be added to the upcoming OpenPGP standard so that we have a FIPS-compliant subset of OpenPGP. - Currently, this is only implemented by the Nettle backend.
2022-02-16openpgp: Explicit SEIP packet version in the message parser.Justus Winter
- In order to deal with version 2 SEIP packets, we first need to be explicit about the packet version in the message parser. - Rename the token and grammar rules, pass in a version to MessageParser::push.
2022-02-16openpgp: New function Packet::version.Justus Winter
2022-02-16openpgp: Fix verifying cleartext signed messages with multiple sigs.Justus Winter
- We implement the cleartext signature framework by transforming the message on the fly to a signed message, then using our parsing framework as usual. However, we need to tweak the behavior slightly. - Notably, our CSF transformation yields just one OPS packet per encountered 'Hash' algorithm header, and it cannot know how many signatures are in fact following. Therefore, the message will not be well-formed according to the grammar. But, since we created the message structure during the transformation, we know it is good, even if it is a little out of spec. - This patch tweaks the streaming verifier's behavior to accommodate this.
2022-02-15openpgp: Fallible conversion to GenericArray references.Justus Winter
- The former commit fixes a crash that should never have happened: with a fallible conversion to GenericArrays, the error can be handled at runtime. - Unfortunately, the upstream crate does not offer a convenient fallible conversion. Implement and use it.
2022-02-15openpgp: Fix crash converting nonce slices to arrays.Justus Winter
- Doing the conversion before matching on the algorithm tries to convert nonces of different sizes to an array suitable for EAX, leading to a panic.
2022-02-15openpgp: Skip test if algorithm is not supported.Justus Winter
2022-02-15openpgp: Use unique keys for memory encryption.Justus Winter
- Previously, we used the same session key for every encrypted memory region, relying on the nonces being derived from a random initialization vector. - However, in cf2a472a34588c453f10efa0263ec51e0c860988 we changed the nonce to be a simple counter. This leads reuse of (key, nonce) pairs. - Instead of relying on the nonces having some entropy, a more robust way to deal with this is to have distinct keys. To that end, add a random salt to each memory region that we hash before hashing the prekey.
2022-02-14openpgp: Decouple mem::Encrypted from OpenPGP's AEAD mechanism.Justus Winter
- Use a custom schedule, which is a simple counter nonce, no AAD except for the final chunk which digests the plaintext size.
2022-02-14openpgp: Refactor AEAD encryption and decryption.Justus Winter
- Introduce a trait that schedules nonce and additional authenticated data for each AEAD chunk. - Factoring that out allows us to support different schemes, and decouple memory encryption from the OpenPGP schedules.
2022-02-08openpgp: Fix test.Justus Winter
- We cannot make that kind of assumption in a test.
2022-02-03sq: improve subplot scenario on how to extract cert to fileLars Wirzenius
The new scenario is more explicit in how the verification is done rather than just checking the output is a public key block. Also, fix a tiny markup error in another scenario (missing _ to end italic section). Sponsored-by: NLnet Foundation; NGI Assure; European Commission
2022-02-02doc: Update IRC network used by Sequoia PGP.Wiktor Kwapisiewicz
2022-02-01sq: improve Subplot scenario for "sq keyring join"Lars Wirzenius
Fixes #811 Sponsored-by: NLnet Foundation; NGI Assure; European Commission
2022-01-28ci: Fix comment on refs trigger.Wiktor Kwapisiewicz
2022-01-27ci: Cross-compile to arm and run via qemu.Justus Winter
The exact architecture is armv7-unknown-linux-gnueabihf.
2022-01-27openpgp: Make the test even less timing-sensitive.Justus Winter
- This is the most problematic part of the test, actually. - Fixes #777. Again.
2022-01-27openpgp: Make test less timing-sensitive.Justus Winter
- Previously, the test asserted that we can create at least SIG_BACKDATE_BY signatures, and at most 2 * SIG_BACKDATE_BY signatures. - The former may fail, presumably due to a corner case involving losing the sub-second precision of SystemTime. The latter may fail depending on CPU resources and scheduling. - Tame the test by demonstrating that we can override a couple of signatures. Drop the test for the maximum number of overrides. - Fixes #777.
2022-01-25ci: Add config snippet for ARM cross compile.Nora Widdecke
2022-01-24sq: Simplify test.Neal H. Walfield
2022-01-24sq: Fix using multiple keys.Neal H. Walfield
- `get_keys` only returned a key for the first certificate. It should return a key for each certificate. - Fixes #750.
2022-01-24sq: When looking for a User ID, don't require that it be UTF-8.Neal H. Walfield
2022-01-24sq: Remove extraneous debugging output.Neal H. Walfield
2022-01-24sq: Improve the error message if a key is inappropriate.Neal H. Walfield
- If a key is inappropriate, include an explanation in the error message to simplify debugging.
2022-01-24sq: Add a --time option to sq certify.Neal H. Walfield
2022-01-24sq: Allow specifying the expiration in seconds.Neal H. Walfield
2022-01-24sq: Improve sq inspect's display of certifications.Neal H. Walfield
- Better distinguish multiple certifications. Previously just the issuers of the certification were shown and there can be more than one issuer subpacket per certification. - Also, when set, display the signature's creation time, its expiration time, and the trust depth & trust amount.
2022-01-24sq: Add a --creation-time option to sq key generate.Neal H. Walfield
- Allow the user to explicitly set the key's creation time. - This is useful for: - obscuring the actual creation time. - testing.
2022-01-21openpgp: Fix parsing and serializing keys on 32-bit time_t systems.Justus Winter
- Previously, during parsing and serialization, OpenPGP's unsigned 32-bit timestamps were converted to Rust's SystemTime, which uses time_t. On platforms where that is a signed 32-bit value, the time was truncated. See #668. - One way to fix that is to make Rust's SystemTime independent of time_t. See https://github.com/rust-lang/rust/issues/44394. - The other way is not to convert to SystemTime at the API boundary. See https://gitlab.com/sequoia-pgp/sequoia/-/issues/806. - This fixes handling during parsing and serialization, but doesn't address the API issue. - Fixes #802.
2022-01-20openpgp: Fix decryption of AED messages using SKESK5.Justus Winter
- Previously, we used the cipher algorithm returned by SKESK5::decrypt, which always returns SymmetricAlgorithm::Unencrypted.
2022-01-20openpgp: Avoid unsafe, undefined behavior.Justus Winter
- Now that the chunk size is capped, just initialize the scratch vector.
2022-01-20sq: Implement sq revoke subkey.Neal H. Walfield
2022-01-20sq: Remove redundant predicate.Neal H. Walfield
- `str::starts_with` already checks that the string is not empty. Don't first check that the string is not empty.
2022-01-20sq: Improve sq revoke's error messages.Neal H. Walfield
- There may be a valid key, but not at the specified time. When no key is found and a time stamp is given, add a diagnostic that this might be the problem.
2022-01-20sq: Implement sq revoke userid.Neal H. Walfield
- Generalize the existing code to handle revoking both certificates and User IDs.
2022-01-20sq: Move revoke's argument parsing into the dispatch function.Neal H. Walfield
2022-01-20sq: Generalize cert_stub.Neal H. Walfield
- Generate `cert_stub` to optionally take a User ID. If a User ID is specified emit that instead of the primary User ID.
2022-01-20sq: Move revocation subcommand dispatch to the revoke module.Neal H. Walfield
2022-01-20sq: add scenarios for encrypt/decrypt/sign/verify/certifyLars Wirzenius
Also, tidy up some older stuff a bit. Sponsored-by: NLnet Foundation; NGI Assure; European Commission
2022-01-19sq: add scenarios to verify signing dataLars Wirzenius
Sponsored-by: NLnet Foundation; NGI Assure; European Commission
2022-01-19sq: add verification scenarios for encryption and decryptionLars Wirzenius
Sponsored-by: NLnet Foundation; NGI Assure; European Commission
2022-01-19openpgp: Fix crashes in the cleartext signature parser.Justus Winter
2022-01-19openpgp: Fix documentation.Justus Winter
2022-01-19sq: add verification scenarios for armor/dearmorLars Wirzenius
Sponsored-by: NLnet Foundation; NGI Assure; European Commission
2022-01-19sq: add placeholder scenario for "sq keyring split"Lars Wirzenius
Sponsored-by: NLnet Foundation; NGI Assure; European Commission
2022-01-19sq: verify that "sq keyring filter" worksLars Wirzenius
Sponsored-by: NLnet Foundation; NGI Assure; European Commission
2022-01-17sq: add test scenarios for "sq keyring"Lars Wirzenius
Sponsored-by: NLnet Foundation; NGI Assure; European Commission
2022-01-17sq: move all "sq key" scenarios under a common headingLars Wirzenius
Sponsored-by: NLnet Foundation; NGI Assure; European Commission
2022-01-17readme: Remove ffi and python bindings.Nora Widdecke
Closes #799
2022-01-17docker: Mention in README.md.Nora Widdecke