Top Description Fields Constructors Methods
org.bouncycastle.jcajce.spec

public Class HybridValueParameterSpec

extends Object
implements AlgorithmParameterSpec, Destroyable
Class Inheritance
All Implemented Interfaces
javax.security.auth.Destroyable, java.security.spec.AlgorithmParameterSpec
Imports
java.security.spec.AlgorithmParameterSpec, java.util.concurrent.atomic.AtomicBoolean, javax.security.auth.Destroyable, org.bouncycastle.util.Arrays

SP 800-56C Hybrid Value spec, by default to allow the secret in a key agreement to be created as "Z | T" where T is some other secret value as described in Section 2. If the value doPrepend is set to true the spec will be used to calculate "T | Z" instead.

Get methods throw IllegalStateException if destroy() is called.

Field Summary

Modifier and TypeField and Description
private volatile AlgorithmParameterSpec
private final boolean
private final AtomicBoolean
private volatile byte[]
t

Constructor Summary

AccessConstructor and Description
public
HybridValueParameterSpec(byte[]
a shared secret to be concatenated with the agreement's Z value.
t
,
AlgorithmParameterSpec
the base spec for the agreements KDF.
baseSpec
)

Create a spec with T set to t and the spec for the KDF in the agreement to baseSpec.

public
HybridValueParameterSpec(byte[]
a shared secret to be concatenated with the agreement's Z value.
t
,
boolean doPrepend, AlgorithmParameterSpec
the base spec for the agreements KDF.
baseSpec
)

Create a spec with T set to t and the spec for the KDF in the agreement to baseSpec.

Method Summary

Modifier and TypeMethod and Description
private void
public void
destroy()

Overrides default javax.security.auth.Destroyable.destroy.

Destroy this parameter spec, explicitly erasing its contents.

public AlgorithmParameterSpec

Returns:

base spec to be applied to the KDF.
getBaseParameterSpec
()

Return the base parameter spec.

public byte[]

Returns:

a reference to T.
getT
()

Return a reference to the T value.

public boolean

Returns:

true if destroyed, false otherwise.
isDestroyed
()

Overrides default javax.security.auth.Destroyable.isDestroyed.

Return true if the destroy() method is called and the contents are erased.

public boolean

Returns:

true if T to be prepended, false otherwise.
isPrependedT
()

Return whether or not T should be prepended.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseSpecback to summary
private volatile AlgorithmParameterSpec baseSpec
doPrependback to summary
private final boolean doPrepend
hasBeenDestroyedback to summary
private final AtomicBoolean hasBeenDestroyed
tback to summary
private volatile byte[] t

Constructor Detail

HybridValueParameterSpecback to summary
public HybridValueParameterSpec(byte[] t, AlgorithmParameterSpec baseSpec)

Create a spec with T set to t and the spec for the KDF in the agreement to baseSpec.

Note

the t value is not copied.

Parameters
t:byte[]

a shared secret to be concatenated with the agreement's Z value.

baseSpec:AlgorithmParameterSpec

the base spec for the agreements KDF.

HybridValueParameterSpecback to summary
public HybridValueParameterSpec(byte[] t, boolean doPrepend, AlgorithmParameterSpec baseSpec)

Create a spec with T set to t and the spec for the KDF in the agreement to baseSpec.

Note

the t value is not copied.

Parameters
t:byte[]

a shared secret to be concatenated with the agreement's Z value.

baseSpec:AlgorithmParameterSpec

the base spec for the agreements KDF.

Method Detail

checkDestroyedback to summary
private void checkDestroyed()
destroyback to summary
public void destroy()

Overrides default javax.security.auth.Destroyable.destroy.

Destroy this parameter spec, explicitly erasing its contents.

getBaseParameterSpecback to summary
public AlgorithmParameterSpec getBaseParameterSpec()

Return the base parameter spec.

Returns:AlgorithmParameterSpec

base spec to be applied to the KDF.

getTback to summary
public byte[] getT()

Return a reference to the T value.

Returns:byte[]

a reference to T.

isDestroyedback to summary
public boolean isDestroyed()

Overrides default javax.security.auth.Destroyable.isDestroyed.

Return true if the destroy() method is called and the contents are erased.

Returns:boolean

true if destroyed, false otherwise.

isPrependedTback to summary
public boolean isPrependedT()

Return whether or not T should be prepended.

Returns:boolean

true if T to be prepended, false otherwise.