|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.openpgp.operator.PGPKeyPairGenerator
Field Summary | |
protected java.util.Date |
creationTime
|
protected KeyFingerPrintCalculator |
fingerPrintCalculator
|
protected java.security.SecureRandom |
random
|
protected int |
version
|
Constructor Summary | |
PGPKeyPairGenerator(int version,
java.util.Date creationTime,
java.security.SecureRandom random,
KeyFingerPrintCalculator fingerPrintCalculator)
Create an instance of the key pair generator. |
Method Summary | |
abstract PGPKeyPair |
generateECDHKeyPair(org.bouncycastle.asn1.ASN1ObjectIdentifier curveOID)
Generate an elliptic curve Diffie-Hellman encryption key pair over the curve identified by the given OID. |
abstract PGPKeyPair |
generateECDSAKeyPair(org.bouncycastle.asn1.ASN1ObjectIdentifier curveOID)
Generate an elliptic curve signing key over the curve identified by the given OID. |
abstract PGPKeyPair |
generateEd25519KeyPair()
Generate an elliptic curve signing key over the twisted Edwards curve25519. |
abstract PGPKeyPair |
generateEd448KeyPair()
Generate an elliptic curve signing key over the twisted Edwards curve448. |
PGPKeyPair |
generateEncryptionSubkey()
Generate an encryption subkey. |
abstract PGPKeyPair |
generateLegacyEd25519KeyPair()
Generate a legacy elliptic curve signing key pair over the twisted Edwards curve25519. |
abstract PGPKeyPair |
generateLegacyX25519KeyPair()
Generate a legacy elliptic curve Diffie-Hellman encryption key pair over curve25519. |
PGPKeyPair |
generateNistP256ECDHKeyPair()
Generate an ECDH elliptic curve encryption key over the NIST p-256 curve. |
PGPKeyPair |
generateNistP256ECDSAKeyPair()
Generate an ECDSA elliptic curve signing key over the NIST p-256 curve. |
PGPKeyPair |
generateNistP384ECDHKeyPair()
Generate an ECDH elliptic curve encryption key over the NIST p-384 curve. |
PGPKeyPair |
generateNistP384ECDSAKeyPair()
Generate an ECDSA elliptic curve signing key over the NIST p-384 curve. |
PGPKeyPair |
generateNistP521ECDHKeyPair()
Generate an ECDH elliptic curve encryption key over the NIST p-521 curve. |
PGPKeyPair |
generateNistP521ECDSAKeyPair()
Generate an ECDSA elliptic curve signing key over the NIST p-521 curve. |
PGPKeyPair |
generatePrimaryKey()
Generate a primary key. |
abstract PGPKeyPair |
generateRsaKeyPair(java.math.BigInteger exponent,
int bitStrength)
Generate a RSA key pair with the given bit-strength over a custom exponent. |
PGPKeyPair |
generateRsaKeyPair(int bitStrength)
Generate a RSA key pair with the given bit-strength. |
PGPKeyPair |
generateSigningSubkey()
Generate a signing subkey. |
abstract PGPKeyPair |
generateX25519KeyPair()
Generate an elliptic curve Diffie-Hellman encryption key over curve25519. |
abstract PGPKeyPair |
generateX448KeyPair()
Generate an elliptic curve Diffie-Hellman encryption key over curve448. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final java.util.Date creationTime
protected final int version
protected java.security.SecureRandom random
protected final KeyFingerPrintCalculator fingerPrintCalculator
Constructor Detail |
public PGPKeyPairGenerator(int version, java.util.Date creationTime, java.security.SecureRandom random, KeyFingerPrintCalculator fingerPrintCalculator)
version
- public key version (PublicKeyPacket.VERSION_4
or PublicKeyPacket.VERSION_6
).creationTime
- key creation timerandom
- secure random number generatorMethod Detail |
public PGPKeyPair generatePrimaryKey() throws PGPException
PGPException
- if the key pair cannot be generatedpublic PGPKeyPair generateEncryptionSubkey() throws PGPException
PGPException
- if the key pair cannot be generatedpublic PGPKeyPair generateSigningSubkey() throws PGPException
PGPException
- if the key pair cannot be generatedpublic PGPKeyPair generateRsaKeyPair(int bitStrength) throws PGPException
bitStrength
- strength of the key pair in bits
PGPException
- if the key pair cannot be generatedpublic abstract PGPKeyPair generateRsaKeyPair(java.math.BigInteger exponent, int bitStrength) throws PGPException
exponent
- RSA exponent ebitStrength
- strength of the key pair in bits
PGPException
- if the key pair cannot be generatedpublic abstract PGPKeyPair generateEd25519KeyPair() throws PGPException
PublicKeyAlgorithmTags.Ed25519
which was introduced with RFC9580.
For legacy Ed25519 keys use generateLegacyEd25519KeyPair()
.
PGPException
- if the key pair cannot be generatedpublic abstract PGPKeyPair generateEd448KeyPair() throws PGPException
PublicKeyAlgorithmTags.Ed448
which was introduced with RFC9580.
PGPException
- if the key pair cannot be generatedpublic abstract PGPKeyPair generateX25519KeyPair() throws PGPException
PublicKeyAlgorithmTags.X25519
which was introduced with RFC9580.
For legacy X25519 keys use generateLegacyX25519KeyPair()
instead.
PGPException
- if the key pair cannot be generatedpublic abstract PGPKeyPair generateX448KeyPair() throws PGPException
PublicKeyAlgorithmTags.X448
which was introduced with RFC9580.
PGPException
- if the key pair cannot be generatedpublic abstract PGPKeyPair generateLegacyEd25519KeyPair() throws PGPException
PublicKeyAlgorithmTags.EDDSA_LEGACY
as algorithm ID.
For OpenPGP v6 (RFC9580) use generateEd25519KeyPair()
instead.
PGPException
- if the key pair cannot be generatedpublic abstract PGPKeyPair generateLegacyX25519KeyPair() throws PGPException
PublicKeyAlgorithmTags.ECDH
as algorithm ID.
For OpenPGP v6 (RFC9580) use generateX25519KeyPair()
instead.
PGPException
- if the key pair cannot be generatedpublic PGPKeyPair generateNistP256ECDHKeyPair() throws PGPException
PGPException
- if the key pair cannot be generatedpublic PGPKeyPair generateNistP384ECDHKeyPair() throws PGPException
PGPException
- if the key pair cannot be generatedpublic PGPKeyPair generateNistP521ECDHKeyPair() throws PGPException
PGPException
- if the key pair cannot be generatedpublic PGPKeyPair generateNistP256ECDSAKeyPair() throws PGPException
PGPException
- if the key pair cannot be generatedpublic PGPKeyPair generateNistP384ECDSAKeyPair() throws PGPException
PGPException
- if the key pair cannot be generatedpublic PGPKeyPair generateNistP521ECDSAKeyPair() throws PGPException
PGPException
- if the key pair cannot be generatedpublic abstract PGPKeyPair generateECDHKeyPair(org.bouncycastle.asn1.ASN1ObjectIdentifier curveOID) throws PGPException
curveOID
- OID of the elliptic curve
PGPException
- if the key pair cannot be generatedpublic abstract PGPKeyPair generateECDSAKeyPair(org.bouncycastle.asn1.ASN1ObjectIdentifier curveOID) throws PGPException
curveOID
- OID of the elliptic curve
PGPException
- if the key pair cannot be generated
|
Bouncy Castle Cryptography Library 1.81 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |