Paul Schaub
be47a96030
Further simplify the KeyRingBuilder API
2021-09-20 12:30:03 +02:00
Paul Schaub
387b2b4b43
Ensure that KeySpecBuilder gets at least one key flag
2021-09-20 11:26:00 +02:00
Paul Schaub
11ad6361f8
Reformat arguments
2021-09-13 19:46:18 +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
548bfff93f
Fix: Respect user requested keyflags when adding a subkey.
2021-06-24 14:11:18 +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
ccdcd49c58
Remove deprecated method withMasterKey from KeyRingBuilderInterface
2021-05-30 18:05:09 +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
99be722875
Do not spaghetti
2021-05-03 14:11:59 +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
79b2d42f9c
Add support for more elliptic curves and start implementing KeyInfo class
2021-02-11 16:58: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
bilalashraf123
560effc7c6
Wrong primary user ID when setting withAdditionalUserId
2021-01-29 02:33:43 +05: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
f5338e13e7
Get rid of ElGamal_GENERAL and rename ElGamal_ENCRYPT to ElGamal
2021-01-03 17:06:38 +01:00
Paul Schaub
5143da1311
Verify that keys can carry certain key flags
2021-01-03 17:01: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
5a04669661
Add missing package.info
2020-12-11 22:54:11 +01:00
Paul Schaub
d65646efc6
Add XDH keytype factory method
2020-12-11 22:09:49 +01:00
Paul Schaub
aff2e6b9f0
Verify that certification key has signing capable algorithm
2020-12-11 22:09:21 +01:00
Paul Schaub
c38477f277
Add more javadoc
2020-12-11 18:53:10 +01:00
Paul Schaub
ac08827f91
Move ECDSA and ECDH to ecc subpackage
2020-12-11 18:16:31 +01:00
Paul Schaub
5f289f4fe1
ElGamal: Deprecate GENERAL
2020-12-11 18:14:36 +01:00
Paul Schaub
3c88bdde9b
Refactor keytype related classes
2020-12-08 20:02:41 +01:00
Paul Schaub
4550425609
Wip: Add more elliptic curves, support for {X,Ed}25519
2020-12-08 19:26:57 +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