| Modifier and Type | Class and Description |
|---|---|
| public static class | IESKEMCipher.KEM
Classes that inherit from us |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ECDHCBasicAgreement | |
| private ByteArrayOutputStream | |
| private static final X9IntegerConverter | |
| private boolean | |
| private IESEngine | |
| private AlgorithmParameters | |
| private IESKEMParameterSpec | |
| private final JcaJceHelper | |
| private final Mac | |
| private int | |
| private final KDF2BytesGenerator | |
| private AsymmetricKeyParameter | |
| private final int | |
| private final int | |
| private AsymmetricKeyParameter | |
| private SecureRandom | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | IESKEMCipher(ECDHCBasicAgreement agreement, KDF2BytesGenerator kdf, Mac hMac, int macKeyLength, int macLength)
|
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | engineDoFinal(byte[]
the input buffer input, int the offset in inputOffset, int input where the input startsthe input length inputLen)Implements abstract javax. |
| public int | engineDoFinal(byte[]
the input buffer input, int the offset in inputOffset, int input where the input
startsthe input length inputLength, byte[] the buffer for the result output, int the offset in outputOffset)output where the result
is storedImplements abstract javax. |
| public int | engineGetBlockSize()
Overrides org. |
| public byte[] | engineGetIV()
Overrides org. |
| public int | engineGetKeySize(Key
the key object key)Overrides org. |
| public int | engineGetOutputSize(int
the input length (in bytes) inputLen)Overrides org. update
or doFinal operation, given the input length
inputLen (in bytes).
|
| public AlgorithmParameters | engineGetParameters()
Overrides org. |
| public void | engineInit(int
the operation mode of this opmode, Key CipherSpi object
(this is one of the following:
ENCRYPT_MODE, DECRYPT_MODE,
WRAP_MODE, or UNWRAP_MODE)the encryption key key, AlgorithmParameters the algorithm parameters params, SecureRandom the source of randomness random)Implements abstract javax. CipherSpi object with a key, a set of
algorithm parameters, and a source of randomness.
|
| public void | engineInit(int
the operation mode of this opmode, Key CipherSpi object
(this is one of the following:
ENCRYPT_MODE, DECRYPT_MODE,
WRAP_MODE, or UNWRAP_MODE)the encryption key key, AlgorithmParameterSpec the algorithm parameters engineSpec, SecureRandom the source of randomness random)Implements abstract javax. CipherSpi object with a key, a set of
algorithm parameters, and a source of randomness.
|
| public void | engineInit(int
the operation mode of this opmode, Key CipherSpi object
(this is one of the following:
ENCRYPT_MODE, DECRYPT_MODE,
WRAP_MODE or UNWRAP_MODE)the encryption key key, SecureRandom the source of randomness random)Implements abstract javax. CipherSpi object with a key and a source
of randomness.
|
| public void | engineSetMode(String
the cipher mode mode)Overrides org. |
| public void | engineSetPadding(String
the padding mechanism padding)Overrides org. |
| public byte[] | engineUpdate(byte[]
the input buffer input, int the offset in inputOffset, int input where the input startsthe input length inputLen)Implements abstract javax. CipherSpi object was initialized),
processing another data part.
|
| public int | engineUpdate(byte[]
the input buffer input, int the offset in inputOffset, int input where the input
startsthe input length inputLen, byte[] the buffer for the result output, int the offset in outputOffset)output where the result
is storedImplements abstract javax. CipherSpi object was initialized),
processing another data part.
|
| agreement | back to summary |
|---|---|
| private final ECDHCBasicAgreement agreement | |
| buffer | back to summary |
|---|---|
| private ByteArrayOutputStream buffer | |
| converter | back to summary |
|---|---|
| private static final X9IntegerConverter converter | |
| dhaesMode | back to summary |
|---|---|
| private boolean dhaesMode | |
| engine | back to summary |
|---|---|
| private IESEngine engine | |
| engineParam | back to summary |
|---|---|
| private AlgorithmParameters engineParam | |
| engineSpec | back to summary |
|---|---|
| private IESKEMParameterSpec engineSpec | |
| helper | back to summary |
|---|---|
| private final JcaJceHelper helper Hides org. | |
| hMac | back to summary |
|---|---|
| private final Mac hMac | |
| ivLength | back to summary |
|---|---|
| private int ivLength | |
| kdf | back to summary |
|---|---|
| private final KDF2BytesGenerator kdf | |
| key | back to summary |
|---|---|
| private AsymmetricKeyParameter key | |
| macKeyLength | back to summary |
|---|---|
| private final int macKeyLength | |
| macLength | back to summary |
|---|---|
| private final int macLength | |
| otherKeyParameter | back to summary |
|---|---|
| private AsymmetricKeyParameter otherKeyParameter | |
| random | back to summary |
|---|---|
| private SecureRandom random | |
| state | back to summary |
|---|---|
| private int state | |
| IESKEMCipher | back to summary |
|---|---|
| public IESKEMCipher(ECDHCBasicAgreement agreement, KDF2BytesGenerator kdf, Mac hMac, int macKeyLength, int macLength) | |
| engineDoFinal | back to summary |
|---|---|
| public byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException Implements abstract javax. Doc from javax. Encrypts or decrypts data in a single-part operation,
or finishes a multiple-part operation.
The data is encrypted or decrypted, depending on how this
The first Upon finishing, this method resets this Note if any exception is thrown, this
| |
| engineDoFinal | back to summary |
|---|---|
| public int engineDoFinal(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException Implements abstract javax. Doc from javax. Encrypts or decrypts data in a single-part operation,
or finishes a multiple-part operation.
The data is encrypted or decrypted, depending on how this
The first If the Upon finishing, this method resets this Note if any exception is thrown, this
| |
| engineGetBlockSize | back to summary |
|---|---|
| public int engineGetBlockSize() Overrides org. Doc from javax. Returns the block size (in bytes).
| |
| engineGetIV | back to summary |
|---|---|
| public byte[] engineGetIV() Overrides org. Doc from javax. Returns the initialization vector (IV) in a new buffer. This is useful in the context of password-based encryption or decryption, where the IV is derived from a user-provided passphrase.
| |
| engineGetKeySize | back to summary |
|---|---|
| public int engineGetKeySize(Key key) Overrides org. Doc from javax. Returns the key size of the given key object in bits. This concrete method has been added to this previously-defined
abstract class. It throws an
| |
| engineGetOutputSize | back to summary |
|---|---|
| public int engineGetOutputSize(int inputLen) Overrides org. Doc from javax. Returns the length in bytes that an output buffer would
need to be in order to hold the result of the next This call takes into account any unprocessed (buffered) data from a
previous The actual output length of the next
| |
| engineGetParameters | back to summary |
|---|---|
| public AlgorithmParameters engineGetParameters() Overrides org. Doc from javax. Returns the parameters used with this cipher. The returned parameters may be the same that were used to initialize
this cipher, or may contain additional default or random parameter
values used by the underlying cipher implementation. If the required
parameters were not supplied and can be generated by the cipher, the
generated parameters are returned. Otherwise,
| |
| engineInit | back to summary |
|---|---|
| public void engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException Implements abstract javax. Doc from javax. Initializes this The If this cipher requires any algorithm parameters and
If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineInit | back to summary |
|---|---|
| public void engineInit(int opmode, Key key, AlgorithmParameterSpec engineSpec, SecureRandom random) throws InvalidAlgorithmParameterException, InvalidKeyException Implements abstract javax. Doc from javax. Initializes this The If this cipher requires any algorithm parameters and
If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineInit | back to summary |
|---|---|
| public void engineInit(int opmode, Key key, SecureRandom random) throws InvalidKeyException Implements abstract javax. Doc from javax. Initializes this The If this cipher requires any algorithm parameters that cannot be
derived from the given If this cipher requires algorithm parameters that cannot be derived from the input parameters, and there are no reasonable provider-specific default values, initialization will necessarily fail. If this cipher (including its feedback or padding scheme)
requires any random bytes (e.g., for parameter generation), it will get
them from Note that when a
| |
| engineSetMode | back to summary |
|---|---|
| public void engineSetMode(String mode) throws NoSuchAlgorithmException Overrides org. Doc from javax. Sets the mode of this cipher.
| |
| engineSetPadding | back to summary |
|---|---|
| public void engineSetPadding(String padding) throws NoSuchPaddingException Overrides org. Doc from javax. Sets the padding mechanism of this cipher.
| |
| engineUpdate | back to summary |
|---|---|
| public byte[] engineUpdate(byte[] input, int inputOffset, int inputLen) Implements abstract javax. Doc from javax. Continues a multiple-part encryption or decryption operation
(depending on how this The first
| |
| engineUpdate | back to summary |
|---|---|
| public int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) Implements abstract javax. Doc from javax. Continues a multiple-part encryption or decryption operation
(depending on how this The first If the
| |
| Access | Constructor and Description |
|---|---|
| public |
| KEM | back to summary |
|---|---|
| public KEM(Digest kdfDigest, Digest macDigest, int macKeyLength, int macLength) | |
| Access | Constructor and Description |
|---|---|
| public |
| KEMwithSHA256 | back to summary |
|---|---|
| public KEMwithSHA256() | |