Top Description Inners Fields Constructors Methods
org.bouncycastle.jcajce

public Class BCFKSLoadStoreParameter

extends BCLoadStoreParameter
Class Inheritance
Imports
java.io.InputStream, .OutputStream, java.security.Key, .KeyStore, .PrivateKey, .PublicKey, java.security.cert.X509Certificate, org.bouncycastle.crypto.util.PBKDF2Config, .PBKDFConfig

LoadStoreParameter to allow configuring of the PBKDF used to generate encryption keys for use in the keystore.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static interface
public static enum
public static enum
public static enum

Field Summary

Modifier and TypeField and Description
private final X509Certificate[]
private final BCFKSLoadStoreParameter.EncryptionAlgorithm
private final BCFKSLoadStoreParameter.MacAlgorithm
private final BCFKSLoadStoreParameter.SignatureAlgorithm
private final Key
private final PBKDFConfig
private final BCFKSLoadStoreParameter.CertChainValidator

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public BCFKSLoadStoreParameter.CertChainValidator
public X509Certificate[]
public BCFKSLoadStoreParameter.EncryptionAlgorithm

Returns:

the encryption algorithm to use.
getStoreEncryptionAlgorithm
()

Return encryption algorithm used to secure the store and its entries.

public BCFKSLoadStoreParameter.MacAlgorithm

Returns:

the mac algorithm to use.
getStoreMacAlgorithm
()

Return mac algorithm used to protect the integrity of the store and its contents.

public PBKDFConfig

Returns:

the PBKDF to use for deriving HMAC and store encryption keys.
getStorePBKDFConfig
()

Return the PBKDF used for generating the HMAC and store encryption keys.

public BCFKSLoadStoreParameter.SignatureAlgorithm

Returns:

the signature algorithm to use.
getStoreSignatureAlgorithm
()

Return signature algorithm used to protect the integrity of the store and its contents.

public Key
Inherited from org.bouncycastle.jcajce.BCLoadStoreParameter:
getInputStreamgetOutputStreamgetProtectionParameter

Field Detail

certificatesback to summary
private final X509Certificate[] certificates
encAlgback to summary
private final BCFKSLoadStoreParameter.EncryptionAlgorithm encAlg
macAlgback to summary
private final BCFKSLoadStoreParameter.MacAlgorithm macAlg
sigAlgback to summary
private final BCFKSLoadStoreParameter.SignatureAlgorithm sigAlg
sigKeyback to summary
private final Key sigKey
storeConfigback to summary
private final PBKDFConfig storeConfig
validatorback to summary
private final BCFKSLoadStoreParameter.CertChainValidator validator

Constructor Detail

BCFKSLoadStoreParameterback to summary
private BCFKSLoadStoreParameter(BCFKSLoadStoreParameter.Builder bldr)

Method Detail

getCertChainValidatorback to summary
public BCFKSLoadStoreParameter.CertChainValidator getCertChainValidator()
getStoreCertificatesback to summary
public X509Certificate[] getStoreCertificates()
getStoreEncryptionAlgorithmback to summary
public BCFKSLoadStoreParameter.EncryptionAlgorithm getStoreEncryptionAlgorithm()

Return encryption algorithm used to secure the store and its entries.

Returns:BCFKSLoadStoreParameter.EncryptionAlgorithm

the encryption algorithm to use.

getStoreMacAlgorithmback to summary
public BCFKSLoadStoreParameter.MacAlgorithm getStoreMacAlgorithm()

Return mac algorithm used to protect the integrity of the store and its contents.

Returns:BCFKSLoadStoreParameter.MacAlgorithm

the mac algorithm to use.

getStorePBKDFConfigback to summary
public PBKDFConfig getStorePBKDFConfig()

Return the PBKDF used for generating the HMAC and store encryption keys.

Returns:PBKDFConfig

the PBKDF to use for deriving HMAC and store encryption keys.

getStoreSignatureAlgorithmback to summary
public BCFKSLoadStoreParameter.SignatureAlgorithm getStoreSignatureAlgorithm()

Return signature algorithm used to protect the integrity of the store and its contents.

Returns:BCFKSLoadStoreParameter.SignatureAlgorithm

the signature algorithm to use.

getStoreSignatureKeyback to summary
public Key getStoreSignatureKey()
org.bouncycastle.jcajce back to summary

public Class BCFKSLoadStoreParameter.Builder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private X509Certificate[]
private BCFKSLoadStoreParameter.EncryptionAlgorithm
private final InputStream
private BCFKSLoadStoreParameter.MacAlgorithm
private final OutputStream
private final KeyStore.ProtectionParameter
private BCFKSLoadStoreParameter.SignatureAlgorithm
private final Key
private PBKDFConfig
private BCFKSLoadStoreParameter.CertChainValidator

