Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/java/security/interfaces/RSAKey#pubmethods)

# RSAKey

` public interface RSAKey `   
` `

|---|
| java.security.interfaces.RSAKey |

Known indirect subclasses [RSAMultiPrimePrivateCrtKey](https://developer.android.com/reference/java/security/interfaces/RSAMultiPrimePrivateCrtKey), [RSAPrivateCrtKey](https://developer.android.com/reference/java/security/interfaces/RSAPrivateCrtKey), [RSAPrivateKey](https://developer.android.com/reference/java/security/interfaces/RSAPrivateKey), [RSAPublicKey](https://developer.android.com/reference/java/security/interfaces/RSAPublicKey) [RSAMultiPrimePrivateCrtKey](https://developer.android.com/reference/java/security/interfaces/RSAMultiPrimePrivateCrtKey) The interface to an RSA multi-prime private key, as defined in the [PKCS#1 v2.2](https://tools.ietf.org/rfc/rfc8017.txt) standard, using the *Chinese Remainder Theorem* (CRT) information values. [RSAPrivateCrtKey](https://developer.android.com/reference/java/security/interfaces/RSAPrivateCrtKey) The interface to an RSA private key, as defined in the [PKCS#1 v2.2](https://tools.ietf.org/rfc/rfc8017.txt) standard, using the *Chinese Remainder Theorem* (CRT) information values. [RSAPrivateKey](https://developer.android.com/reference/java/security/interfaces/RSAPrivateKey) The interface to an RSA private key. [RSAPublicKey](https://developer.android.com/reference/java/security/interfaces/RSAPublicKey) The interface to an RSA public key.   

*** ** * ** ***

The interface to a public or private key in [PKCS#1 v2.2](https://tools.ietf.org/rfc/rfc8017.txt) standard, such as those for RSA, or RSASSA-PSS algorithms.
**See also:**

- `https://developer.android.com/reference/java/security/interfaces/RSAPublicKey`
- `https://developer.android.com/reference/java/security/interfaces/RSAPrivateKey`

## Summary

| ### Public methods ||
|---|---|
| ` abstract https://developer.android.com/reference/java/math/BigInteger` | ` https://developer.android.com/reference/java/security/interfaces/RSAKey#getModulus()() ` Returns the modulus. |
| ` default https://developer.android.com/reference/java/security/spec/AlgorithmParameterSpec` | ` https://developer.android.com/reference/java/security/interfaces/RSAKey#getParams()() ` Returns the parameters associated with this key. |

## Public methods

### getModulus

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract BigInteger getModulus ()
```

Returns the modulus.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/math/BigInteger` | the modulus <br /> |

### getParams

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AlgorithmParameterSpec getParams ()
```

Returns the parameters associated with this key. The parameters are optional and may be either explicitly specified or implicitly created during key pair generation.

<br />

##### Implementation Requirements:

- The default implementation returns `null`.

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/security/spec/AlgorithmParameterSpec` | the associated parameters, may be null <br /> |