Top Constructors Methods
org.bouncycastle.openpgp

pack-priv Class AEADUtil

extends Object
Class Inheritance
Imports
org.bouncycastle.bcpg.AEADUtils, .SymmetricKeyUtils, org.bouncycastle.crypto.digests.SHA256Digest, org.bouncycastle.crypto.generators.HKDFBytesGenerator, org.bouncycastle.crypto.params.HKDFParameters

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static byte[]

Returns:

message key and appended IV
deriveMessageKeyAndIv
(int
AEAD algorithm
aeadAlgo
,
int
symmetric cipher algorithm
cipherAlgo
,
byte[]
session key
sessionKey
,
byte[]
salt
salt
,
byte[]
HKDF info
hkdfInfo
)

Derive a message key and IV from the given session key.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AEADUtilback to summary
pack-priv AEADUtil()

Method Detail

deriveMessageKeyAndIvback to summary
pack-priv static byte[] deriveMessageKeyAndIv(int aeadAlgo, int cipherAlgo, byte[] sessionKey, byte[] salt, byte[] hkdfInfo)

Derive a message key and IV from the given session key. The result is a byte array containing the key bytes followed by the IV. To split them, use org.bouncycastle.bcpg.AEADUtils#splitMessageKeyAndIv(byte[], int, int).

Parameters
aeadAlgo:int

AEAD algorithm

cipherAlgo:int

symmetric cipher algorithm

sessionKey:byte[]

session key

salt:byte[]

salt

hkdfInfo:byte[]

HKDF info

Returns:byte[]

message key and appended IV