Constructor Summary

AccessConstructor and Description
public
Builder()

Base constructor for creating a LoadStoreParameter for initializing a key store.

public
Builder(OutputStream
OutputStream to write KeyStore to.
out
,
char[]
the password to use to protect the KeyStore.
password
)

Base constructor for storing to an OutputStream using a password.

public
Builder(OutputStream
OutputStream to write KeyStore to.
out
,
KeyStore.ProtectionParameter
the protection parameter to use to protect the KeyStore.
protectionParameter
)

Base constructor for storing to an OutputStream using a protection parameter.

public
Builder(OutputStream
OutputStream to write KeyStore to.
out
,
PrivateKey
the key used to protect the integrity of the key store.
sigKey
)

Base constructor for storing to an OutputStream using a protection parameter.

public
Builder(InputStream
InputStream to load KeyStore to.
in
,
PublicKey
the public key parameter to used to verify the KeyStore.
sigKey
)

Base constructor for reading a KeyStore from an InputStream using a public key for validation.

public
Builder(InputStream
InputStream to load KeyStore to.
in
,
BCFKSLoadStoreParameter.CertChainValidator
the certificate chain validator to check the signing certificates.
validator
)

Base constructor for reading a KeyStore from an InputStream using validation based on encapsulated certificates in the KeyStore data.

public
Builder(InputStream
InputStream to read the KeyStore from.
in
,
char[]
the password used to protect the KeyStore.
password
)

Base constructor for reading a KeyStore from an InputStream using a password.

public
Builder(InputStream
InputStream to read the KeyStore from.
in
,
KeyStore.ProtectionParameter
the protection parameter used to protect the KeyStore.
protectionParameter
)

Base constructor for reading a KeyStore from an InputStream using a password.

Method Summary

Modifier and TypeMethod and Description
public BCFKSLoadStoreParameter

Returns:

a new BCFKSLoadStoreParameter.
build
()

Build and return a BCFKSLoadStoreParameter.

public BCFKSLoadStoreParameter.Builder

Returns:

the current Builder instance.
withCertificates
(X509Certificate[]
an array of X509 certificates.
certs
)

Add a valid certificate chain where certs[0] is the end-entity matching the private key we are using to sign the key store.

public BCFKSLoadStoreParameter.Builder

Returns:

the current Builder instance.
withStoreEncryptionAlgorithm
(BCFKSLoadStoreParameter.EncryptionAlgorithm
the PBKDF config to use for protecting the KeyStore and its keys.
encAlg
)

Configure the encryption algorithm to use for protecting the KeyStore and its keys.

public BCFKSLoadStoreParameter.Builder

Returns:

the current Builder instance.
withStoreMacAlgorithm
(BCFKSLoadStoreParameter.MacAlgorithm
the PBKDF config to use for protecting the KeyStore.
macAlg
)

Configure the MAC algorithm to use for protecting the KeyStore.

public BCFKSLoadStoreParameter.Builder

Returns:

the current Builder instance.
withStorePBKDFConfig
(PBKDFConfig
the PBKDF config to use for protecting the KeyStore.
storeConfig
)

Configure the PBKDF to use for protecting the KeyStore.

public BCFKSLoadStoreParameter.Builder

Returns:

the current Builder instance.
withStoreSignatureAlgorithm
(BCFKSLoadStoreParameter.SignatureAlgorithm
the signature config to use for protecting the KeyStore.
sigAlg
)

Configure the signature algorithm to use for protecting the KeyStore.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certsback to summary
private X509Certificate[] certs
encAlgback to summary
private BCFKSLoadStoreParameter.EncryptionAlgorithm encAlg
inback to summary
private final InputStream in
macAlgback to summary
private BCFKSLoadStoreParameter.MacAlgorithm macAlg
outback to summary
private final OutputStream out
protectionParameterback to summary
private final KeyStore.ProtectionParameter protectionParameter
sigAlgback to summary
private BCFKSLoadStoreParameter.SignatureAlgorithm sigAlg
sigKeyback to summary
private final Key sigKey
storeConfigback to summary
private PBKDFConfig storeConfig
validatorback to summary
private BCFKSLoadStoreParameter.CertChainValidator validator

Constructor Detail

Builderback to summary
public Builder()

Base constructor for creating a LoadStoreParameter for initializing a key store.

Builderback to summary
public Builder(OutputStream out, char[] password)

