APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.security.pkcs11

pack-priv final Class P11HKDF

extends KDFSpi
Class Inheritance
Imports
javax.crypto.KDFParameters, .KDFSpi, .SecretKey, javax.crypto.spec.HKDFParameterSpec, .SecretKeySpec, java.security.*, java.security.spec.*, java.util.Arrays, .List, sun.security.pkcs11.wrapper.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
private class
private abstract class

Field Summary

Modifier and TypeField and Description
private static final SecretKey
private final P11SecretKeyFactory.HKDFKeyInfo
private final Token

Constructor Summary

AccessConstructor and Description
pack-priv
P11HKDF(Token token, String algorithm, KDFParameters kdfParameters)

Method Summary

Modifier and TypeMethod and Description
private static boolean
private void
private void
checkMechanismEnabled(long mechanism)

private SecretKey
private P11Key.P11SecretKey
convertKey(SecretKey key, String errorMessage)

private long
private <T> T
derive(String alg, AlgorithmParameterSpec derivationSpec, Class<T> retType)

private void
destroyDataObject(long baseKeyID)

protected byte[]
engineDeriveData(AlgorithmParameterSpec derivationSpec)

Implements abstract javax.crypto.KDFSpi.engineDeriveData.

Derives a key, returns raw data as a byte array.

protected SecretKey
engineDeriveKey(String alg, AlgorithmParameterSpec derivationSpec)

Implements abstract javax.crypto.KDFSpi.engineDeriveKey.

Derives a key, returned as a SecretKey object.

protected KDFParameters
engineGetParameters()

Implements abstract javax.crypto.KDFSpi.engineGetParameters.

Returns the KDFParameters used with this KDF object.

private static KDFParameters
requireNull(KDFParameters kdfParameters, String message)

Field Detail

EMPTY_KEYback to summary
private static final SecretKey EMPTY_KEY
svcKiback to summary
private final P11SecretKeyFactory.HKDFKeyInfo svcKi
tokenback to summary
private final Token token

Constructor Detail

P11HKDFback to summary
pack-priv P11HKDF(Token token, String algorithm, KDFParameters kdfParameters) throws InvalidAlgorithmParameterException

Method Detail

canDeriveKeyInfoTypeback to summary
private static boolean canDeriveKeyInfoType(long t)
checkDerivedKeyTypeback to summary
private void checkDerivedKeyType(P11SecretKeyFactory.KeyInfo ki, String alg) throws InvalidAlgorithmParameterException
checkMechanismEnabledback to summary
private void checkMechanismEnabled(long mechanism)
consolidateKeyMaterialback to summary
private SecretKey consolidateKeyMaterial(List<SecretKey> keys)
convertKeyback to summary
private P11Key.P11SecretKey convertKey(SecretKey key, String errorMessage)
convertKeyToDataback to summary
private long convertKeyToData(SecretKey key, ProviderException pe)
deriveback to summary
private <T> T derive(String alg, AlgorithmParameterSpec derivationSpec, Class<T> retType) throws InvalidAlgorithmParameterException
destroyDataObjectback to summary
private void destroyDataObject(long baseKeyID)
engineDeriveDataback to summary
protected byte[] engineDeriveData(AlgorithmParameterSpec derivationSpec) throws InvalidAlgorithmParameterException

Implements abstract javax.crypto.KDFSpi.engineDeriveData.

Doc from javax.crypto.KDFSpi.engineDeriveData.

Derives a key, returns raw data as a byte array.

Annotations
@Override
Exceptions
InvalidAlgorithmParameterException:
if the information contained within the derivationSpec is invalid
engineDeriveKeyback to summary
protected SecretKey engineDeriveKey(String alg, AlgorithmParameterSpec derivationSpec) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException

Implements abstract javax.crypto.KDFSpi.engineDeriveKey.

Doc from javax.crypto.KDFSpi.engineDeriveKey.

Derives a key, returned as a SecretKey object.

Annotations
@Override
Exceptions
InvalidAlgorithmParameterException:
if the information contained within the derivationSpec is invalid or if the combination of alg and the derivationSpec results in something invalid
NoSuchAlgorithmException:
if alg is empty or invalid
engineGetParametersback to summary
protected KDFParameters engineGetParameters()

Implements abstract javax.crypto.KDFSpi.engineGetParameters.

Doc from javax.crypto.KDFSpi.engineGetParameters.

Returns the KDFParameters used with this KDF object.

The returned parameters may be the same that were used to initialize this KDF object, or may contain additional default or random parameter values used by the underlying KDF algorithm. If the required parameters were not supplied and can be generated by the KDF object, the generated parameters are returned; otherwise null is returned.

Annotations
@Override
requireNullback to summary
private static KDFParameters requireNull(KDFParameters kdfParameters, String message) throws InvalidAlgorithmParameterException
sun.security.pkcs11 back to summary

private final Class P11HKDF.AnyKeyMaterialMerger

extends KeyMaterialMerger
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv SecretKey
protected P11HKDF.KeyMaterialMerger
merge(byte[] nextKeyMaterial)

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.merge.

