public class ECIESKeyEncapsulation extends java.lang.Object implements KeyEncapsulation
Constructor and Description |
---|
ECIESKeyEncapsulation(DerivationFunction kdf,
java.security.SecureRandom rnd)
Deprecated.
Set up the ECIES-KEM.
|
ECIESKeyEncapsulation(DerivationFunction kdf,
java.security.SecureRandom rnd,
boolean cofactorMode,
boolean oldCofactorMode,
boolean singleHashMode)
Deprecated.
Set up the ECIES-KEM.
|
Modifier and Type | Method and Description |
---|---|
CipherParameters |
decrypt(byte[] in,
int keyLen)
Deprecated.
use ECIESKEMExtractor
|
CipherParameters |
decrypt(byte[] in,
int inOff,
int inLen,
int keyLen)
Deprecated.
use ECIESKEMExtractor
|
CipherParameters |
encrypt(byte[] out,
int keyLen)
Deprecated.
use ECIESKEMGenerator
|
CipherParameters |
encrypt(byte[] out,
int outOff,
int keyLen)
Deprecated.
use ECIESKEMGenerator
|
void |
init(CipherParameters key)
Deprecated.
Initialise the ECIES-KEM.
|
public ECIESKeyEncapsulation(DerivationFunction kdf, java.security.SecureRandom rnd)
kdf
- the key derivation function to be used.rnd
- the random source for the session key.public ECIESKeyEncapsulation(DerivationFunction kdf, java.security.SecureRandom rnd, boolean cofactorMode, boolean oldCofactorMode, boolean singleHashMode)
kdf
- the key derivation function to be used.rnd
- the random source for the session key.cofactorMode
- if true use the new cofactor ECDH.oldCofactorMode
- if true use the old cofactor ECDH.singleHashMode
- if true use single hash mode.public void init(CipherParameters key) throws java.lang.IllegalArgumentException
init
in interface KeyEncapsulation
key
- the recipient's public (for encryption) or private (for decryption) key.java.lang.IllegalArgumentException
public CipherParameters encrypt(byte[] out, int outOff, int keyLen) throws java.lang.IllegalArgumentException
encrypt
in interface KeyEncapsulation
out
- the output buffer for the encapsulated key.outOff
- the offset for the output buffer.keyLen
- the length of the session key.java.lang.IllegalArgumentException
public CipherParameters encrypt(byte[] out, int keyLen)
out
- the output buffer for the encapsulated key.keyLen
- the length of the session key.public CipherParameters decrypt(byte[] in, int inOff, int inLen, int keyLen) throws java.lang.IllegalArgumentException
decrypt
in interface KeyEncapsulation
in
- the input buffer for the encapsulated key.inOff
- the offset for the input buffer.inLen
- the length of the encapsulated key.keyLen
- the length of the session key.java.lang.IllegalArgumentException
public CipherParameters decrypt(byte[] in, int keyLen)
in
- the input buffer for the encapsulated key.keyLen
- the length of the session key.