Base constructor for storing to an OutputStream using a password.

Parameters
out:OutputStream

OutputStream to write KeyStore to.

password:char[]

the password to use to protect the KeyStore.

Builderback to summary
public Builder(OutputStream out, KeyStore.ProtectionParameter protectionParameter)

Base constructor for storing to an OutputStream using a protection parameter.

Parameters
out:OutputStream

OutputStream to write KeyStore to.

protectionParameter:KeyStore.ProtectionParameter

the protection parameter to use to protect the KeyStore.

Builderback to summary
public Builder(OutputStream out, PrivateKey sigKey)

Base constructor for storing to an OutputStream using a protection parameter.

Parameters
out:OutputStream

OutputStream to write KeyStore to.

sigKey:PrivateKey

the key used to protect the integrity of the key store.

Builderback to summary
public Builder(InputStream in, PublicKey sigKey)

Base constructor for reading a KeyStore from an InputStream using a public key for validation.

Parameters
in:InputStream

InputStream to load KeyStore to.

sigKey:PublicKey

the public key parameter to used to verify the KeyStore.

Builderback to summary
public Builder(InputStream in, BCFKSLoadStoreParameter.CertChainValidator validator)

Base constructor for reading a KeyStore from an InputStream using validation based on encapsulated certificates in the KeyStore data.

Parameters
in:InputStream

InputStream to load KeyStore to.

validator:BCFKSLoadStoreParameter.CertChainValidator

the certificate chain validator to check the signing certificates.

Builderback to summary
public Builder(InputStream in, char[] password)

Base constructor for reading a KeyStore from an InputStream using a password.

Parameters
in:InputStream

InputStream to read the KeyStore from.

password:char[]

the password used to protect the KeyStore.

Builderback to summary
public Builder(InputStream in, KeyStore.ProtectionParameter protectionParameter)

Base constructor for reading a KeyStore from an InputStream using a password.

Parameters
in:InputStream

InputStream to read the KeyStore from.

protectionParameter:KeyStore.ProtectionParameter

the protection parameter used to protect the KeyStore.

Method Detail

buildback to summary
public BCFKSLoadStoreParameter build()

Build and return a BCFKSLoadStoreParameter.

Returns:BCFKSLoadStoreParameter

a new BCFKSLoadStoreParameter.

withCertificatesback to summary
public BCFKSLoadStoreParameter.Builder withCertificates(X509Certificate[] certs)

Add a valid certificate chain where certs[0] is the end-entity matching the private key we are using to sign the key store.

Parameters
certs:X509Certificate[]

an array of X509 certificates.

Returns:BCFKSLoadStoreParameter.Builder

the current Builder instance.

withStoreEncryptionAlgorithmback to summary
public BCFKSLoadStoreParameter.Builder withStoreEncryptionAlgorithm(BCFKSLoadStoreParameter.EncryptionAlgorithm encAlg)

Configure the encryption algorithm to use for protecting the KeyStore and its keys.

Parameters
encAlg:BCFKSLoadStoreParameter.EncryptionAlgorithm

the PBKDF config to use for protecting the KeyStore and its keys.

Returns:BCFKSLoadStoreParameter.Builder

the current Builder instance.

withStoreMacAlgorithmback to summary
public BCFKSLoadStoreParameter.Builder withStoreMacAlgorithm(BCFKSLoadStoreParameter.MacAlgorithm macAlg)

Configure the MAC algorithm to use for protecting the KeyStore.

Parameters
macAlg:BCFKSLoadStoreParameter.MacAlgorithm

the PBKDF config to use for protecting the KeyStore.

Returns:BCFKSLoadStoreParameter.Builder

the current Builder instance.

withStorePBKDFConfigback to summary
public BCFKSLoadStoreParameter.Builder withStorePBKDFConfig(PBKDFConfig storeConfig)

Configure the PBKDF to use for protecting the KeyStore.

Parameters
storeConfig:PBKDFConfig

the PBKDF config to use for protecting the KeyStore.

Returns:BCFKSLoadStoreParameter.Builder

the current Builder instance.

withStoreSignatureAlgorithmback to summary
public BCFKSLoadStoreParameter.Builder withStoreSignatureAlgorithm(BCFKSLoadStoreParameter.SignatureAlgorithm sigAlg)

Configure the signature algorithm to use for protecting the KeyStore.

Parameters
sigAlg:BCFKSLoadStoreParameter.SignatureAlgorithm

the signature config to use for protecting the KeyStore.

Returns:BCFKSLoadStoreParameter.Builder

the current Builder instance.

