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 |
|---|---|
| private static class | |
| public static enum | AsymmetricRSAKey.
Specific RSA key usages. |
| Modifier and Type | Field and Description |
|---|---|
| private Algorithm | |
| private final boolean | |
| protected static final AlgorithmIdentifier | |
| private final AsymmetricRSAKey. | |
| private static WeakHashMap | |
| protected BigInteger | |
| protected final AlgorithmIdentifier | |
| private static final Set |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the modulus is already associated with the usage, or has not being used already.usage for the RSA key. usageCheck to see if a key can be used for a specific usage. |
| protected final void | |
| public Algorithm | Returns: the key's algorithm.Implements org. |
| pack-priv static synchronized AsymmetricRSAKey. | |
| public BigInteger | |
| pack-priv static synchronized boolean | |
| protected void |
| algorithm | back to summary |
|---|---|
| private Algorithm algorithm | |
| approvedModeOnly | back to summary |
|---|---|
| private final boolean approvedModeOnly | |
| DEF_ALG_ID | back to summary |
|---|---|
| protected static final AlgorithmIdentifier DEF_ALG_ID | |
| keyMarker | back to summary |
|---|---|
| private final AsymmetricRSAKey. | |
| markers | back to summary |
|---|---|
| private static WeakHashMap<BigInteger, WeakReference<AsymmetricRSAKey. | |
| modulus | back to summary |
|---|---|
| protected BigInteger modulus | |
| rsaAlgIdentifier | back to summary |
|---|---|
| protected final AlgorithmIdentifier rsaAlgIdentifier | |
| rsaOids | back to summary |
|---|---|
| private static final Set<ASN1ObjectIdentifier> rsaOids | |
| AsymmetricRSAKey | back to summary |
|---|---|
| pack-priv AsymmetricRSAKey(Algorithm algorithm, BigInteger modulus) | |
| AsymmetricRSAKey | back to summary |
|---|---|
| pack-priv AsymmetricRSAKey(Algorithm algorithm, AlgorithmIdentifier rsaAlgIdentifier, BigInteger modulus) | |
| canBeUsed | back to summary |
|---|---|
| public boolean canBeUsed(AsymmetricRSAKey. Check to see if a key can be used for a specific usage. Essentially this will return false if the modulus is associated with a different usage already. The system property "org.bouncycastle.rsa.allow_multi_use" can be set to "true" to override this check.
| |
| checkApprovedOnlyModeStatus | back to summary |
|---|---|
| protected final void checkApprovedOnlyModeStatus() | |
| getAlgorithm | back to summary |
|---|---|
| public Algorithm getAlgorithm() Implements org. Return the algorithm this RSA key is for.
| |
| getKeyMarker | back to summary |
|---|---|
| pack-priv static synchronized AsymmetricRSAKey. | |
| getModulus | back to summary |
|---|---|
| public BigInteger getModulus() Return the modulus for this RSA key.
| |
| isAlreadySeen | back to summary |
|---|---|
| pack-priv static synchronized boolean isAlreadySeen(BigInteger modulus) | |
| zeroize | back to summary |
|---|---|
| protected void zeroize() | |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicReference | |
| private final BigInteger |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean |
| keyUsage | back to summary |
|---|---|
| private final AtomicReference<AsymmetricRSAKey. | |
| modulus | back to summary |
|---|---|
| private final BigInteger modulus | |
| KeyMarker | back to summary |
|---|---|
| pack-priv KeyMarker(BigInteger modulus) | |
| canBeUsed | back to summary |
|---|---|
| public boolean canBeUsed(AsymmetricRSAKey. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final AsymmetricRSAKey. | ENCRYPT_OR_DECRYPT
Key usage encryption or decryption. |
| public static final AsymmetricRSAKey. | SIGN_OR_VERIFY
Key usage signing or verification. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static AsymmetricRSAKey. | |
| public static AsymmetricRSAKey. |
| ENCRYPT_OR_DECRYPT | back to summary |
|---|---|
| public static final AsymmetricRSAKey. Key usage encryption or decryption. | |
| SIGN_OR_VERIFY | back to summary |
|---|---|
| public static final AsymmetricRSAKey. Key usage signing or verification. | |
| Usage | back to summary |
|---|---|
| private Usage() | |
| valueOf | back to summary |
|---|---|
| public static AsymmetricRSAKey. | |
| values | back to summary |
|---|---|
| public static AsymmetricRSAKey. | |