Top Description Constructors Methods
org.bouncycastle.openpgp.operator.bc

public Class BcAEADSecretKeyEncryptorFactory

extends Object
implements PBESecretKeyEncryptorFactory
Class Inheritance
All Implemented Interfaces
org.bouncycastle.openpgp.operator.PBESecretKeyEncryptorFactory
Imports
org.bouncycastle.bcpg.AEADAlgorithmTags, .PublicKeyPacket, .S2K, .SymmetricKeyAlgorithmTags, org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor, .PBESecretKeyEncryptorFactory

Return a factory for PBESecretKeyEncryptor instances which protect the secret key material by deriving a key-encryption-key using org.bouncycastle.bcpg.S2K#ARGON_2 S2K and apply that key using org.bouncycastle.bcpg.SecretKeyPacket#USAGE_AEAD.

This particular factory uses OCB + AES256 for secret key protection and requires 64MiB of RAM for the Argon2 key derivation (see S2K.Argon2Params#memoryConstrainedParameters()).

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PBESecretKeyEncryptor
build(char[]
passphrase
passphrase
,
PublicKeyPacket
public-key packet of the key to protect (needed for AEAD)
pubKeyPacket
)

Implements org.bouncycastle.openpgp.operator.PBESecretKeyEncryptorFactory.build.

Build a new PBESecretKeyEncryptor instance from the given passphrase and public key packet.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BcAEADSecretKeyEncryptorFactoryback to summary
public BcAEADSecretKeyEncryptorFactory()

Method Detail

buildback to summary
public PBESecretKeyEncryptor build(char[] passphrase, PublicKeyPacket pubKeyPacket)

Implements org.bouncycastle.openpgp.operator.PBESecretKeyEncryptorFactory.build.

Doc from org.bouncycastle.openpgp.operator.PBESecretKeyEncryptorFactory.build.

Build a new PBESecretKeyEncryptor instance from the given passphrase and public key packet.

Parameters
passphrase:char[]

passphrase

pubKeyPacket:PublicKeyPacket

public-key packet of the key to protect (needed for AEAD)

Returns:PBESecretKeyEncryptor

key encryptor

Annotations
@Override