org.bouncycastle.jcajce back to summary

public Interface BCFKSLoadStoreParameter.CertChainValidator


Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if valid, false otherwise.
isValid
(X509Certificate[]
the certChain we know about, the end-entity is at position 0.
chain
)

Return true if the passed in chain is valid, false otherwise.

Method Detail

isValidback to summary
public boolean isValid(X509Certificate[] chain)

Return true if the passed in chain is valid, false otherwise.

Parameters
chain:X509Certificate[]

the certChain we know about, the end-entity is at position 0.

Returns:boolean

true if valid, false otherwise.

org.bouncycastle.jcajce back to summary

public final Enum BCFKSLoadStoreParameter.EncryptionAlgorithm

extends Enum<BCFKSLoadStoreParameter.EncryptionAlgorithm>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final BCFKSLoadStoreParameter.EncryptionAlgorithm
public static final BCFKSLoadStoreParameter.EncryptionAlgorithm

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BCFKSLoadStoreParameter.EncryptionAlgorithm
public static BCFKSLoadStoreParameter.EncryptionAlgorithm[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AES256_CCMback to summary
public static final BCFKSLoadStoreParameter.EncryptionAlgorithm AES256_CCM
AES256_KWPback to summary
public static final BCFKSLoadStoreParameter.EncryptionAlgorithm AES256_KWP

Constructor Detail

EncryptionAlgorithmback to summary
private EncryptionAlgorithm()

Method Detail

valueOfback to summary
public static BCFKSLoadStoreParameter.EncryptionAlgorithm valueOf(String name)
valuesback to summary
public static BCFKSLoadStoreParameter.EncryptionAlgorithm[] values()
org.bouncycastle.jcajce back to summary

public final Enum BCFKSLoadStoreParameter.MacAlgorithm

extends Enum<BCFKSLoadStoreParameter.MacAlgorithm>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final BCFKSLoadStoreParameter.MacAlgorithm
public static final BCFKSLoadStoreParameter.MacAlgorithm

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BCFKSLoadStoreParameter.MacAlgorithm
public static BCFKSLoadStoreParameter.MacAlgorithm[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

HmacSHA3_512back to summary
public static final BCFKSLoadStoreParameter.MacAlgorithm HmacSHA3_512
HmacSHA512back to summary
public static final BCFKSLoadStoreParameter.MacAlgorithm HmacSHA512

Constructor Detail

MacAlgorithmback to summary
private MacAlgorithm()

Method Detail

valueOfback to summary
public static BCFKSLoadStoreParameter.MacAlgorithm valueOf(String name)
valuesback to summary
public static BCFKSLoadStoreParameter.MacAlgorithm[] values()
org.bouncycastle.jcajce back to summary

public final Enum BCFKSLoadStoreParameter.SignatureAlgorithm

extends Enum<BCFKSLoadStoreParameter.SignatureAlgorithm>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final BCFKSLoadStoreParameter.SignatureAlgorithm
public static final BCFKSLoadStoreParameter.SignatureAlgorithm
public static final BCFKSLoadStoreParameter.SignatureAlgorithm
public static final BCFKSLoadStoreParameter.SignatureAlgorithm
public static final BCFKSLoadStoreParameter.SignatureAlgorithm
public static final BCFKSLoadStoreParameter.SignatureAlgorithm

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BCFKSLoadStoreParameter.SignatureAlgorithm
public static BCFKSLoadStoreParameter.SignatureAlgorithm[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

SHA3_512withDSAback to summary
public static final BCFKSLoadStoreParameter.SignatureAlgorithm SHA3_512withDSA
SHA3_512withECDSAback to summary
public static final BCFKSLoadStoreParameter.SignatureAlgorithm SHA3_512withECDSA
SHA3_512withRSAback to summary
public static final BCFKSLoadStoreParameter.SignatureAlgorithm SHA3_512withRSA
SHA512withDSAback to summary
public static final BCFKSLoadStoreParameter.SignatureAlgorithm SHA512withDSA
SHA512withECDSAback to summary
public static final BCFKSLoadStoreParameter.SignatureAlgorithm SHA512withECDSA
SHA512withRSAback to summary
public static final BCFKSLoadStoreParameter.SignatureAlgorithm SHA512withRSA

Constructor Detail

SignatureAlgorithmback to summary
private SignatureAlgorithm()

Method Detail

valueOfback to summary
public static BCFKSLoadStoreParameter.SignatureAlgorithm valueOf(String name)
valuesback to summary
public static BCFKSLoadStoreParameter.SignatureAlgorithm[] values()