public class RSAPrivateCrtKeyImpl extends RSAKeyImpl implements javacard.security.RSAPrivateCrtKey
RSAPrivateCrtKey based
on BouncyCastle CryptoAPI.RSAPrivateCrtKey,
RSAPrivateCrtKeyParameters| Modifier and Type | Field and Description |
|---|---|
protected ByteContainer |
dp1 |
protected ByteContainer |
dq1 |
protected ByteContainer |
p |
protected ByteContainer |
pq |
protected ByteContainer |
q |
exponent, isPrivate, modulus| Constructor and Description |
|---|
RSAPrivateCrtKeyImpl(org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters params)
Construct and initialize rsa key with RSAPrivateCrtKeyParameters.
|
RSAPrivateCrtKeyImpl(short keySize)
Construct not-initialized rsa private crt key
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearKey() |
short |
getDP1(byte[] buffer,
short offset) |
short |
getDQ1(byte[] buffer,
short offset) |
short |
getP(byte[] buffer,
short offset) |
org.bouncycastle.crypto.CipherParameters |
getParameters()
Get
RSAKeyParameters |
short |
getPQ(byte[] buffer,
short offset) |
short |
getQ(byte[] buffer,
short offset) |
boolean |
isInitialized() |
void |
setDP1(byte[] buffer,
short offset,
short length) |
void |
setDQ1(byte[] buffer,
short offset,
short length) |
void |
setP(byte[] buffer,
short offset,
short length) |
void |
setParameters(org.bouncycastle.crypto.CipherParameters params)
Set cipher key for use with BouncyCastle Crypto API
|
void |
setPQ(byte[] buffer,
short offset,
short length) |
void |
setQ(byte[] buffer,
short offset,
short length) |
getExponent, getKeyGenerationParameters, getModulus, setExponent, setModulusprotected ByteContainer p
protected ByteContainer q
protected ByteContainer dp1
protected ByteContainer dq1
protected ByteContainer pq
public RSAPrivateCrtKeyImpl(short keySize)
keySize - key size it bits (modulus size)KeyBuilderpublic RSAPrivateCrtKeyImpl(org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters params)
params - key params from BouncyCastle APIKeyPair,
RSAPrivateCrtKeyParameterspublic void setParameters(org.bouncycastle.crypto.CipherParameters params)
KeyWithParameterssetParameters in interface KeyWithParameterssetParameters in class RSAKeyImplparams - key parameterspublic void setP(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setP in interface javacard.security.RSAPrivateCrtKeyjavacard.security.CryptoExceptionpublic void setQ(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setQ in interface javacard.security.RSAPrivateCrtKeyjavacard.security.CryptoExceptionpublic void setDP1(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setDP1 in interface javacard.security.RSAPrivateCrtKeyjavacard.security.CryptoExceptionpublic void setDQ1(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setDQ1 in interface javacard.security.RSAPrivateCrtKeyjavacard.security.CryptoExceptionpublic void setPQ(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setPQ in interface javacard.security.RSAPrivateCrtKeyjavacard.security.CryptoExceptionpublic short getP(byte[] buffer,
short offset)
getP in interface javacard.security.RSAPrivateCrtKeypublic short getQ(byte[] buffer,
short offset)
getQ in interface javacard.security.RSAPrivateCrtKeypublic short getDP1(byte[] buffer,
short offset)
getDP1 in interface javacard.security.RSAPrivateCrtKeypublic short getDQ1(byte[] buffer,
short offset)
getDQ1 in interface javacard.security.RSAPrivateCrtKeypublic short getPQ(byte[] buffer,
short offset)
getPQ in interface javacard.security.RSAPrivateCrtKeypublic void clearKey()
clearKey in interface javacard.security.KeyclearKey in class RSAKeyImplpublic boolean isInitialized()
isInitialized in interface javacard.security.KeyisInitialized in class RSAKeyImplpublic org.bouncycastle.crypto.CipherParameters getParameters()
RSAKeyImplRSAKeyParametersgetParameters in interface KeyWithParametersgetParameters in class RSAKeyImplRSAKeyParameters