Commit Graph

15 Commits

Author SHA1 Message Date
Paul Schaub 21f424551b Simplify KeySpecBuilder 2021-09-13 19:46:18 +02:00
Paul Schaub e5ae09b79c
Change default compression algorithm from UNCOMPRESSED to ZIP 2021-09-06 15:13:41 +02:00
Paul Schaub 54a4625fed fix comments and javadoc 2021-08-15 15:46:41 +02:00
Paul Schaub c11f334fa4 Policy: Use EnumMap for improved performance 2021-08-15 15:46:41 +02:00
Paul Schaub 9b046a0cf1
Change SymmetricEncryptionAlgorithmNegotiator to return the 'best' avail. alg 2021-07-01 21:33:38 +02:00
Paul Schaub e8311f0cc5 Add link to keylength.com 2021-06-26 18:33:41 +02:00
Paul Schaub 5bb4fd3687
Add PublicKeyAlgorithmPolicy to reject weak public keys
BCs PGPPublicKey.getBitStrenght() appears to fail to recognize some elliptic curves.
In such cases, bitStrength is reported as -1.
I added BCUtil.getBitStrength(publicKey) to manually determine the bit strenght by OID.
See https://github.com/bcgit/bc-java/issues/972 for an upstream bug report.
2021-06-11 16:20:29 +02:00
Paul Schaub ed8584df95
Add policy tests 2021-06-10 15:41:44 +02:00
Paul Schaub 89a0adddd8 Reworking encryption/decryption API. 2021-05-25 14:23:42 +02:00
Paul Schaub 197cfab0d6
Respect symmetric algorithm policy during decryption and throw UnacceptableAlgorithmException if policy is violated 2021-05-17 13:47:46 +02:00
Paul Schaub 03fb81a77e
Create separate symmetric key algorithm policies for encryption/decryption 2021-05-15 20:43:56 +02:00
Paul Schaub 3be7f12887
Remove SignatureValidationDateProvider 2021-05-15 20:30:21 +02:00
Paul Schaub 11b67ea6d2
Add documentation to Policy 2021-05-15 20:27:43 +02:00
Paul Schaub 64cc9ecca4 Proper Signature Verification 2021-04-30 09:49:19 +02:00
Paul Schaub ce5f8990ef
Add HashAlgorithmPolicy and SymmetricKeyAlgorithmPolicy 2021-02-19 19:51:44 +01:00