Top Constructors Methods
org.bouncycastle.openpgp.operator

public abstract Class AbstractPublicKeyDataDecryptorFactory

extends Object
implements PublicKeyDataDecryptorFactory
Class Inheritance
All Implemented Interfaces
org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory, org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory
Known Direct Subclasses
org.bouncycastle.openpgp.operator.bc.BcPublicKeyDataDecryptorFactory
Imports
org.bouncycastle.bcpg.InputStreamPacket, .PublicKeyAlgorithmTags, .PublicKeyEncSessionPacket, .SymmetricEncIntegrityPacket, .X25519PublicBCPGKey, .X448PublicBCPGKey, org.bouncycastle.openpgp.PGPException, org.bouncycastle.util.Arrays

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected static void
checkRange(int pLen, byte[] enc)

protected boolean
containsSKAlg(int pkeskVersion)

protected byte[]
public final byte[]
recoverSessionData(PublicKeyEncSessionPacket
public-key encrypted session-key packet
pkesk
,
InputStreamPacket
encrypted data (sed/seipd/oed) packet
encData
)

Implements org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory.recoverSessionData.

Recover the plain session info by decrypting the encrypted session key.

public byte[]
recoverSessionData(int
public key algorithm
keyAlgorithm
,
byte[][]
encrypted session key data
secKeyData
)

Implements org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory.recoverSessionData.

Recover the plain session info by decrypting the encrypted session key.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractPublicKeyDataDecryptorFactoryback to summary
public AbstractPublicKeyDataDecryptorFactory()

Method Detail

checkRangeback to summary
protected static void checkRange(int pLen, byte[] enc) throws PGPException
containsSKAlgback to summary
protected boolean containsSKAlg(int pkeskVersion)
prependSKAlgorithmToSessionDataback to summary
protected byte[] prependSKAlgorithmToSessionData(PublicKeyEncSessionPacket pkesk, InputStreamPacket encData, byte[] decryptedSessionData) throws PGPException
recoverSessionDataback to summary
public final byte[] recoverSessionData(PublicKeyEncSessionPacket pkesk, InputStreamPacket encData) throws PGPException

Implements org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory.recoverSessionData.

Doc from org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory.recoverSessionData.

Recover the plain session info by decrypting the encrypted session key. The session info ALWAYS has the symmetric algorithm ID prefixed, so the return value is:

[sym-alg][session-key][checksum]?
Parameters
pkesk:PublicKeyEncSessionPacket

public-key encrypted session-key packet

encData:InputStreamPacket

encrypted data (sed/seipd/oed) packet

Returns:byte[]

decrypted session info

Annotations
@Override
recoverSessionDataback to summary
public byte[] recoverSessionData(int keyAlgorithm, byte[][] secKeyData) throws PGPException

Implements org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory.recoverSessionData.

Doc from org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory.recoverSessionData.

Recover the plain session info by decrypting the encrypted session key. This method returns the decrypted session info as-is (without prefixing missing cipher algorithm), so the return value is:

[sym-alg]?[session-key][checksum]?
Parameters
keyAlgorithm:int

public key algorithm

secKeyData:byte[][]

encrypted session key data

Returns:byte[]

decrypted session info

Annotations
@Override