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

High Level OpenPGP v6 Key Generation #1857

Closed
wants to merge 53 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
3e6ba0a
Rename masterKey -> primaryKey
vanitasvitae Oct 2, 2024
4a024c9
Javadoc
vanitasvitae Oct 2, 2024
22af7ed
Generics
vanitasvitae Oct 2, 2024
369af90
Use proper constructor for PGPSignatureGenerator
vanitasvitae Oct 2, 2024
88dc4c0
Final members
vanitasvitae Oct 2, 2024
b41abfb
Document PGPException
vanitasvitae Oct 2, 2024
35b435c
Remove unnecessary toArray() optimization
vanitasvitae Oct 2, 2024
c0a8ee6
Add test for PGPKeyRingGenerator
vanitasvitae Oct 2, 2024
8bbae05
Document legacy curve OIDs
vanitasvitae Oct 2, 2024
1c429db
Sanitize key algorithm/version matchups
vanitasvitae Oct 2, 2024
6374ed9
Add PGPKeyPairGenerator class + tests
vanitasvitae Oct 2, 2024
2dcb6e7
Generics for PGPSignatureSubpacketGenerator list
vanitasvitae Oct 3, 2024
5b4f655
Add removePacketsOfType() method
vanitasvitae Oct 3, 2024
84af3bf
Add PublicKeyUtils
vanitasvitae Oct 3, 2024
b943759
Implement high-level OpenPGPV6KeyGenerator class
vanitasvitae Oct 3, 2024
18beb4c
Organize subpackets
vanitasvitae Oct 7, 2024
9974aa0
Add overrides for setters with default subpacket criticality
vanitasvitae Oct 7, 2024
a66753c
Add PGPSecretKeyRing.toCertificate()
vanitasvitae Oct 7, 2024
49cefc9
Remove methods for adding deprecated UserAttributes
vanitasvitae Oct 7, 2024
0de7f21
Introduce BC implementation of OpenPGPV6KeyGenerator
vanitasvitae Oct 7, 2024
8473d7b
Add BcOpenPGPV6KeyGeneratorTest to RegressionTests
vanitasvitae Oct 7, 2024
b4c91c4
Javadoc, Checkstyle
vanitasvitae Oct 7, 2024
8b2eded
AEAD secret key encryption
vanitasvitae Oct 8, 2024
88f8122
Document PGPSecretKey.getS2KUsage()
vanitasvitae Oct 11, 2024
ea34c8c
Further progress with the new KeyGenerator API
vanitasvitae Oct 11, 2024
8426117
Checkstyle
vanitasvitae Oct 11, 2024
5890b45
Permutate provider argument in JcaOpenPGPV6KeyGenerator
vanitasvitae Oct 11, 2024
eab51e5
Javadoc and more testing
vanitasvitae Oct 11, 2024
027a3e6
Add more javadoc to OpenPGPV6KeyGenerator
vanitasvitae Oct 11, 2024
58abd33
Rename APIProvider, add base tests
vanitasvitae Oct 14, 2024
dcf6202
Javadoc
vanitasvitae Oct 15, 2024
340a86b
Refactore PGPSignatureSubpacketGenerator
vanitasvitae Oct 15, 2024
c233c42
Refactore PGPSignatureSubpacketVector
vanitasvitae Oct 15, 2024
69c3a49
Add documentation about allowed S2K specifier + usages to PBESecretKe…
vanitasvitae Oct 17, 2024
062ebbb
Rename creationTime to keyCreationTime for clarity
vanitasvitae Oct 17, 2024
541b80d
Use default callback for encryption subkey subpackets
vanitasvitae Oct 17, 2024
bc9c82a
Add ed25519x25519Key(), ed448x448Key() factory methods
vanitasvitae Oct 17, 2024
5aa07f6
Fix tests
vanitasvitae Oct 17, 2024
b86c2b9
Fix subkey encryption
vanitasvitae Oct 18, 2024
8ea7c28
Add javadoc to PGPKeyPairGenerator
vanitasvitae Oct 21, 2024
b75877b
Remove unused imports
vanitasvitae Oct 21, 2024
14fc008
Remove unused AEADSecretKeyEncryptorBuilderProvider class
vanitasvitae Oct 21, 2024
584fc6b
More javadoc
vanitasvitae Oct 21, 2024
20d0aa1
Fix key packet type enforcing and add test
vanitasvitae Oct 21, 2024
bcd59fd
PGPKeyPairGenerator: convert subkeys
vanitasvitae Oct 21, 2024
314aaa3
Add api classpaths to jdk-9 module-info
vanitasvitae Oct 28, 2024
06f663f
Add info about primary-key backsig to OpenPGPV6KeyGenerator javadoc
vanitasvitae Oct 28, 2024
deeb22d
Add test for reencryption using AEAD
vanitasvitae Oct 25, 2024
6f5af44
PGPSecretKey.copyWithNewPassword: Fix S2KUsage if newKeyEncryptor is …
vanitasvitae Oct 25, 2024
8059076
Add more tests
vanitasvitae Nov 12, 2024
88936f2
Relax Argon2 parameters to be more memory friendly
vanitasvitae Nov 12, 2024
3620a94
Make PBESecretKeyEncryptorFactory an Interface
vanitasvitae Nov 27, 2024
72d6228
Implement AEADProtectedPGPSecretKeyTest.reencryptKeyJca()
vanitasvitae Nov 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Javadoc
vanitasvitae committed Nov 28, 2024
commit dcf6202f91a6640c0711969c6de484d1c58c0d85
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
package org.bouncycastle.openpgp.api;

import org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator;
import org.bouncycastle.openpgp.PGPSignatureSubpacketVector;

/**
* Callback to modify the contents of a {@link PGPSignatureSubpacketGenerator}.
* The {@link OpenPGPV6KeyGenerator} already prepopulates the hashed subpacket areas of signatures during
* key generation. This callback is useful to apply custom changes to the hashed subpacket area during the
* generation process.
*/
@FunctionalInterface
public interface SignatureSubpacketsFunction
{
/**
* Apply some changes to the given {@link PGPSignatureSubpacketGenerator} and return the result.
* It is also possible to replace the whole {@link PGPSignatureSubpacketGenerator} by returning another instance.
* Tipp: In order to replace a subpacket, make sure to prevent duplicates by first removing subpackets
* of the same type using {@link PGPSignatureSubpacketGenerator#removePacketsOfType(int)}.
* To inspect the current contents of the generator, it is best to call
* {@link PGPSignatureSubpacketGenerator#generate()} and in turn inspect its contents using
* {@link PGPSignatureSubpacketVector#toArray()}.
*
* @param subpackets original subpackets
* @return modified subpackets
* @return non-null modified subpackets
*/
PGPSignatureSubpacketGenerator apply(PGPSignatureSubpacketGenerator subpackets);
}