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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
259 commits
Select commit Hold shift + click to select a range
a3941e0
Tests: Check on forward-compatibility failures
dkg Jun 11, 2023
fb4bea1
Drop unused test_load_ask_bench.py
dkg Feb 11, 2023
d5155d2
tests: Avoid passing naive datetime objects
dkg May 9, 2023
17cb140
Avoid looking for encrypted messages with "Plaintext" encoding
dkg Jun 14, 2023
8e4f7ca
rename setter for EmbeddedSignature._sig (otherwise definition was al…
dkg May 9, 2023
0f8c67d
Drop erroneous SubkeyBindingSignature
dkg May 11, 2023
edd7e4f
handle Armored text with UTF-8 comments
dkg Jun 11, 2023
26e6c37
initial PGPy-backed implementation of sop
dkg Oct 25, 2019
8dabb3a
sop.py: allow instances to augment the interface; provide autocomplete
dkg Oct 25, 2019
1d5e06e
treat keyflags as a set, as expected
dkg Oct 26, 2019
814a65e
use specialized exception for missing options
dkg Oct 26, 2019
adbd3bd
sopgpy: add armor and dearmor subcommands
dkg Oct 27, 2019
820a9fc
indicate each unsupported feature separately for cleaner diffs
dkg Oct 27, 2019
19c7f7e
sopgpy: added --sessionkey to encrypt subcommand
dkg Oct 27, 2019
699f4b0
cleanup and overhaul python sop.py framework
dkg Oct 28, 2019
dad83bc
clean up signature result printing
dkg Oct 28, 2019
48f2cc1
sopgpy: do not try to encrypt with IDEA
dkg Oct 28, 2019
0a64e50
sop decrypt: handle session key and verification output cleanly
dkg Oct 28, 2019
95b635a
Enable easier extension to the sop interface
dkg Oct 28, 2019
d5aaa90
sopgpy: Improve shebang so that we can use virtualenv.
teythoon Oct 29, 2019
6a5f4cd
sopgpy: move to 0.2.0 of python-sop
dkg Nov 8, 2019
b2b861c
PGPy removed __version__ in 0.5.4. This fix relies on python ≥ 3.8
dkg Feb 2, 2022
e0b6b9a
sopgpy: encrypt --sign-with
dkg Feb 2, 2022
0fbb2aa
sopgpy decrypt: handle --verify-with
dkg Feb 2, 2022
65fe736
sopgpy encrypt: implement --with-password
dkg Feb 2, 2022
03c9eae
sopgpy decrypt: implement --with-password
dkg Feb 2, 2022
a1fd82f
sopgpy sign: Raise the correct error when trying to sign non-UTF-8 te…
dkg Feb 2, 2022
60a046e
reported multiple signature problem to PGPy
dkg Feb 2, 2022
e136dd7
sopgpy encrypt: respect --as= argument
dkg Feb 2, 2022
99b839b
Avoid passing a bytes object as a passphrase to pgpy ≤ 0.5.4
dkg Feb 4, 2022
a6eb7db
Bump sopgpy version to 0.2.0
dkg Feb 4, 2022
b5d9886
sopgpy: move _multisig bogus object to its own definition
dkg Aug 24, 2022
112f8f5
sopgpy: drop sop armor's --allow-nested option (deprecated in the spec)
dkg Aug 24, 2022
40aa017
sopgpy: fix decrypt warnings when symmetric decryption fails
dkg Aug 24, 2022
6da28fc
sopgpy: clean up _maybe_armor type definitions
dkg Aug 24, 2022
a727188
sopgpy: clean up tz-naive objects if pgpy emits them (it shouldn't)
dkg Aug 24, 2022
28fc92f
sopgpy: create wrapper that permits a closure to do operations with a…
dkg Aug 24, 2022
6678af8
sopgpy: add sop sign --micalg-out
dkg Aug 24, 2022
6210476
sopgpy: announce backend distinctly from version of sopgpy
dkg Aug 24, 2022
faf8f4e
sopgpy: add sop generate-key --with-key-password
dkg Aug 24, 2022
14d94b7
sopgpy: add --with-key-password to decrypt, sign, and encrypt (when s…
dkg Aug 24, 2022
323b48f
sopgpy: add inline-{detach,sign,verify}
dkg Aug 24, 2022
b7c3192
sopgpy: bump to version 0.3.0 (depends on sop 0.4.0)
dkg Aug 24, 2022
114321b
sopgpy generate-key: improve key password
dkg Nov 7, 2022
8272870
sopgpy: move to PGPy 0.6.0 (sigsubj changes)
dkg Jan 24, 2023
34a35b8
sopgpy: move to PGPy 0.6.0 (from_blob() behavior changes)
dkg Jan 24, 2023
be04b27
sopgpy: change license to match PGPy license. I am the sole author s…
dkg Jun 1, 2023
70601fc
sopgpy: use the PGPy version directly, rather than a distinct sopgpy …
dkg Jun 2, 2023
a2a0621
sopgpy version --extended: add version info about cryptography module…
dkg Jun 2, 2023
02bd731
intentionally distribute sopgpy as part of the module
dkg Jun 2, 2023
4127e47
sopgpy: drop trailing whitespace
dkg Jun 2, 2023
c3090f9
sopgpy: return ArgumentParser for argparse-manpage
dkg Jun 2, 2023
8d071c8
sopgpy: lowercase name to match the command-line name
dkg Jun 3, 2023
d21c5de
use keyword-based arguments when creating SOPSigResult
dkg Jun 8, 2023
773f39b
OPSv3: get the "nested" flag right
dkg May 20, 2023
e0c2ba8
Add PGPSignatures object, representing bundled detached signatures
dkg Jun 11, 2023
f087339
sopgpy: clean up type annotations
dkg Jun 15, 2023
37a741b
sopgpy: use sop 0.5.1 (support profiles)
dkg Jun 15, 2023
cbe16c5
sopgpy generate-key: Add "rfc4880" profile, for 3072-bit RSA keys
dkg Jun 15, 2023
0aa4d68
PEP-8 whitespace cleanup
dkg Jun 16, 2023
a01c66c
Add PubKeyAlgorithm.Unknown
dkg Jun 13, 2023
d38c069
Handle signatures that use an unknown public key algorithm
dkg Jun 12, 2023
0e298a9
Handle subkeys with unknown public key algorithms cleanly
dkg Jun 13, 2023
692eafd
Add PGPSignatures object, representing bundled detached signatures
dkg Jun 11, 2023
d9e1941
use PGPSignatures to handle multi-sig detached signatures
dkg Jun 13, 2023
eb9310a
PGPMessage: ignore opaque packets when assembling
dkg Jun 13, 2023
9d26b2e
PKESKv3: correct packet length consumption when pubkey algorithm is u…
dkg Jun 13, 2023
cdb6347
PKESKv3: handle unknown pubkey algorithms cleanly
dkg Jun 13, 2023
6d78d1b
String2KeyType: introduce "Unknown" option, and note opaque values wh…
dkg Jun 13, 2023
feb4506
Drop the use of pyasn1 for DSA/ECDSA signature translation
dkg May 12, 2023
23ea160
Overhaul EllipticCurveOID (reduce dependencies)
dkg May 13, 2023
a1b1947
HashAlgorithm: treat Unknown explicitly, like PubKeyAlgorithm
dkg Jun 13, 2023
522df3c
When a curve is unknown, treat the EC point as an opaque MPI
dkg Jun 14, 2023
cee0467
PEP-8: whitespace tuneup
dkg Jun 16, 2023
ba04c11
Avoid spurious CryptographyDeprecationWarning
dkg Feb 22, 2023
fb885e6
Fix test: ensure that deprecation warnings don't interfere with test …
dkg Mar 27, 2023
221a1f1
drop use of imghdr
dkg Feb 11, 2023
3227a57
Merge branches 'dont-encrypt-plaintext', 'avoid-naive-datetime', 'cry…
dkg Jun 28, 2023
3150ef4
Merge branch 'compat-tests' into dkg/overhaul
dkg Jun 28, 2023
98b69c2
Merge branch 'sop' into dkg/overhaul
dkg Jun 28, 2023
efa2fed
PGPKey.from_file,from_blob: Drop failed filtering of keyid mapping
dkg Jul 11, 2023
d2dda7d
Merge branch 'cleanup-keylist' into dkg/overhaul
dkg Jul 13, 2023
fd128d6
python cleanup: collections.abc was split out in python 3.3
dkg Mar 16, 2023
55c2ad4
drop __nonzero__ -- 3.x uses __bool__
dkg Feb 10, 2023
0863a7b
drop double export of fingerprint
dkg May 2, 2023
604772d
use functools.singledispatch instead of singledispatch
dkg May 3, 2023
bdcf97e
add an explicit "return None" when selfsig has nothing
dkg May 3, 2023
0fc8fd0
Rename _encrypt and _decrypt to _cfb_encrypt and _cfb_decrypt
dkg Mar 26, 2023
98718cd
PGPKey.encrypt: enumerate optional arguments and type signatures
dkg Mar 26, 2023
cb2e080
Add a handful of type signatures
dkg Mar 26, 2023
1f158e8
SKESK: clarify type signatures for encrypt_sk and decrypt_sk
dkg Feb 15, 2023
34ee5d0
Add type signatures for PKESK.encrypt_sk and PKESK.decrypt_sk
dkg May 2, 2023
b1c0e6e
PKESK: make dynamic arguments lists instead of tuples
dkg May 3, 2023
ef038aa
PGPUID: make regex-matcher more comprehensible to typechecker
dkg May 3, 2023
6565828
Note that __ver__ of a packet is either int or None (unversioned)
dkg May 3, 2023
996c00e
packets.PubKey.fingerprint: property is of type Fingerprint
dkg May 3, 2023
2b906eb
pgpy/types.py: clean up mypy warnings
dkg May 4, 2023
6c372b3
declare FlagList and ByteFlag types as None or some type
dkg May 9, 2023
0d1339d
Tell the typechecker that MPIs, PrivKey, and PubKey can all use varia…
dkg May 9, 2023
de8b582
Use the standard name for a namedtuple to satisfy the typechecker
dkg May 9, 2023
ef04603
PGPSignature: document non-controversial type signatures
dkg May 10, 2023
2df15a0
Add more simple type annotations
dkg May 13, 2023
77c89ea
_cfb_encrypt, _cfb_decrypt: add type signatures
dkg May 10, 2023
ef0cb79
SorteDeque: add type annotations
dkg May 10, 2023
7c63a6c
Add enumerated types for Signature and Attribute subpackets
dkg May 12, 2023
bbac9e8
PEP-8 cleanup (mostly whitespace fiddling)
dkg Jun 15, 2023
56a3dbb
Armorable.ascii_unarmor: clean up type signatures
dkg Jun 15, 2023
b93a2b7
Packet() constructor is safe due to MetaDispatchable, despite Packet …
dkg Jun 15, 2023
9002f31
clean up type checking for CipherTexts
dkg Jun 15, 2023
ea28e87
Clean up type checking for Signatures
dkg Jun 15, 2023
cb6a764
clean up type checking for Key material fields
dkg Jun 15, 2023
b72e316
Test attempts to use EdDSA with anything but Ed25519
dkg May 13, 2023
2f06397
Ensure that IssuerFingerprint subpacket contains None or Fingerprint
dkg Feb 2, 2023
62eee3e
clarify when a key must have a UID
dkg Feb 1, 2023
0d6ec16
drop Backend enum and corresponding default_backend() calls
dkg May 10, 2023
b4e87f3
drop HashAlgorithm.tuned_count (not necessary, we just max out S2K)
dkg May 10, 2023
d7acaeb
Add named S2KUsage enum, in alignment with the new registry in crypto…
dkg May 10, 2023
8b326f2
HashAlgorithm.digest() -- one-off hash from the cryptography module
dkg May 16, 2023
88784cb
Fingerprint: learn its version explicitly
dkg May 10, 2023
cdc4799
Drop all use of hashlib
dkg May 18, 2023
1cd7a38
Move make_onepass to Signature packets
dkg May 18, 2023
878bc48
String2Key: improve type signatures
dkg Jun 16, 2023
6e225cd
Each public key implementation should know what "pubkey algo" it uses
dkg Apr 11, 2023
0bd8c1a
Overhaul dispatch mechanism to use Enums instead of ints
dkg May 12, 2023
86aa055
Drop check for __typeid__.__abstractmethod__
dkg May 11, 2023
64630b4
Consolidate fingerprint-bearing subpackets
dkg May 13, 2023
e3691ae
place KeyFlags ("usage") subpacket in order with other subpackets
dkg Feb 4, 2023
72b77fe
Allow the user to explicitly set `features` flags
dkg Feb 4, 2023
1fe2a14
Ensure feature flags can be placed on Direct Key signatures
dkg Feb 4, 2023
a2c1317
When adding a subpacket to the hashed region, remove it from unhashed
dkg Mar 7, 2023
ff345c1
Create normalized signatures by sorting subpackets by type ID
dkg Mar 7, 2023
3efde16
string representation of subpacket should report when it is critical
dkg Mar 7, 2023
717d240
Make it possible to add a critical subpacket
dkg Mar 7, 2023
fb318ab
Make CreationTime and KeyFlags subpackets critical by default
dkg Mar 7, 2023
bb17b59
when algorithm IDs don't need MPIs, enable a different way to emit them.
dkg Feb 26, 2023
7b83b7e
PGPKey.userids always returns a list of PGPUIDs
dkg May 10, 2023
5755e6d
constants.py: add type annotations
dkg Jun 16, 2023
43db15b
PrivKey._generate should make reasonable choices if params are None
dkg May 13, 2023
5ed3fc4
Deprecate short ID
dkg May 15, 2023
dad51bb
String2Key: auto-generate salt
dkg Jun 17, 2023
7204a64
Correct tests for String2Key
dkg Mar 27, 2023
4c364ab
String2Key: auto-populate iv
dkg Mar 26, 2023
3c2d0af
Add KeyID object by analogy with Fingerprint
dkg May 6, 2023
a1b918a
PGPSignature.signer_fingerprint returns None when absent (API change)
dkg May 9, 2023
1b9dc5e
Type signatures: declare where KeyID and Fingerprints might be returned
dkg May 9, 2023
066454f
return issuer fingerprints as well as issuer key IDs when available
dkg May 9, 2023
ad533fd
Add type signatures for Fingerprint methods
dkg May 6, 2023
109ecf1
ensure that we can test for equality between a keyID and a fingerprint
dkg May 7, 2023
a3b9526
add type signatures for PKESK.encrypter
dkg May 8, 2023
00d26e4
fixup! add type signatures for PKESK.encrypter
dkg Jun 16, 2023
2110404
FingerprintDict: add an OrderedDict that is indexed by fingerprint, b…
dkg May 8, 2023
026c7b9
Avoid inspecting dervied Generic super classes during a copy
dkg May 9, 2023
af3436e
PGPKey.subkeys now returns a FingerprintDict (API change)
dkg May 2, 2023
82f1bdb
PGPSignature API change: keyserver,policy_uri return None if no subpa…
dkg May 10, 2023
4840a2a
API change: Drop FlagEnum, use enum.IntFlag
dkg May 10, 2023
87afd8e
Simplify FlagList sdproperty registration
dkg May 10, 2023
42b5b26
String2Key: break out S2KSpecifier as an independent subfield
dkg Jun 17, 2023
1950a97
PGPKey.protect: do not require explicit algorithm specification
dkg Mar 26, 2023
349f6b6
PGPKey.protect: Drop hard-coded algorithm choices.
dkg Mar 27, 2023
b47fe1c
Allow passing through a full S2K when protecting a secret key
dkg Mar 26, 2023
dacb09b
PGPKey.protect: allow user to pass in list of IVs
dkg Mar 26, 2023
596eb3e
Normalize searching for preferences (API change)
dkg Mar 26, 2023
c771653
Minor type-checking improvements
dkg Jun 20, 2023
b9b1c1f
Enable explicitly setting the IV when encrypting SEIPDv1
dkg Mar 14, 2023
6c0ed22
Allow user to set salts explicitly for each S2K when protecting a key
dkg Apr 7, 2023
6dc82a9
PGPSignature.new: use Fingerprint for signer
dkg May 17, 2023
e7a313d
PGPKey: filter self-sigs based on fingerprints, not just key IDs
dkg May 17, 2023
df78503
PGPKey.signers: return fingerprints where possible, not just key IDs
dkg May 17, 2023
372097c
SignatureV4: handle signer being None.
dkg May 17, 2023
f6887f6
crosssig should have same time as subkey binding sig
dkg May 18, 2023
3daa0db
OnePassSignatureV3: add type signatures
dkg Jun 21, 2023
748bb59
OnePassSignatureV3: move common members to OnePassSignature
dkg Jun 21, 2023
1cfaf3d
OnePassSignatureV3.__bytearray__: simplify appending one-octet fields
dkg Jun 21, 2023
ba1ec45
packets.Signature: consolidate shared functionality from SignatureV4
dkg Jun 21, 2023
6c54fb9
Consolidate methods into PrivKey and PubKey from PrivKeyv4 and PubKeyV4
dkg May 19, 2023
428986a
more type annotation cleanup
dkg Jun 21, 2023
9fa615a
SED and SEIPD: type signatures for decrypt
dkg Jun 22, 2023
5cf4ca2
PGPMessage: add type signatures, make some keyword arguments explicit
dkg Jun 22, 2023
e05f026
sopgpy: rely on PGPMessage type annotations
dkg Jun 22, 2023
247c10f
PGPObject: add type signatures
dkg Jun 22, 2023
8497be3
Use Literal type for format byte for LiteralData
dkg Jun 22, 2023
dfdae47
PKESK: encrypt_sk and decrypt_sk need a proper corresponding PubKey o…
dkg Jun 22, 2023
dc9314b
More basic type annotations
dkg Jun 22, 2023
24d71d5
declare OpenPGP armor header classes as explicit literals
dkg Jun 22, 2023
17e5e75
tests: type annotation and PEP-8 cleanup
dkg Jun 22, 2023
0c816b7
Every Armorable is a PGPObject. Make that inheritance explicit.
dkg Jun 22, 2023
8aeb86f
PGPUID: add type annotations
dkg Jun 22, 2023
96c422a
SymmetricKeyAlgorithm: simplify mapping to cryptography module further
dkg Jun 22, 2023
d46439d
PGPSignature: add more type signatures
dkg Jun 23, 2023
94c3f7c
PGPUID: improve string parsing, return None when fields are missing
dkg Jun 23, 2023
e10e64f
PKESessionKeyV3: move initialization, pubkey algo, and ciphertext to …
dkg Jun 28, 2023
d9bd771
Prepare SubPackets object to have different length binary representat…
dkg Nov 16, 2022
27fbae9
PubKeyV4: more type signatures
dkg Jun 28, 2023
b5e6635
Fields: add type signatures for __bytearray__ and parse
dkg Jun 28, 2023
1c7dd79
Packet, VersionedPacket type signatures
dkg Jun 29, 2023
ca370d3
clean up type signature fixes for Packet() instantiation (MetaDispatc…
dkg Jun 29, 2023
f325c66
More type signatures
dkg Jun 29, 2023
5f470ca
Drop long/int conflation from python 2. python 3 just uses int.
dkg Jun 29, 2023
15481fb
More type-checker workarounds for MetaDispatchable
dkg Jun 29, 2023
b4f0fed
Type checker gets confused by __copy__ overloading with multiple inhe…
dkg Jun 29, 2023
6e98320
PGPKeyRing.unload: simplify, clarify
dkg Jun 29, 2023
30d6c2b
Rename PacketTag to PacketType
dkg Jun 29, 2023
8ff5062
Add SecurityIssues.AlgorithmUnknown
dkg Jun 29, 2023
4bf03a5
More type signatures
dkg Jun 29, 2023
f3e0ced
SKESK: use S2KSpecifier instead of String2Key
dkg Jun 29, 2023
2ad0f33
fields.PrivKey: learn about the version of the key
dkg Jun 30, 2023
6a288eb
String2Key: make key_version explicit
dkg Jun 30, 2023
7d08485
more type signatures
dkg Jun 30, 2023
6f19590
PrivKeyV4.pubkey: move most of implementation to base class
dkg Jun 30, 2023
43ca39c
PGPSignature: more type annotations
dkg Jun 30, 2023
cdc784f
append embedded signatures as signature packets, not subpackets
dkg Jun 30, 2023
0908d94
Keys and Fingerprints know their own version, no need to interpolate.
dkg Jun 30, 2023
fd89df7
Test and support python 3.11
dkg Jul 1, 2023
3068a0c
We no longer support Python 3.5, so we can switch to standard pytest-…
dkg Jul 1, 2023
0c2cfd1
from __future__ import annotations
dkg Jul 7, 2023
7ed5edf
Add PGPSubject
dkg Jul 7, 2023
e6fa7ef
explicitly document the ability to sign encrypted messages
dkg Jul 8, 2023
8460756
Declare SignatureVerifications.SigSubj with NamedTuple
dkg Jul 7, 2023
c39c873
type annotations for PGPKey.verify
dkg Jul 7, 2023
ffb540a
type annotations and string cleanup for SignatureVerification
dkg Jul 7, 2023
d5dad20
PGPKey: add more type annotations
dkg Jul 7, 2023
217c84e
PGPSignature: add more type signatures
dkg Jul 8, 2023
36a1390
sopgpy: correct handling for inline-signed messages
dkg Jul 8, 2023
ca2b4ac
clean up regex for cleartext signing framework
dkg Jul 8, 2023
b9b64b5
ImageEncoding: use Unknown the same way as PacketType and PubKeyAlgor…
dkg Jul 11, 2023
dcfe210
More type annotations
dkg Jul 11, 2023
98b62a7
PGPKey: Improve type signatures for unprotect, related keyblob decryp…
dkg Jul 11, 2023
e467d8e
ASCII armoring should not require the CRC line
dkg Nov 16, 2022
cc34a73
add test vectors from draft-ietf-openpgp-crypto-refresh-10
dkg Jul 11, 2023
2d53b9a
sopgpy: use default algorithms when protecting secret key material
dkg Jul 11, 2023
ee92d8d
PGPKey.new() no longer requires a key_size option.
dkg Jul 11, 2023
f799d4b
sopgpy: add a Direct Key Signature to the default key creation
dkg Jul 12, 2023
6fb08f2
sopgpy: generate-key: improve type signatures
dkg Jul 12, 2023
11d641c
Armoring: prepare to not emit CRC in some cases.
dkg Jul 12, 2023
08dd35c
Look for primary key usage flags with same search path as preferences
dkg Jul 12, 2023
35b00e8
SKESK: put common functionality (symmetric cipher, S2K specifier) int…
dkg Jul 13, 2023
18a557c
PGPKey.new: add version parameter (only supports v4 at the moment)
dkg Jul 13, 2023
4ab37e4
compare EllipticCurveOID values with "is" -- they are enums
dkg Jul 13, 2023
49c6083
PubKey.verify should raise an exception, not return one.
dkg Jul 13, 2023
77c05bb
Revise ciphertext API
dkg Jul 13, 2023
a9d7a11
Clean up NotImplemented/NotImplementedError
dkg Jul 20, 2023
7dee6b0
correct comment about MTI symmetric key algorithm
dkg Aug 10, 2023
2e883d7
PGPKey: add features property
dkg Aug 10, 2023
a57714c
sopgpy: search for cipher preferences more cleanly
dkg Aug 10, 2023
51cefc7
PGPKey.encrypt: add max_featureset option to limit version of SEIPD
dkg Aug 10, 2023
d713701
Have tox take the baseline requirements from requirements.txt
dkg Aug 18, 2023
f6cf609
note dependency on `sop` as optional
dkg Aug 18, 2023
639b72b
Parse embedded signature without assuming version
dkg Aug 23, 2023
e810446
Don't pass fingerprint version to FingerprintSubpacket
dkg Aug 23, 2023
46d9995
SubPackets.addnew: warn when trying to set a non-existent attribute
dkg Aug 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ exclude_lines =
# skip abstract methods
@(abc\.)?abstract

# Python 2.x compatibility stuff
if six.PY2:
if six.PY3:
def __nonzero__

# debug-only code
def __repr__

Expand Down
11 changes: 8 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ To install PGPy, simply:

$ pip install PGPy

Command-Line Interface
----------------------

This module will install `sopgpy`, an implementation of the `Stateless OpenPGP Command-line Interface <https://datatracker.ietf.org/doc/draft-dkg-openpgp-stateless-cli/>`_.

Documentation
-------------

Expand All @@ -52,13 +57,13 @@ Requirements

- Python >= 3.6

Tested with: 3.10, 3.9, 3.8, 3.7, 3.6
Tested with: 3.11, 3.10, 3.9, 3.8, 3.7, 3.6

- `Cryptography <https://pypi.python.org/pypi/cryptography>`_

- `pyasn1 <https://pypi.python.org/pypi/pyasn1/>`_
To use `sopgpy` you'll also need:

- `six <https://pypi.python.org/pypi/six>`_
- `sop <https://pypi.org/project/sop/>`_ >= 0.5.1

License
-------
Expand Down
99 changes: 99 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,105 @@
Changelog
*********

v0.7.0
======

(not yet released)

Dependency changes
------------------

pyasn1 is no longer needed

Now depends transitively (via the cryptography module) on OpenSSL
1.1.1 or later for Brainpool, X25519, Ed25519.

API additions
-------------

PGPSignatures represents a detached signature, which can contain more
than a single signature. It is a simple sequence of individual
PGPSignature objects.

PGPSubject is a simple type that collects all the possible things that
could be signed in OpenPGP. It is useful for type annotations.

New SecurityIssues flag: AlgorithmUnknown

API changes
-----------

Armorable.is_ascii() is deprecated. You probably want
Armorable.is_utf8() instead, since OpenPGP assumes that all text is
UTF-8.

EllipticCurveOID.Invalid was removed -- EllipticCurveOID only
enumerates supported curves now.

HashAlgorithm.hasher now returns a
cryptography.hazmat.primitives.hashes.Hash object, not a hashlib.HASH
object. The main difference between these interfaces is the use of
finalize() instead of digest().

The following properties of PGPSignature now return None if the
corresponding subpacket is not present (they used to return an empty
list or string in that case):

* cipherprefs
* compprefs
* hashprefs
* keyserver
* policy_uri
* signer
* signer_fingerprint

And the following properties of PGPSignature now return an
enum.IntFlag object instead of a set of custom FlagEnum objects. When
the corresponding subpacket is not present at all, they return None:

* key_flags
* keyserverprefs
* features

PGPKey.subkeys now returns an OrderedDict indexed by Fingerprint
instead of KeyID. When accessing this property via subscript (i.e.,
key.subkeys[x]), you can *also* index it by KeyID, but using a full
Fingerprint is recommended.

S2KSpecifier is usable wherever any String2Key object appears (i.e.,
bothSKESK and Secret Key protection). The String2Key object itself is
only for Secret Key protection, and it now contains an explicit
S2KSpecifier member, rather than containing all S2K parameters
directly.

PGPKey.protect() now no longer requires you to specify a choice of
algorithms. PGPy will make good decisions by default, and you should
not indicate specific algorithms unless you have a very clear reason
to do so.

PGPSignature.new's "signer" argument should be a Fingerprint object
(it used to accept an Key ID-length string). This is generally not
used externally anyway (most users will use e.g. PGPKey.sign to
produce a PGPSignature object).

PGPUID.signers, PGPKey.signers, and PGPMessage.signers will now return
Fingerprints, not just Key IDs.

Passing None to PGPObject.text_to_bytes or PGPObject.bytes_to_text is
now an error.

PGPUID's name, email, and comment members all return None if the field
in question doesn't exist in the User ID string, rather than returning
the empty string. User ID string parsing is also improved, to better
handle raw e-mail addresses (without angle-brackets) and other subtle
variations.

pgpy.constants.PacketTag has been renamed to PacketType. Similarly,
Header objects (both for Packet and Subpacket) use the "typeid"
property. Packet Header objects no longer expose a "tag" alias. The
term "Tag" was used ambiguously in the OpenPGP specifications, so we
avoid it.

v0.6.0
======

Expand Down
1 change: 0 additions & 1 deletion gentoo/pgpy-0.4.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND="dev-python/singledispatch[${PYTHON_USEDEP}]
dev-python/pyasn1[${PYTHON_USEDEP}]
>=dev-python/six-1.9.0[${PYTHON_USEDEP}]
>=dev-python/cryptography-1.1.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' python2_7 python3_3)"
DOCS=( README.rst )
Expand Down
2 changes: 2 additions & 0 deletions pgpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from .pgp import PGPKeyring
from .pgp import PGPMessage
from .pgp import PGPSignature
from .pgp import PGPSignatures
from .pgp import PGPUID

__all__ = ['constants',
Expand All @@ -13,4 +14,5 @@
'PGPKeyring',
'PGPMessage',
'PGPSignature',
'PGPSignatures',
'PGPUID', ]
103 changes: 0 additions & 103 deletions pgpy/_curves.py

This file was deleted.