Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offer implementation of the Stateless OpenPGP Command-Line Interface ("SOP") #440

Open
wants to merge 52 commits into
base: master
Choose a base branch
from

Conversation

dkg
Copy link
Contributor

@dkg dkg commented Jun 8, 2023

This series takes the history of sopgpy (which has been in use by the OpenPGP interoperability test suite for a while now) and merges it into the PGPy repository itself.

This way, people who install PGPy will also get a command-line tool to do simple keygen/encrypt/decrypt/sign/verify operations. It also makes it easier for the interop test suite to pull in new features and bugfixes from PGPy, if they're available.

@dkg
Copy link
Contributor Author

dkg commented Jun 14, 2023

I just pushed another change, based on the PGPSignatures object introduced over in #442, which handles bundles of detached signatures more cleanly.

dkg and others added 28 commits June 16, 2023 17:45
It works in the basic mode, but we still need to handle the args for
encrypt/decrypt.
 - add enums for the flags passed into the sop interface

 - make member functions of StatelessOpenPGP well-typed

 - adjust docstrings so that help(sop) provides useful guidance

 - handle sessionkey and timestamp parsing in sop.py

 - handle all indirect access directly in sop.py

 - complete strict typing ("mypy --strict sop.py" passes)
By making all arguments to the functions keyword arguments, we can
use **kwargs to receive any extended options.

Signed-off-by: Daniel Kahn Gillmor <[email protected]>
This reflects the changes to the subcommand names and additional
arguments from draft-dkg-openpgp-stateless-cli-01
This implements simple signatures inside encryption for sopgpy
This should enable tests of signature verification concurrent with
decryption.

We do this by refactoring out the signature verification and relying
on PGPY to know how to verify an "inline" message.
there have been a bunch of changes (including implementations of previously-missing options)
This just acknowledges those changes.
dkg added 19 commits June 16, 2023 17:45
sigsubj objects have an "issues" bitfield, which follows
the "Anna Karenina principle" instead of "verified"
boolean.
as of 0.6.0, from_blob() methods will return non-functioning objects
rather than raising an error directly.
dkg added 5 commits June 16, 2023 18:07
a PGPMessage object can contain more than one signature.  Detached signatures should
also be able to handle having more than one signature.

https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-09.html#name-detached-signatures says:

> These detached signatures are simply one or more Signature packets
> stored separately from the data for which they are a signature.

A PGPSignatures object makes the most sense to represent such a thing.

Closes: SecurityInnovation#197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants