1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-18 01:24:50 +02:00
Commit graph

59 commits

Author SHA1 Message Date
Paul Schaub ce7b69269b
Various code cleanup 2021-12-28 13:32:50 +01:00
Paul Schaub 8b1bdb98f1
Adding subkeys, generating keys: Verify subkeys comply to public key algorithm policy 2021-12-02 14:18:21 +01:00
Paul Schaub 4b2089b42b Fix key ring builder adding additional user-ids as primary 2021-11-21 23:07:00 +01:00
Paul Schaub 6a137698c4
Wip: Add test for signature structure, set fingerprint on primary user-id self sig 2021-11-20 21:12:12 +01:00
Paul Schaub 176574df50
Wip 2021-11-20 16:07:27 +01:00
Paul Schaub a6181218a2 Convert KeyRingBuilder fields to local variables 2021-11-16 13:45:35 +01:00
Paul Schaub 3d5a005ec7 Make SignatureSubpackets more procedural 2021-11-16 13:45:35 +01:00
Paul Schaub 3f09fa0cc7 Progress 2021-11-16 13:45:34 +01:00
Paul Schaub 04ada88188 Fix errors 2021-11-16 13:44:10 +01:00
Paul Schaub 2ac10e7bc7
Rename method to set'Key'ExpirationDateInSubpacketGenerator() 2021-11-06 17:39:04 +01:00
Paul Schaub 03a350d279
Separate key generation from scratch and from templates in to buildKeyRing() and generateKeyRing() 2021-11-02 12:23:05 +01:00
Paul Schaub e390389c0a Reuse compliance 2021-10-07 16:28:31 +02:00
Paul Schaub be47a96030
Further simplify the KeyRingBuilder API 2021-09-20 12:30:03 +02:00
Paul Schaub 21f424551b Simplify KeySpecBuilder 2021-09-13 19:46:18 +02:00
Paul Schaub 9ac0ee4043 Avoid hiding member with local variable 2021-08-15 15:46:41 +02:00
Paul Schaub 27370fa925
Bump Bouncycastle to 1.69 2021-06-10 12:41:12 +02:00
Paul Schaub 8618d1faea
More tests 2021-05-31 13:59:56 +02:00
Paul Schaub 03fb81a77e
Create separate symmetric key algorithm policies for encryption/decryption 2021-05-15 20:43:56 +02:00
Paul Schaub 5a56949dd7
Throw WrongPassphraseException when wrong passphrase is provided to unlock secret key 2021-05-14 13:18:34 +02:00
Paul Schaub 32e1b0c838
KeyRingBuilder: Do not info-log exception when generated key has wrong length 2021-05-12 12:56:07 +02:00
Paul Schaub 64cc9ecca4 Proper Signature Verification 2021-04-30 09:49:19 +02:00
Paul Schaub bfbb2ba31b
Fix checkstyle error 2021-03-05 12:32:21 +01:00
Paul Schaub d5ac1301e0
Add primary key binding sigs to signing subkeys 2021-03-04 16:33:46 +01:00
Paul Schaub ce5f8990ef
Add HashAlgorithmPolicy and SymmetricKeyAlgorithmPolicy 2021-02-19 19:51:44 +01:00
Paul Schaub d2202dcb0f
Retry key generation on invalid private key encoding length
Workaround for #70
2021-02-15 23:37:03 +01:00
Paul Schaub f2f7305fec
Allow for setting of expiration date during key generation 2021-02-13 12:22:28 +01:00
Paul Schaub 651bb63175
Deprecate withMasterKey(spec) in favor of withPrimaryKey(spec) 2021-02-11 17:18:59 +01:00
Paul Schaub 10de44ebd3
Add modern key ring archetype 2021-02-11 17:10:22 +01:00
Paul Schaub fbb4061164
Switch simpleEcKeyRing over to curve25519 2021-02-11 17:10:00 +01:00
Paul Schaub 4ddbca4908
Expose keySpec.getSubpacketGenerator() and move setPrimaryUserId to builder 2021-01-29 14:51:24 +01:00
Paul Schaub 4e7c1c023c
Make fields final where possible 2021-01-29 14:48:02 +01:00
Paul Schaub 59a14c2918
Make ImplementationFactory methods abstract 2021-01-23 01:09:55 +01:00
Paul Schaub 7864add645
Introduce Policy class for default algorithms 2021-01-22 16:50:08 +01:00
Paul Schaub 2378162953
Remove withDefaultKeyFlags method 2021-01-03 16:26:53 +01:00
Paul Schaub 1c1f9d49ab
Introduce ImplementationFactory 2020-12-27 01:56:18 +01:00
Paul Schaub aff2e6b9f0
Verify that certification key has signing capable algorithm 2020-12-11 22:09:21 +01:00
Paul Schaub ac08827f91
Move ECDSA and ECDH to ecc subpackage 2020-12-11 18:16:31 +01:00
Paul Schaub 3c88bdde9b
Refactor keytype related classes 2020-12-08 20:02:41 +01:00
Paul Schaub 980782e629
Remove deprecated class PGPKeyRing 2020-12-08 19:14:52 +01:00
Paul Schaub db2e97b449
Fix some javadoc issues 2020-12-05 00:17:32 +01:00
Paul Schaub 4ed2cdaed9
Introduce UserId utility class 2020-11-13 15:59:28 +01:00
Paul Schaub b4967db1a2
Implement adding subkeys to keyrings 2020-11-10 17:25:35 +01:00
Paul Schaub 99a2fcf1c0
Simplify KeyType API 2020-11-07 18:24:12 +01:00
Wiktor Kwapisiewicz 59fe53c594
Fix creating keys with Passphrase.emptyPassphrase()
Previously the code supplied `null` to BouncyCastle's
encryptor/decryptor builder's build method and that caused
NullPointerException to be thrown.

The fix checks if the passphrase is empty and omits the BouncyCastle
builder in that case.

Fixes #16.
2020-10-30 12:22:05 +01:00
Wiktor Kwapisiewicz e30d0f6293
Remove RSA_SIGN and RSA_ENCRYPT as they are deprecated
This change removes two mechanisms that are deprecated in RFC 4880. The
spec explicitly mentions that "RSA Encrypt-Only (2) and RSA Sign-Only
are deprecated and SHOULD NOT be generated" [0].

The remaining RSA_GENERAL key type was renamed to just RSA for ease of
use for developers.

[0]: https://tools.ietf.org/html/rfc4880#section-9.1
2020-10-30 11:48:28 +01:00
Paul Schaub f21231ad53
Trim user-ids 2020-10-20 23:23:25 +02:00
Paul Schaub c06bedd656
Introduce SignatureType enum 2020-10-20 22:59:06 +02:00
Paul Schaub 1b389f678a
Fix checkstyle issues 2020-10-20 22:58:45 +02:00
Paul Schaub 9670e5ecb9
Prevent additional user-id from being equal to primary user-id 2020-10-20 22:14:56 +02:00
Paul Schaub 11e7bc69fc
Fix NPE by initializing the SignatureGenerator 2020-10-16 13:11:46 +02:00