public abstract class AbstractPublicKeyDataDecryptorFactory extends java.lang.Object implements PublicKeyDataDecryptorFactory
| Constructor and Description |
|---|
AbstractPublicKeyDataDecryptorFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
checkRange(int pLen,
byte[] enc) |
protected boolean |
containsSKAlg(int pkeskVersion) |
protected static byte[][] |
parseECDHEncSessionKey(byte[] enc)
Parse the encrypted-session-key field of an ECDH (RFC 6637) PKESK packet into the sender's
MPI-encoded ephemeral point and the wrapped session key, applying all length checks.
|
protected static byte[][] |
parseXDHEncSessionKey(byte[] enc,
int pLen,
boolean containsSKAlg)
Parse the algorithm-specific encrypted-session-key field of an X25519 or X448 PKESK packet
into the sender's ephemeral public key and the wrapped session key, applying all length
checks.
|
protected byte[] |
prependSKAlgorithmToSessionData(PublicKeyEncSessionPacket pkesk,
InputStreamPacket encData,
byte[] decryptedSessionData) |
byte[] |
recoverSessionData(int keyAlgorithm,
byte[][] secKeyData)
Recover the plain session info by decrypting the encrypted session key.
|
byte[] |
recoverSessionData(PublicKeyEncSessionPacket pkesk,
InputStreamPacket encData)
Recover the plain session info by decrypting the encrypted session key.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrecoverSessionDatacreateDataDecryptor, createDataDecryptor, createDataDecryptorpublic AbstractPublicKeyDataDecryptorFactory()
public final byte[] recoverSessionData(PublicKeyEncSessionPacket pkesk, InputStreamPacket encData) throws PGPException
PublicKeyDataDecryptorFactory[sym-alg][session-key][checksum]?
recoverSessionData in interface PublicKeyDataDecryptorFactorypkesk - public-key encrypted session-key packetencData - encrypted data (sed/seipd/oed) packetPGPExceptionpublic byte[] recoverSessionData(int keyAlgorithm,
byte[][] secKeyData)
throws PGPException
PublicKeyDataDecryptorFactory[sym-alg]?[session-key][checksum]?
recoverSessionData in interface PublicKeyDataDecryptorFactorykeyAlgorithm - public key algorithmsecKeyData - encrypted session key dataPGPExceptionprotected byte[] prependSKAlgorithmToSessionData(PublicKeyEncSessionPacket pkesk, InputStreamPacket encData, byte[] decryptedSessionData) throws PGPException
PGPExceptionprotected boolean containsSKAlg(int pkeskVersion)
protected static void checkRange(int pLen,
byte[] enc)
throws PGPException
PGPExceptionprotected static byte[][] parseXDHEncSessionKey(byte[] enc,
int pLen,
boolean containsSKAlg)
throws PGPException
enc - the PKESK's encrypted session key datapLen - length in octets of the ephemeral public key (32 for X25519, 56 for X448)containsSKAlg - whether the packet version carries the symmetric-key algorithm octet (v3)PGPException - if the data is shorter than its declared lengths requireprotected static byte[][] parseECDHEncSessionKey(byte[] enc)
throws PGPException
enc - the PKESK's encrypted session key dataPGPException - if the data is shorter than its declared lengths require