public abstract class DHKeyImpl extends KeyImpl implements javacard.security.DHKey
| Modifier and Type | Field and Description |
|---|---|
protected ByteContainer |
g |
static short |
LENGTH_DH_1536 |
protected ByteContainer |
p |
protected ByteContainer |
q |
static org.bouncycastle.crypto.params.DHParameters |
rfc2409_1024 |
static org.bouncycastle.crypto.params.DHParameters |
rfc3526_1536 |
static org.bouncycastle.crypto.params.DHParameters |
rfc3526_2048 |
| Constructor and Description |
|---|
DHKeyImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearKey() |
short |
getG(byte[] bytes,
short offset) |
org.bouncycastle.crypto.KeyGenerationParameters |
getKeyGenerationParameters(SecureRandom rnd)
Get keypair generation parameters for use with BouncyCastle Crypto API
|
short |
getP(byte[] bytes,
short offset) |
org.bouncycastle.crypto.CipherParameters |
getParameters()
Get cipher key parameters for use with BouncyCastle Crypto API
|
short |
getQ(byte[] bytes,
short offset) |
boolean |
isInitialized() |
void |
setG(byte[] bytes,
short offset,
short length) |
void |
setP(byte[] bytes,
short offset,
short length) |
void |
setParameters(org.bouncycastle.crypto.CipherParameters params)
Set cipher key for use with BouncyCastle Crypto API
|
void |
setQ(byte[] bytes,
short offset,
short length) |
public static final short LENGTH_DH_1536
protected ByteContainer p
protected ByteContainer q
protected ByteContainer g
public static final org.bouncycastle.crypto.params.DHParameters rfc2409_1024
public static final org.bouncycastle.crypto.params.DHParameters rfc3526_1536
public static final org.bouncycastle.crypto.params.DHParameters rfc3526_2048
public void setParameters(org.bouncycastle.crypto.CipherParameters params)
KeyWithParameterssetParameters in interface KeyWithParametersparams - key parameterspublic org.bouncycastle.crypto.CipherParameters getParameters()
KeyWithParametersgetParameters in interface KeyWithParameterspublic void setP(byte[] bytes,
short offset,
short length)
throws javacard.security.CryptoException
setP in interface javacard.security.DHKeyjavacard.security.CryptoExceptionpublic void setQ(byte[] bytes,
short offset,
short length)
throws javacard.security.CryptoException
setQ in interface javacard.security.DHKeyjavacard.security.CryptoExceptionpublic void setG(byte[] bytes,
short offset,
short length)
throws javacard.security.CryptoException
setG in interface javacard.security.DHKeyjavacard.security.CryptoExceptionpublic short getP(byte[] bytes,
short offset)
getP in interface javacard.security.DHKeypublic short getQ(byte[] bytes,
short offset)
getQ in interface javacard.security.DHKeypublic short getG(byte[] bytes,
short offset)
getG in interface javacard.security.DHKeypublic void clearKey()
clearKey in interface javacard.security.Keypublic boolean isInitialized()
isInitialized in interface javacard.security.Keypublic org.bouncycastle.crypto.KeyGenerationParameters getKeyGenerationParameters(SecureRandom rnd)
KeyWithParametersgetKeyGenerationParameters in interface KeyWithParametersrnd - Secure Random Generator