public abstract class AsymmetricRSAKey extends java.lang.Object implements AsymmetricKey
Note: the module attempts to prevent accidental recent use of RSA keys for signing and encryption purposes by associating a specific usage with a modulus. If the module is not running in approved mode this behavior can be overridden by setting the system property "org.bouncycastle.rsa.allow_multi_use" to "true".
Modifier and Type | Class and Description |
---|---|
static class |
AsymmetricRSAKey.Usage
Specific RSA key usages.
|
Modifier and Type | Field and Description |
---|---|
protected static AlgorithmIdentifier |
DEF_ALG_ID |
protected java.math.BigInteger |
modulus |
protected static AlgorithmIdentifier |
PSS_ALG_ID |
protected AlgorithmIdentifier |
rsaAlgIdentifier |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeUsed(AsymmetricRSAKey.Usage usage)
Check to see if a key can be used for a specific usage.
|
protected void |
checkApprovedOnlyModeStatus() |
Algorithm |
getAlgorithm()
Return the algorithm this RSA key is for.
|
java.math.BigInteger |
getModulus()
Return the modulus for this RSA key.
|
protected boolean |
isThreadCorrectMode() |
protected void |
zeroize() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEncoded
protected static final AlgorithmIdentifier DEF_ALG_ID
protected static final AlgorithmIdentifier PSS_ALG_ID
protected java.math.BigInteger modulus
protected final AlgorithmIdentifier rsaAlgIdentifier
public Algorithm getAlgorithm()
getAlgorithm
in interface Key
public java.math.BigInteger getModulus()
public boolean canBeUsed(AsymmetricRSAKey.Usage usage)
usage
- usage for the RSA key.protected void zeroize()
protected final boolean isThreadCorrectMode()
protected final void checkApprovedOnlyModeStatus()