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

improve API for signatures and subkeys #451

Open
wants to merge 259 commits into
base: master
Choose a base branch
from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Jun 13, 2023

  1. Tests: Check on forward-compatibility failures

    These tests are pulled from the OpenPGP Interoperability Test Suite,
    in particular from those tests tagged "forward-compat":
    
       https://tests.sequoia-pgp.org/?q=forward-compat
    
    These failures make it difficult to use PGPy in an OpenPGP ecosystem
    that can evolve, because PGPy will complain about OpenPGP objects that
    contain something it doesn't understand, even though the rest of the
    message is otherwise comprehensible and usable.
    
    See Justus Winter's message to openpgp@ietf.org describing his
    concerns:
    
    https://mailarchive.ietf.org/arch/msg/openpgp/QUiEKx3PQeJOXnkcvvnuHpv739M
    
    I've selected specific examples that PGPy is known to currently fail with.
    dkg committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    a3941e0 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2023

  1. Drop unused test_load_ask_bench.py

    pgpy.types.Exportable was renamed to Armorable before version 0.3.0
    was released (in d00010e, back in
    2014), which indicates that this test program has not been run in over
    8 years.
    
    Given that the asyncio stuff has also changed in python since then, it
    is simpler to just drop this file than try to fix it.
    dkg committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    fb4bea1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d5155d2 View commit details
    Browse the repository at this point in the history
  3. Avoid looking for encrypted messages with "Plaintext" encoding

    This reduces the number of SKIPPED and XFAIL messages from the test suite.
    
    Given where the cleanup is happening, also make the remaining XFAIL messages
    a little clearer.
    dkg committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    17cb140 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2023

  1. Configuration menu
    Copy the full SHA
    8e4f7ca View commit details
    Browse the repository at this point in the history
  2. Drop erroneous SubkeyBindingSignature

    This is not a signature subpacket.  Rather, it is a signature type.
    dkg committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    0f8c67d View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2023

  1. Configuration menu
    Copy the full SHA
    edd7e4f View commit details
    Browse the repository at this point in the history
  2. initial PGPy-backed implementation of sop

    It works in the basic mode, but we still need to handle the args for
    encrypt/decrypt.
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    26e6c37 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8dabb3a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1d5e06e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    814a65e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    adbd3bd View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    820a9fc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    19c7f7e View commit details
    Browse the repository at this point in the history
  9. cleanup and overhaul python sop.py framework

     - 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)
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    699f4b0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    dad83bc View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    48f2cc1 View commit details
    Browse the repository at this point in the history
  12. sop decrypt: handle session key and verification output cleanly

    Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    0a64e50 View commit details
    Browse the repository at this point in the history
  13. Enable easier extension to the sop interface

    By making all arguments to the functions keyword arguments, we can
    use **kwargs to receive any extended options.
    
    Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    95b635a View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    d5aaa90 View commit details
    Browse the repository at this point in the history
  15. sopgpy: move to 0.2.0 of python-sop

    This reflects the changes to the subcommand names and additional
    arguments from draft-dkg-openpgp-stateless-cli-01
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    6a5f4cd View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    b2b861c View commit details
    Browse the repository at this point in the history
  17. sopgpy: encrypt --sign-with

    This implements simple signatures inside encryption for sopgpy
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    e0b6b9a View commit details
    Browse the repository at this point in the history
  18. sopgpy decrypt: handle --verify-with

    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.
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    0fbb2aa View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    65fe736 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    03c9eae View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    a1fd82f View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    60a046e View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    e136dd7 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    99b839b View commit details
    Browse the repository at this point in the history
  25. Bump sopgpy version to 0.2.0

    there have been a bunch of changes (including implementations of previously-missing options)
    This just acknowledges those changes.
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    a6eb7db View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    b5d9886 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    112f8f5 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    40aa017 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    6da28fc View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    a727188 View commit details
    Browse the repository at this point in the history
  31. sopgpy: create wrapper that permits a closure to do operations with a…

    … locked secret key
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    28fc92f View commit details
    Browse the repository at this point in the history
  32. sopgpy: add sop sign --micalg-out

    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    6678af8 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    6210476 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    faf8f4e View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    14d94b7 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    323b48f View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    b7c3192 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    114321b View commit details
    Browse the repository at this point in the history
  39. sopgpy: move to PGPy 0.6.0 (sigsubj changes)

    sigsubj objects have an "issues" bitfield, which follows
    the "Anna Karenina principle" instead of "verified"
    boolean.
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    8272870 View commit details
    Browse the repository at this point in the history
  40. sopgpy: move to PGPy 0.6.0 (from_blob() behavior changes)

    as of 0.6.0, from_blob() methods will return non-functioning objects
    rather than raising an error directly.
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    34a35b8 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    be04b27 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    70601fc View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    a2a0621 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    02bd731 View commit details
    Browse the repository at this point in the history
  45. sopgpy: drop trailing whitespace

    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    4127e47 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    c3090f9 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    8d071c8 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    d21c5de View commit details
    Browse the repository at this point in the history
  49. OPSv3: get the "nested" flag right

    "nested" semantically probably is meant to mean "another OPS packet follows".
    But the byte on the wire is defined as 0 means another OPS packet follows.
    
    Furthermore, the flags are set in the wrong way: before this commit, the
    code produced a series of OPS packets where the first packet had a different
    value for the flag than all subsequent ones.  What we want is where all the
    flags *except* the last OPS packet (corresponding to the *first* Sig packet)
    are 0.
    
    See https://gitlab.com/sequoia-pgp/openpgp-interoperability-test-suite/-/issues/84
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    773f39b View commit details
    Browse the repository at this point in the history
  50. Add PGPSignatures object, representing bundled detached signatures

    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
    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    e0c2ba8 View commit details
    Browse the repository at this point in the history
  51. sopgpy: clean up type annotations

    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    f087339 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    37a741b View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    cbe16c5 View commit details
    Browse the repository at this point in the history
  54. PEP-8 whitespace cleanup

    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    0aa4d68 View commit details
    Browse the repository at this point in the history
  55. Add PubKeyAlgorithm.Unknown

    dkg committed Jun 16, 2023
    Configuration menu
    Copy the full SHA
    a01c66c View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    d38c069 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2023

  1. Configuration menu
    Copy the full SHA
    0e298a9 View commit details
    Browse the repository at this point in the history
  2. Add PGPSignatures object, representing bundled detached signatures

    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
    dkg committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    692eafd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9e1941 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eb9310a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9d26b2e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cdb6347 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6d78d1b View commit details
    Browse the repository at this point in the history
  8. Drop the use of pyasn1 for DSA/ECDSA signature translation

    The cryptography module supports encoding and decoding these signatures
    directly, so no need for pyasn1 or the custom ASN1 decoder to translate
    between the OpenPGP format and the RFC 3279 format.
    dkg committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    feb4506 View commit details
    Browse the repository at this point in the history
  9. Overhaul EllipticCurveOID (reduce dependencies)

    OpenSSL 1.0.2 is ancient at this point -- Brainpool is part of the standard
    distribution.  At any rate, we need 1.1.0 for X25519 and 1.1.1 for Ed25519.
    
    And python's cryptography module has supported Brainpool since version 2.2
    (also ancient).
    
    Registering subclasses with the cryptography module is complicated across
    versions (see pyca/cryptography#7234 which removed
    register_interface), but we don't need any of that functionality as long as
    we depend on non-ancient modules.
    
    At the same time, we don't need pyasn1 any longer if we just treat the OID
    as a bytestring label.
    
    As this also drops all the shenanigans around
    cryptography.utils.register_interface, we can also say it
    Closes: SecurityInnovation#402
    dkg committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    23ea160 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a1b1947 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    522df3c View commit details
    Browse the repository at this point in the history
  12. PEP-8: whitespace tuneup

    dkg committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    cee0467 View commit details
    Browse the repository at this point in the history
  13. Avoid spurious CryptographyDeprecationWarning

    If someone actually wants to use IDEA, CAST5, or Blowfish, we want to
    see the CryptographyDeprecationWarning objects emitted by
    cryptography.hazmat.primitives.ciphers.  But if we're just looking up
    a non-deprecated cipher we should just return it directly.
    
    This avoids the following kinds of warnings:
    
    pgpy/pgpy/constants.py:191: CryptographyDeprecationWarning: IDEA has been deprecated
      bs = {SymmetricKeyAlgorithm.IDEA: algorithms.IDEA,
    pgpy/pgpy/constants.py:193: CryptographyDeprecationWarning: CAST5 has been deprecated
      SymmetricKeyAlgorithm.CAST5: algorithms.CAST5,
    pgpy/pgpy/constants.py:194: CryptographyDeprecationWarning: Blowfish has been deprecated
      SymmetricKeyAlgorithm.Blowfish: algorithms.Blowfish,
    dkg committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    ba04c11 View commit details
    Browse the repository at this point in the history
  14. Fix test: ensure that deprecation warnings don't interfere with test …

    …suite
    
    Once CAST5 is deprecated, a deprecation warning might arise in
    addition to the warnings about already-protected secret keys might not
    be the first warning.
    
    Instead, we have the test look through the warnings and validate the
    content of any matching warning.
    dkg committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    fb885e6 View commit details
    Browse the repository at this point in the history
  15. drop use of imghdr

    imghdr is deprecated and will be removed in python 3.13 (see https://peps.python.org/pep-0594/#imghdr)
    
    The relevant code in imghdr is just:
    
    ```
    def test_jpeg(h, f):
        """JPEG data with JFIF or Exif markers; and raw JPEG"""
        if h[6:10] in (b'JFIF', b'Exif'):
            return 'jpeg'
        elif h[:4] == b'\xff\xd8\xff\xdb':
            return 'jpeg'
    ```
    
    So we transplant it directly
    dkg committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    221a1f1 View commit details
    Browse the repository at this point in the history
  16. Merge branches 'dont-encrypt-plaintext', 'avoid-naive-datetime', 'cry…

    …ptography-deprecations', 'drop-unused-test', 'drop-imghdr', 'cleanup-registrations', 'fix-aliased-function', 'drop-mistaken-sbs' and 'fix-ops-nested-flag', remote-tracking branches 'ktdreyer/rm-six', 'KOLANICH/modernize' and 'janmojzis/master' into dkg/overhaul
    dkg committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    3227a57 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    3150ef4 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    98b69c2 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. PGPKey.from_file,from_blob: Drop failed filtering of keyid mapping

    This appears to have been introduced in
    38a4f9f nearly 9 years ago, but it
    doesn't look like it ever worked.
    
    It's not clear to me why this index of keys by key ID is returned at
    all in these functions, but since September 2014 (v0.3.0) the index
    has always returned the key ID of the primary key anyway.
    
    There are a few things broken in this particular line:
    
     - the use of `~` if `fingerprint.keyid` doesn't work for some reason:
       that won't match anything.
    
     - and, None gets passed as the second object in the tuple, but the
       second object should be either True or False.
    
    Rather than try to salvage something that i don't understand in the
    first place, i figure it's better to drop it and acknowledge the
    status quo.
    dkg committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    efa2fed View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2023

  1. Configuration menu
    Copy the full SHA
    d2dda7d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fd128d6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    55c2ad4 View commit details
    Browse the repository at this point in the history
  4. drop double export of fingerprint

    This was introduced (accidentally, i think) in
    9ce9ad14ad553304b0f064a8b9e6a929b7527931
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    0863a7b View commit details
    Browse the repository at this point in the history
  5. use functools.singledispatch instead of singledispatch

    functools.singledispatch was made available in Python 3.4
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    604772d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bdcf97e View commit details
    Browse the repository at this point in the history
  7. Rename _encrypt and _decrypt to _cfb_encrypt and _cfb_decrypt

    This sets the stage to distinguish CFB from AEAD
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    0fc8fd0 View commit details
    Browse the repository at this point in the history
  8. PGPKey.encrypt: enumerate optional arguments and type signatures

    using a keyword hash that only pulls out one particular keyword is a recipe
    for API abuse.  better to declare the function arguments explicitly.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    98718cd View commit details
    Browse the repository at this point in the history
  9. Add a handful of type signatures

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    cb2e080 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1f158e8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    34ee5d0 View commit details
    Browse the repository at this point in the history
  12. PKESK: make dynamic arguments lists instead of tuples

    This keeps the types consistent for typechecking.
    
    Otherwise, we see errors complaining that decargs and encargs have different
    types depending on which codepath is followed.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    b1c0e6e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    ef038aa View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    6565828 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    996c00e View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    2b906eb View commit details
    Browse the repository at this point in the history
  17. declare FlagList and ByteFlag types as None or some type

    it might be nicer to specify the allowed category of __flags__ in more details, but i do not know how to do that
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    6c372b3 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    0d1339d View commit details
    Browse the repository at this point in the history
  19. Use the standard name for a namedtuple to satisfy the typechecker

    Without this, mypy complains:
    
    error: First argument to namedtuple() should be "_reason_for_revocation", not "ReasonForRevocation"  [name-match]
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    de8b582 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    ef04603 View commit details
    Browse the repository at this point in the history
  21. Add more simple type annotations

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    2df15a0 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    77c89ea View commit details
    Browse the repository at this point in the history
  23. SorteDeque: add type annotations

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    ef0cb79 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    7c63a6c View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    bbac9e8 View commit details
    Browse the repository at this point in the history
  26. Armorable.ascii_unarmor: clean up type signatures

    The return object from this function is a bit fuzzy, and might be
    better created as an explicit object, rather than a dict.
    
    But for now, at least keep the type definitions reasonable.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    56a3dbb View commit details
    Browse the repository at this point in the history
  27. Packet() constructor is safe due to MetaDispatchable, despite Packet …

    …itself being abstrct
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    b93a2b7 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    9002f31 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    ea28e87 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    cb6a764 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    b72e316 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    2f06397 View commit details
    Browse the repository at this point in the history
  33. clarify when a key must have a UID

    (the earlier arrangement of the comment was unclear, logic has not changed)
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    62eee3e View commit details
    Browse the repository at this point in the history
  34. drop Backend enum and corresponding default_backend() calls

    Python's cryptography module is just going to use the default backend.
    
    There was never really any affordance in the PGPy API to select a
    different backend anyway, so we can just drop it as a simplification.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    0d6ec16 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    b4e87f3 View commit details
    Browse the repository at this point in the history
  36. Add named S2KUsage enum, in alignment with the new registry in crypto…

    …-refresh
    
    There should be no substantive change here, just making the text easier to read
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    d7acaeb View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    8b326f2 View commit details
    Browse the repository at this point in the history
  38. Fingerprint: learn its version explicitly

    This means we also adjust the IssuerFingerprint and IntendedRecipients
    subpackets to just expose a fingerprint.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    88784cb View commit details
    Browse the repository at this point in the history
  39. Drop all use of hashlib

    We leave one use of hashlib in the tests, but all cryptographic digests
    in the running code get pulled from the cryptography module.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    cdc4799 View commit details
    Browse the repository at this point in the history
  40. Move make_onepass to Signature packets

    we keep PGPSignature.make_onepass to avoid an API change, but the logic
    of how to generate an OPS belongs in the Signature packet itself anyway.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    1cd7a38 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    878bc48 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    6e225cd View commit details
    Browse the repository at this point in the history
  43. Overhaul dispatch mechanism to use Enums instead of ints

    This gives clearer semantics to any reader, and puts the mappings of
    magic numbers all in pgpy/constants.py instead of scattered throughout
    the codebase.  It also improves type annotation coverage.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    0bd8c1a View commit details
    Browse the repository at this point in the history
  44. Drop check for __typeid__.__abstractmethod__

    this was introduced in 12d085a and it's
    not clear why it needs to be there.  __typeid__ is typically an
    Optional[int] (or Optional[IntEnum]), so i can't tell what this check would
    prevent
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    86aa055 View commit details
    Browse the repository at this point in the history
  45. Consolidate fingerprint-bearing subpackets

    IntendedRecipient and IssuerFingerprint subpackets have the same wire formats,
    just different semantics.  Consolidate the codebase here.
    
    Note that a freshly-created subpacket like this will emit an all-zeros
    fingerprint if you ask it for one, but will refuse to render itself
    into a wireformat.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    64630b4 View commit details
    Browse the repository at this point in the history
  46. place KeyFlags ("usage") subpacket in order with other subpackets

    placing subpackets in ascending order of subpacket id makes PGPy-generated
    certificates and signatures less distinguishable from other implementations.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    e3691ae View commit details
    Browse the repository at this point in the history
  47. Allow the user to explicitly set features flags

    This permits generation of packets that advertise support that PGPy can't provide
    so it's dangerous to use.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    72b77fe View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    1fe2a14 View commit details
    Browse the repository at this point in the history
  49. When adding a subpacket to the hashed region, remove it from unhashed

    If we're signing specific subpacket content, there's no reason to include
    the same subpacket in the unhashed area; and if the content disagrees,
    there's no reason why any implementation should prefer the unhashed data
    over the hashed data.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    a2c1317 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    ff345c1 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    3efde16 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    717d240 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    fb318ab View commit details
    Browse the repository at this point in the history
  54. when algorithm IDs don't need MPIs, enable a different way to emit them.

    This sets the stage for newer pubkey algorithms that don't use the MPI
    wire format construct.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    bb17b59 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    7b83b7e View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    5755e6d View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    43db15b View commit details
    Browse the repository at this point in the history
  58. Deprecate short ID

    Short IDs are only 32-bits long.  They are cheap to brute force, while
    still being unintelligible and difficult to transcribe correctly for
    humans.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    5ed3fc4 View commit details
    Browse the repository at this point in the history
  59. String2Key: auto-generate salt

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    dad51bb View commit details
    Browse the repository at this point in the history
  60. Correct tests for String2Key

    https://datatracker.ietf.org/doc/html/rfc4880#section-3.7.2.1 says:
    
    > These are followed by an Initial Vector of the same length as the
    > block size of the cipher for the decryption of the secret values, if
    > they are encrypted, and then the secret-key values themselves.
    
    But the test used a uniform IV of length 8 -- this corrects the test.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    7204a64 View commit details
    Browse the repository at this point in the history
  61. String2Key: auto-populate iv

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    4c364ab View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    3c2d0af View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    a1b918a View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    1b9dc5e View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    066454f View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    ad533fd View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    109ecf1 View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    a3b9526 View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    00d26e4 View commit details
    Browse the repository at this point in the history
  70. FingerprintDict: add an OrderedDict that is indexed by fingerprint, b…

    …ut whose values can also be reached by KeyID
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    2110404 View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    026c7b9 View commit details
    Browse the repository at this point in the history
  72. PGPKey.subkeys now returns a FingerprintDict (API change)

    This allows subkey selection by Fingerprint as well as Key ID
    
    We use the FingerprintDict more efficiently, and we also define
    issuer_matches and signing_subkey for simplicity.
    
    PGPKey.decrypt now also can find the correct key/subkey even if the
    PKESK is identified by fingerprint.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    af3436e View commit details
    Browse the repository at this point in the history
  73. PGPSignature API change: keyserver,policy_uri return None if no subpa…

    …cket present
    
    This is a change in the API to more accurately reflect what is
    happening in a signature.  It's possible to have a subpacket that
    contains the empty string, and this allows a consumer to distinguish
    between the two cases.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    82f1bdb View commit details
    Browse the repository at this point in the history
  74. API change: Drop FlagEnum, use enum.IntFlag

    For features, keyserverprefs, and key_flags, we also now
    return a simple IntFlags object (not a set), and None when
    no corresponding subpacket is present.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    4840a2a View commit details
    Browse the repository at this point in the history
  75. Configuration menu
    Copy the full SHA
    87afd8e View commit details
    Browse the repository at this point in the history
  76. String2Key: break out S2KSpecifier as an independent subfield

    This is useful because the S2KSpecifier will be reused in several
    different places during implementation of the crypto refresh, witho ut
    the usage octet, the IV, or the encryption algorithm identifier.
    
    This also paves the way for a simpler addition of other S2K types
    (including Argon2)
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    42b5b26 View commit details
    Browse the repository at this point in the history
  77. PGPKey.protect: do not require explicit algorithm specification

    users shouldn't need to choose an algorithm, there should just be sane
    choices.
    
    We allow the user to provide arguments to avoid an API change.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    1950a97 View commit details
    Browse the repository at this point in the history
  78. Configuration menu
    Copy the full SHA
    349f6b6 View commit details
    Browse the repository at this point in the history
  79. Allow passing through a full S2K when protecting a secret key

    This gives the user more control if they want to control how the encrypted
    blob works, while deferring to the S2KSpecifier interface.
    
    We copy the S2K Specifier upon reciept, so that if the s2k specifier
    changes later, it doesn't sneakily get changed here too.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    b47fe1c View commit details
    Browse the repository at this point in the history
  80. PGPKey.protect: allow user to pass in list of IVs

    enables creation of reproducible results, not for standard use.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    dacb09b View commit details
    Browse the repository at this point in the history
  81. Normalize searching for preferences (API change)

    - a selfsig *without* a preferences subpacket (no preference stated)
      is different from a selfsig with an empty preferences subpacket (a
      stated preference for the MTI algorithm)
    
    - given the complications around deciding between multiple selfsigs
      with different preferences, we might want to skip a selfsig with no
      preference stated, but terminate on a selfsig with a stated
      preference, even if it is empty
    
    - use a generator to walk the list of selfsigs that might have
      legitimately-stated preferences
    
    This includes a subtle API change (preferences properties can now
    return None as distinct from an empty list), but i think it's
    necessary to do the right thing here.
    
    Tests are adjusted to match the new behavior as well.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    596eb3e View commit details
    Browse the repository at this point in the history
  82. Minor type-checking improvements

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    c771653 View commit details
    Browse the repository at this point in the history
  83. Enable explicitly setting the IV when encrypting SEIPDv1

    This makes it easier to generate deterministic test vectors from PGPy,
    but *SHOULD NOT* be used in regular operations.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    b9b1c1f View commit details
    Browse the repository at this point in the history
  84. Allow user to set salts explicitly for each S2K when protecting a key

    without this, the first use of the S2K will internally generate a salt
    and then subsequent uses of it will reuse the salt, probably not a
    desired outcome.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    6c0ed22 View commit details
    Browse the repository at this point in the history
  85. Configuration menu
    Copy the full SHA
    6dc82a9 View commit details
    Browse the repository at this point in the history
  86. Configuration menu
    Copy the full SHA
    e7a313d View commit details
    Browse the repository at this point in the history
  87. Configuration menu
    Copy the full SHA
    df78503 View commit details
    Browse the repository at this point in the history
  88. SignatureV4: handle signer being None.

    This means cleaning up how we handle OnePassSignature generation as well.
    
    And, PGPUID.signers now returns Fingerprints instead of KeyIDs, so we
    fix up the tests too.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    372097c View commit details
    Browse the repository at this point in the history
  89. Configuration menu
    Copy the full SHA
    f6887f6 View commit details
    Browse the repository at this point in the history
  90. Configuration menu
    Copy the full SHA
    3daa0db View commit details
    Browse the repository at this point in the history
  91. Configuration menu
    Copy the full SHA
    748bb59 View commit details
    Browse the repository at this point in the history
  92. Configuration menu
    Copy the full SHA
    1cfaf3d View commit details
    Browse the repository at this point in the history
  93. Configuration menu
    Copy the full SHA
    ba1ec45 View commit details
    Browse the repository at this point in the history
  94. Consolidate methods into PrivKey and PubKey from PrivKeyv4 and PubKeyV4

    This moves code shared by v6 keys and v4 keys into common base classes
    
    We also adjust the inheritance tree for PrivSubKey: this should cause
    no functional change, but it makes the expanded API surface for
    PubSubKey more visible directly in PrivSubKey, which in turn will make
    type annotations clearer when subkeys are invoked.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    6c54fb9 View commit details
    Browse the repository at this point in the history
  95. more type annotation cleanup

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    428986a View commit details
    Browse the repository at this point in the history
  96. Configuration menu
    Copy the full SHA
    9fa615a View commit details
    Browse the repository at this point in the history
  97. PGPMessage: add type signatures, make some keyword arguments explicit

    If the session key in encrypt_sk is an int, we need to convert it
    manually to a bytes object.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    5cf4ca2 View commit details
    Browse the repository at this point in the history
  98. Configuration menu
    Copy the full SHA
    e05f026 View commit details
    Browse the repository at this point in the history
  99. PGPObject: add type signatures

    Note that bytes_to_text and text_to_bytes no longer accept None as input.
    
    When they would accept None as input, that meant that their output could also be None
    which in turn made it harder to vet the type of the output when the input was
    clearly not None.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    247c10f View commit details
    Browse the repository at this point in the history
  100. Configuration menu
    Copy the full SHA
    8497be3 View commit details
    Browse the repository at this point in the history
  101. PKESK: encrypt_sk and decrypt_sk need a proper corresponding PubKey o…

    …r PrivKey packet
    
    In addition to the extra type safety, this also corrects an erroneous comment about them.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    dfdae47 View commit details
    Browse the repository at this point in the history
  102. More basic type annotations

    Note that we change types.Header._lenfmt from an int to a bool, and
    rename it _openpgp_format.  this is in keeping with the
    crypto-refresh, which explicitly names the two headr formats "OpenPGP
    format" and "Legacy Format".
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    dc9314b View commit details
    Browse the repository at this point in the history
  103. Configuration menu
    Copy the full SHA
    24d71d5 View commit details
    Browse the repository at this point in the history
  104. Configuration menu
    Copy the full SHA
    17e5e75 View commit details
    Browse the repository at this point in the history
  105. Configuration menu
    Copy the full SHA
    0c816b7 View commit details
    Browse the repository at this point in the history
  106. PGPUID: add type annotations

    Note that you used to be able to use the or operator to append UserID and
    UserAttribute packets indefinitely, but only the first packet would take effect.
    all the other ones would be silently ignored.
    
    the current code is simpler, but instead ignores all the previous packets,
    and uses the last one.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    8aeb86f View commit details
    Browse the repository at this point in the history
  107. Configuration menu
    Copy the full SHA
    96c422a View commit details
    Browse the repository at this point in the history
  108. Configuration menu
    Copy the full SHA
    d46439d View commit details
    Browse the repository at this point in the history
  109. PGPUID: improve string parsing, return None when fields are missing

    This also avoids parsing and then re-assembling the user ID during
    __format__ operations, which in the worst case can actually modify the
    string returned.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    94c3f7c View commit details
    Browse the repository at this point in the history
  110. Configuration menu
    Copy the full SHA
    e10e64f View commit details
    Browse the repository at this point in the history
  111. Prepare SubPackets object to have different length binary representat…

    …ions
    
    in v6 keys, the wire format for the subpacket sections contains 4-octet
    length fields instead of 2.  Make the rest of the code flexible enough to
    prepare for that (without changing it)
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    d9bd771 View commit details
    Browse the repository at this point in the history
  112. PubKeyV4: more type signatures

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    27fbae9 View commit details
    Browse the repository at this point in the history
  113. Configuration menu
    Copy the full SHA
    b5e6635 View commit details
    Browse the repository at this point in the history
  114. Configuration menu
    Copy the full SHA
    1c7dd79 View commit details
    Browse the repository at this point in the history
  115. Configuration menu
    Copy the full SHA
    ca370d3 View commit details
    Browse the repository at this point in the history
  116. More type signatures

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    f325c66 View commit details
    Browse the repository at this point in the history
  117. Configuration menu
    Copy the full SHA
    5f470ca View commit details
    Browse the repository at this point in the history
  118. Configuration menu
    Copy the full SHA
    15481fb View commit details
    Browse the repository at this point in the history
  119. Type checker gets confused by __copy__ overloading with multiple inhe…

    …ritance
    
    This shouldn't be a problem because __copy__ will actually work correctly
    thanks to the multiple inheritance itself.
    
    There could be a better way to annotate this that i don't know about, but
    this should do.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    b4f0fed View commit details
    Browse the repository at this point in the history
  120. Configuration menu
    Copy the full SHA
    6e98320 View commit details
    Browse the repository at this point in the history
  121. Rename PacketTag to PacketType

    While the term "Tag" is present in the spec, it's ambiguous and
    confusing, and the identifier is also referred to as the type of
    packet.  See discussion over on
    https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/319
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    30d6c2b View commit details
    Browse the repository at this point in the history
  122. Configuration menu
    Copy the full SHA
    8ff5062 View commit details
    Browse the repository at this point in the history
  123. More type signatures

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    4bf03a5 View commit details
    Browse the repository at this point in the history
  124. SKESK: use S2KSpecifier instead of String2Key

    This means that we can also simplify parsing the String2Key
    (no need to pass along whether we need to parse out an iv).
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    f3e0ced View commit details
    Browse the repository at this point in the history
  125. fields.PrivKey: learn about the version of the key

    This will become useful as newer versions of secret key packets have
    different wire formats for the key material.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    2ad0f33 View commit details
    Browse the repository at this point in the history
  126. String2Key: make key_version explicit

    This will become useful because when String2Key is placed on the wire
    in a Secret Key packet, it may be represented differently depending on
    the version of the secret key packet.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    6a288eb View commit details
    Browse the repository at this point in the history
  127. more type signatures

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    7d08485 View commit details
    Browse the repository at this point in the history
  128. PrivKeyV4.pubkey: move most of implementation to base class

    This prepares us for a simplified switch for v6 keys.
    
    Improve the type signatures for the superclass here,
    since pubkey() is a method, not a property.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    6f19590 View commit details
    Browse the repository at this point in the history
  129. Configuration menu
    Copy the full SHA
    43ca39c View commit details
    Browse the repository at this point in the history
  130. Configuration menu
    Copy the full SHA
    cdc784f View commit details
    Browse the repository at this point in the history
  131. Configuration menu
    Copy the full SHA
    0908d94 View commit details
    Browse the repository at this point in the history
  132. Test and support python 3.11

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    fd89df7 View commit details
    Browse the repository at this point in the history
  133. Configuration menu
    Copy the full SHA
    3068a0c View commit details
    Browse the repository at this point in the history
  134. from __future__ import annotations

    This lets us use forward-declared type annotations without manually noting them as strings.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    0c2cfd1 View commit details
    Browse the repository at this point in the history
  135. Add PGPSubject

    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    7ed5edf View commit details
    Browse the repository at this point in the history
  136. explicitly document the ability to sign encrypted messages

    I'm deeply skeptical about the sense or utility of this, but
    it is at least documenting the current behavior more adequately.
    
    The resulting messages (when signed) form this packet sequence:
    SIG PKESK SEIPD
    
    This is technically valid in the formal OpenPGP message grammar
    but it's unclear what it is supposed to mean.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    e6fa7ef View commit details
    Browse the repository at this point in the history
  137. Declare SignatureVerifications.SigSubj with NamedTuple

    (instead of sigsubj (with namedtuple))
    This makes it easier to see type-annotations.
    
    Since the name of the type was never fully exported anyway, and it keeps
    all of its standard members, this isn't really an API change.
    dkg committed Jul 13, 2023
    Configuration menu
    Copy the full SHA
    8460756 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2023

  1. Configuration menu
    Copy the full SHA
    c39c873 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ffb540a View commit details
    Browse the repository at this point in the history
  3. PGPKey: add more type annotations

    dkg committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    d5dad20 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    217c84e View commit details
    Browse the repository at this point in the history
  5. sopgpy: correct handling for inline-signed messages

    This had been broken with the introduction of PGPSignatures,
    but it should now work again.
    dkg committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    36a1390 View commit details
    Browse the repository at this point in the history
  6. clean up regex for cleartext signing framework

    newlines near the top of a CSF message can be handled more delicately.
    
    - if the Hash: header is missing, we want the trailing newline to appear
    - there's no need to have a non-capturing grouping places where the group is not used.
    dkg committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    ca2b4ac View commit details
    Browse the repository at this point in the history
  7. ImageEncoding: use Unknown the same way as PacketType and PubKeyAlgor…

    …ithm
    
    I don't expect new image encoding types to be defined.
    
    Indeed, the version itself could just go away and we could probably retcon
    UserAttribute 1 as JPEG (see
    https://gitlab.com/openpgp-wg/rfc4880bis/-/issues/162) with a weird 16-octet header.
    
    But it's better to have the code normalized here.
    dkg committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    b9b64b5 View commit details
    Browse the repository at this point in the history
  8. More type annotations

    dkg committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    dcfe210 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    98b62a7 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e467d8e View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    cc34a73 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2d53b9a View commit details
    Browse the repository at this point in the history
  13. PGPKey.new() no longer requires a key_size option.

    The implementation will select a reasonable option for the
    indicated pubkey algorithm if you don't supply it.
    dkg committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    ee92d8d View commit details
    Browse the repository at this point in the history
  14. sopgpy: add a Direct Key Signature to the default key creation

    This could be done only during the --profile
    draft-ietf-openpgp-crypto-refresh-10, but there's nothing in the
    earlier specifications that would indicate a problem or
    incompatibility to include such a signature.
    dkg committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    f799d4b View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    6fb08f2 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    11d641c View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    08dd35c View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    35b00e8 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    18a557c View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    4ab37e4 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    49c6083 View commit details
    Browse the repository at this point in the history
  22. Revise ciphertext API

    Move encrypt into fields.PubKey, and decrypt into fields.PrivKey.
    This is a simplifying change, and also prepares the codebase for
    the crypto-refresh, which has different subtle changes in the encoded
    pkesk, for different versions and different algorithms.
    
    The underlying cryptographic code gets pushed into fields.py (out of sight
    from higher-level functions) and lets us make more straightforward and
    explicit type definitions.
    dkg committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    77c05bb View commit details
    Browse the repository at this point in the history
  23. Clean up NotImplemented/NotImplementedError

    - if something is not implemented, just raise NotImplementedError
      directly, rather than trying to sometimes return a NotImplemented
      object.  Returning a NotImplemented object complicates the type
      signature without providing much of an advantage in terms of
      workflow.
    
    - PGPSignature.target_signature is a property that was never
      implemented or used.  We can just drop this property entirely,
      implementing it only when it can actually be implemented.
    dkg committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    a9d7a11 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    7dee6b0 View commit details
    Browse the repository at this point in the history
  25. PGPKey: add features property

    dkg committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    2e883d7 View commit details
    Browse the repository at this point in the history
  26. sopgpy: search for cipher preferences more cleanly

    use search_pref_sigs() instead of walking each user ID
    dkg committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    a57714c View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    51cefc7 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2023

  1. Have tox take the baseline requirements from requirements.txt

    This leaves only one place to list the requirements
    dkg committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    d713701 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2023

  1. Configuration menu
    Copy the full SHA
    f6cf609 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2023

  1. Parse embedded signature without assuming version

    This will be important if a non-v4 signature gets embedded.
    
    It might end up being an opaque signature, if PGPy can't read the
    version, but it shouldn't try to force a SignatureV4 if it is not
    actually version 4.
    
    This change also isolates the parsing of the embedded signature so that
    it can only consume bytes within the enclosing subpacket.
    dkg committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    639b72b View commit details
    Browse the repository at this point in the history
  2. Don't pass fingerprint version to FingerprintSubpacket

    This hasn't been necessary since fingerprints knew their own version,
    it was just a no-op.
    dkg committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    e810446 View commit details
    Browse the repository at this point in the history
  3. SubPackets.addnew: warn when trying to set a non-existent attribute

    This is what caught the problem of passing _version to addnew
    dkg committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    46d9995 View commit details
    Browse the repository at this point in the history