protected P11HKDF.KeyMaterialMerger
Inherited from sun.security.pkcs11.P11HKDF.KeyMaterialMerger:
mergep11Merge

Constructor Detail

AnyKeyMaterialMergerback to summary
private AnyKeyMaterialMerger()

Method Detail

getKeyMaterialback to summary
pack-priv SecretKey getKeyMaterial()

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.getKeyMaterial.

mergeback to summary
protected P11HKDF.KeyMaterialMerger merge(byte[] nextKeyMaterial)

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.merge.

mergeback to summary
protected P11HKDF.KeyMaterialMerger merge(P11Key.P11SecretKey nextKeyMaterial)

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.merge.

sun.security.pkcs11 back to summary

private final Class P11HKDF.DataKeyMaterialMerger

extends KeyMaterialMerger
Class Inheritance

Field Summary

Modifier and TypeField and Description
private byte[]

Constructor Summary

AccessConstructor and Description
pack-priv
DataKeyMaterialMerger(byte[] keyMaterial)

Method Summary

Modifier and TypeMethod and Description
pack-priv SecretKey
protected P11HKDF.KeyMaterialMerger
merge(byte[] nextKeyMaterial)

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.merge.

protected P11HKDF.KeyMaterialMerger
Inherited from sun.security.pkcs11.P11HKDF.KeyMaterialMerger:
mergep11Merge

Field Detail

keyMaterialback to summary
private byte[] keyMaterial

Constructor Detail

DataKeyMaterialMergerback to summary
pack-priv DataKeyMaterialMerger(byte[] keyMaterial)

Method Detail

getKeyMaterialback to summary
pack-priv SecretKey getKeyMaterial()

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.getKeyMaterial.

mergeback to summary
protected P11HKDF.KeyMaterialMerger merge(byte[] nextKeyMaterial)

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.merge.

mergeback to summary
protected P11HKDF.KeyMaterialMerger merge(P11Key.P11SecretKey nextKeyMaterial)

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.merge.

sun.security.pkcs11 back to summary

private final Class P11HKDF.KeyKeyMaterialMerger

extends KeyMaterialMerger
Class Inheritance

Field Summary

Modifier and TypeField and Description
private P11Key.P11SecretKey

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv SecretKey
protected P11HKDF.KeyMaterialMerger
merge(byte[] nextKeyMaterial)

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.merge.

protected P11HKDF.KeyMaterialMerger
Inherited from sun.security.pkcs11.P11HKDF.KeyMaterialMerger:
mergep11Merge

Field Detail

keyMaterialback to summary
private P11Key.P11SecretKey keyMaterial

Constructor Detail

KeyKeyMaterialMergerback to summary
pack-priv KeyKeyMaterialMerger(P11Key.P11SecretKey keyMaterial)

Method Detail

getKeyMaterialback to summary
pack-priv SecretKey getKeyMaterial()

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.getKeyMaterial.

mergeback to summary
protected P11HKDF.KeyMaterialMerger merge(byte[] nextKeyMaterial)

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.merge.

mergeback to summary
protected P11HKDF.KeyMaterialMerger merge(P11Key.P11SecretKey nextKeyMaterial)

Implements abstract sun.security.pkcs11.P11HKDF.KeyMaterialMerger.merge.

sun.security.pkcs11 back to summary

private abstract sealed Class P11HKDF.KeyMaterialMerger

extends Object
permits AnyKeyMaterialMerger, KeyKeyMaterialMerger, DataKeyMaterialMerger
Class Inheritance
Known Direct Subclasses
sun.security.pkcs11.P11HKDF.AnyKeyMaterialMerger, sun.security.pkcs11.P11HKDF.KeyKeyMaterialMerger, sun.security.pkcs11.P11HKDF.DataKeyMaterialMerger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract SecretKey
pack-priv final P11HKDF.KeyMaterialMerger
merge(SecretKey nextKeyMaterial)

protected abstract P11HKDF.KeyMaterialMerger
merge(byte[] nextKeyMaterial)

protected abstract P11HKDF.KeyMaterialMerger
merge(P11Key.P11SecretKey nextKeyMaterial)

protected final P11Key.P11SecretKey
p11Merge(P11Key.P11SecretKey baseKey, CK_MECHANISM ckMech, int derivedKeyLen)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

KeyMaterialMergerback to summary
private KeyMaterialMerger()

Method Detail

getKeyMaterialback to summary
pack-priv abstract SecretKey getKeyMaterial()
mergeback to summary
pack-priv final P11HKDF.KeyMaterialMerger merge(SecretKey nextKeyMaterial)
mergeback to summary
protected abstract P11HKDF.KeyMaterialMerger merge(byte[] nextKeyMaterial)
mergeback to summary
protected abstract P11HKDF.KeyMaterialMerger merge(P11Key.P11SecretKey nextKeyMaterial)
p11Mergeback to summary
protected final P11Key.P11SecretKey p11Merge(P11Key.P11SecretKey baseKey, CK_MECHANISM ckMech, int derivedKeyLen)