|
Bouncy Castle Cryptography 1.50 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bouncycastle.crypto.kems.ECIESKeyEncapsulation
public class ECIESKeyEncapsulation
The ECIES Key Encapsulation Mechanism (ECIES-KEM) from ISO 18033-2.
| Constructor Summary | |
|---|---|
ECIESKeyEncapsulation(DerivationFunction kdf,
java.security.SecureRandom rnd)
Set up the ECIES-KEM. |
|
ECIESKeyEncapsulation(DerivationFunction kdf,
java.security.SecureRandom rnd,
boolean cofactorMode,
boolean oldCofactorMode,
boolean singleHashMode)
Set up the ECIES-KEM. |
|
| Method Summary | |
|---|---|
CipherParameters |
decrypt(byte[] in,
int keyLen)
Decrypt an encapsulated session key. |
CipherParameters |
decrypt(byte[] in,
int inOff,
int inLen,
int keyLen)
Decrypt an encapsulated session key. |
CipherParameters |
encrypt(byte[] out,
int keyLen)
Generate and encapsulate a random session key. |
CipherParameters |
encrypt(byte[] out,
int outOff,
int keyLen)
Generate and encapsulate a random session key. |
void |
init(CipherParameters key)
Initialise the ECIES-KEM. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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 - true to use the new cofactor ECDH.oldCofactorMode - true to use the old cofactor ECDH.singleHashMode - true to use single hash mode.| Method Detail |
|---|
public void init(CipherParameters key)
throws java.lang.IllegalArgumentException
init in interface KeyEncapsulationkey - 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 KeyEncapsulationout - 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 KeyEncapsulationin - 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.
|
Bouncy Castle Cryptography 1.50 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||