public abstract class ECKeyImpl extends KeyImpl implements javacard.security.ECKey
ECPublicKeyImpl/ECPrivateKeyImpl on BouncyCastle CryptoAPI.ECKey| Modifier and Type | Field and Description |
|---|---|
protected ByteContainer |
a |
protected ByteContainer |
b |
protected short |
e1 |
protected short |
e2 |
protected short |
e3 |
protected ByteContainer |
fp |
protected ByteContainer |
g |
protected boolean |
isKInitialized |
protected short |
k |
protected ByteContainer |
r |
| Constructor and Description |
|---|
ECKeyImpl(byte keyType,
short keySize)
Construct not-initialized ecc key
|
ECKeyImpl(org.bouncycastle.crypto.params.ECKeyParameters parameters)
Construct and initialize ecc key with ECKeyParameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearKey() |
void |
copyDomainParametersFrom(javacard.security.ECKey eckey) |
short |
getA(byte[] buffer,
short offset) |
short |
getB(byte[] buffer,
short offset) |
org.bouncycastle.crypto.params.ECDomainParameters |
getDomainParameters()
Get
ECDomainParameters |
short |
getField(byte[] buffer,
short offset) |
short |
getG(byte[] buffer,
short offset) |
short |
getK() |
org.bouncycastle.crypto.KeyGenerationParameters |
getKeyGenerationParameters(SecureRandom rnd)
Get
ECKeyGenerationParameters |
short |
getR(byte[] buffer,
short offset) |
protected boolean |
isDomainParametersInitialized() |
void |
setA(byte[] buffer,
short offset,
short length) |
void |
setB(byte[] buffer,
short offset,
short length) |
void |
setFieldF2M(short e) |
void |
setFieldF2M(short e1,
short e2,
short e3) |
void |
setFieldFP(byte[] buffer,
short offset,
short length) |
void |
setG(byte[] buffer,
short offset,
short length) |
void |
setK(short K) |
void |
setR(byte[] buffer,
short offset,
short length) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParameters, setParametersprotected ByteContainer a
protected ByteContainer b
protected ByteContainer g
protected ByteContainer r
protected ByteContainer fp
protected short k
protected short e1
protected short e2
protected short e3
protected boolean isKInitialized
public ECKeyImpl(byte keyType,
short keySize)
keyType - - key typekeySize - - key size in bitsKeyPair,
KeyBuilderpublic ECKeyImpl(org.bouncycastle.crypto.params.ECKeyParameters parameters)
parameters - key params from BouncyCastle APIKeyPair,
ECKeyParameterspublic void clearKey()
clearKey in interface javacard.security.Keyprotected boolean isDomainParametersInitialized()
public void setFieldFP(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setFieldFP in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic void setFieldF2M(short e)
throws javacard.security.CryptoException
setFieldF2M in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic void setFieldF2M(short e1,
short e2,
short e3)
throws javacard.security.CryptoException
setFieldF2M in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic void setA(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setA in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic void setB(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setB in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic void setG(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setG in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic void setR(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setR in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic void setK(short K)
setK in interface javacard.security.ECKeypublic short getField(byte[] buffer,
short offset)
throws javacard.security.CryptoException
getField in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic short getA(byte[] buffer,
short offset)
throws javacard.security.CryptoException
getA in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic short getB(byte[] buffer,
short offset)
throws javacard.security.CryptoException
getB in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic short getG(byte[] buffer,
short offset)
throws javacard.security.CryptoException
getG in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic short getR(byte[] buffer,
short offset)
throws javacard.security.CryptoException
getR in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic short getK()
throws javacard.security.CryptoException
getK in interface javacard.security.ECKeyjavacard.security.CryptoExceptionpublic org.bouncycastle.crypto.params.ECDomainParameters getDomainParameters()
ECDomainParametersECDomainParameterspublic org.bouncycastle.crypto.KeyGenerationParameters getKeyGenerationParameters(SecureRandom rnd)
ECKeyGenerationParametersgetKeyGenerationParameters in interface KeyWithParametersrnd - Secure Random Generatorpublic void copyDomainParametersFrom(javacard.security.ECKey eckey)
throws javacard.security.CryptoException
copyDomainParametersFrom in interface javacard.security.ECKeyjavacard.security.CryptoException