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 forward compatibility #442

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

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 16, 2023

  1. Configuration menu
    Copy the full SHA
    edd7e4f View commit details
    Browse the repository at this point in the history
  2. 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
  3. 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