Package org.bouncycastle.jce.spec
Class IESParameterSpec
java.lang.Object
org.bouncycastle.jce.spec.IESParameterSpec
- All Implemented Interfaces:
AlgorithmParameterSpec
Parameter spec for an integrated encryptor, as in IEEE P1363a
-
Constructor Summary
ConstructorDescriptionIESParameterSpec
(byte[] derivation, byte[] encoding, int macKeySize) Set the IES engine parameters.IESParameterSpec
(byte[] derivation, byte[] encoding, int macKeySize, int cipherKeySize, byte[] nonce) Set the IES engine parameters.IESParameterSpec
(byte[] derivation, byte[] encoding, int macKeySize, int cipherKeySize, byte[] nonce, boolean usePointCompression) Set the IES engine parameters. -
Method Summary
Modifier and TypeMethodDescriptionint
return the key size in bits for the block cipher used with the messagebyte[]
return the derivation vector.byte[]
return the encoding vector.int
return the key size in bits for the MAC used with the messagebyte[]
getNonce()
Return the nonce (IV) value to be associated with message.boolean
Return the 'point compression' flag.void
setPointCompression
(boolean usePointCompression) Set the 'point compression' flag.
-
Constructor Details
-
IESParameterSpec
public IESParameterSpec(byte[] derivation, byte[] encoding, int macKeySize) Set the IES engine parameters.- Parameters:
derivation
- the optional derivation vector for the KDF.encoding
- the optional encoding vector for the KDF.macKeySize
- the key size (in bits) for the MAC.
-
IESParameterSpec
public IESParameterSpec(byte[] derivation, byte[] encoding, int macKeySize, int cipherKeySize, byte[] nonce) Set the IES engine parameters.- Parameters:
derivation
- the optional derivation vector for the KDF.encoding
- the optional encoding vector for the KDF.macKeySize
- the key size (in bits) for the MAC.cipherKeySize
- the key size (in bits) for the block cipher.nonce
- an IV to use initialising the block cipher.
-
IESParameterSpec
public IESParameterSpec(byte[] derivation, byte[] encoding, int macKeySize, int cipherKeySize, byte[] nonce, boolean usePointCompression) Set the IES engine parameters.- Parameters:
derivation
- the optional derivation vector for the KDF.encoding
- the optional encoding vector for the KDF.macKeySize
- the key size (in bits) for the MAC.cipherKeySize
- the key size (in bits) for the block cipher.nonce
- an IV to use initialising the block cipher.usePointCompression
- whether to use EC point compression or not (false by default)
-
-
Method Details
-
getDerivationV
public byte[] getDerivationV()return the derivation vector. -
getEncodingV
public byte[] getEncodingV()return the encoding vector. -
getMacKeySize
public int getMacKeySize()return the key size in bits for the MAC used with the message -
getCipherKeySize
public int getCipherKeySize()return the key size in bits for the block cipher used with the message -
getNonce
public byte[] getNonce()Return the nonce (IV) value to be associated with message.- Returns:
- block cipher IV for message.
-
setPointCompression
public void setPointCompression(boolean usePointCompression) Set the 'point compression' flag. -
getPointCompression
public boolean getPointCompression()Return the 'point compression' flag.- Returns:
- the point compression flag
-