#### [Abblix\.Jwt](https://www.abblix.com/en/docs/api/abblix-jwt 'index')
### [Abblix\.Jwt](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt 'Abblix\.Jwt')

## RsaJsonWebKey Class

Represents an RSA JSON Web Key \(JWK\) containing RSA\-specific cryptographic parameters\.
Supports both public and private RSA keys per RFC 7518 Section 6\.3\.

```csharp
public sealed record RsaJsonWebKey : Abblix.Jwt.JsonWebKey, System.IEquatable<Abblix.Jwt.RsaJsonWebKey>
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → [JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey') → RsaJsonWebKey

Implements [System\.IEquatable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.iequatable-1 'System\.IEquatable\`1')[RsaJsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.RsaJsonWebKey 'Abblix\.Jwt\.RsaJsonWebKey')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.iequatable-1 'System\.IEquatable\`1')
### Properties

## RsaJsonWebKey\.Exponent Property {#Abblix.Jwt.RsaJsonWebKey.Exponent}

RSA Public Key Exponent \(e\)\. Part of the RSA public key\.
This is a required parameter for RSA public keys\.

```csharp
public byte[]? Exponent { get; set; }
```

#### Property Value
[System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

## RsaJsonWebKey\.FirstCrtCoefficient Property {#Abblix.Jwt.RsaJsonWebKey.FirstCrtCoefficient}

RSA First CRT Coefficient \(qi\)\. Part of the RSA private key in CRT format\.
Computed as q^\(\-1\) mod p, the modular multiplicative inverse of q modulo p\.

```csharp
public byte[]? FirstCrtCoefficient { get; set; }
```

#### Property Value
[System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

## RsaJsonWebKey\.FirstFactorCrtExponent Property {#Abblix.Jwt.RsaJsonWebKey.FirstFactorCrtExponent}

RSA First Factor CRT Exponent \(dp\)\. Part of the RSA private key in Chinese Remainder Theorem \(CRT\) format\.
Computed as d mod \(p\-1\), where d is the private exponent and p is the first prime factor\.

```csharp
public byte[]? FirstFactorCrtExponent { get; set; }
```

#### Property Value
[System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

## RsaJsonWebKey\.FirstPrimeFactor Property {#Abblix.Jwt.RsaJsonWebKey.FirstPrimeFactor}

RSA First Prime Factor \(p\)\. Part of the RSA private key\.
Used in Chinese Remainder Theorem \(CRT\) optimization for RSA operations\.

```csharp
public byte[]? FirstPrimeFactor { get; set; }
```

#### Property Value
[System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

## RsaJsonWebKey\.HasPrivateKey Property {#Abblix.Jwt.RsaJsonWebKey.HasPrivateKey}

Checks if the key contains private key material\.

```csharp
public override bool HasPrivateKey { get; }
```

#### Property Value
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')

## RsaJsonWebKey\.HasPublicKey Property {#Abblix.Jwt.RsaJsonWebKey.HasPublicKey}

Checks if the key contains public key material\.

```csharp
public override bool HasPublicKey { get; }
```

#### Property Value
[System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean')

## RsaJsonWebKey\.KeyType Property {#Abblix.Jwt.RsaJsonWebKey.KeyType}

The key type identifier for RSA keys\. Always returns "RSA"\.

```csharp
public override string KeyType { get; }
```

#### Property Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')

## RsaJsonWebKey\.Modulus Property {#Abblix.Jwt.RsaJsonWebKey.Modulus}

RSA Public Key Modulus \(n\)\. Part of the RSA public key\.
This is a required parameter for RSA public keys\.

```csharp
public byte[]? Modulus { get; set; }
```

#### Property Value
[System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

## RsaJsonWebKey\.PrivateExponent Property {#Abblix.Jwt.RsaJsonWebKey.PrivateExponent}

RSA Private Exponent \(d\)\. Part of the RSA private key\.
This parameter must be kept confidential and should only be present in private keys\.

```csharp
public byte[]? PrivateExponent { get; set; }
```

#### Property Value
[System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

## RsaJsonWebKey\.SecondFactorCrtExponent Property {#Abblix.Jwt.RsaJsonWebKey.SecondFactorCrtExponent}

RSA Second Factor CRT Exponent \(dq\)\. Part of the RSA private key in CRT format\.
Computed as d mod \(q\-1\), where d is the private exponent and q is the second prime factor\.

```csharp
public byte[]? SecondFactorCrtExponent { get; set; }
```

#### Property Value
[System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')

## RsaJsonWebKey\.SecondPrimeFactor Property {#Abblix.Jwt.RsaJsonWebKey.SecondPrimeFactor}

RSA Second Prime Factor \(q\)\. Part of the RSA private key\.
Used in Chinese Remainder Theorem \(CRT\) optimization for RSA operations\.

```csharp
public byte[]? SecondPrimeFactor { get; set; }
```

#### Property Value
[System\.Byte](https://learn.microsoft.com/en-us/dotnet/api/system.byte 'System\.Byte')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')
### Methods

## RsaJsonWebKey\.Sanitize\(bool\) Method {#Abblix.Jwt.RsaJsonWebKey.Sanitize(bool)}

Prepares a sanitized version of the RSA JWK that excludes private key information unless explicitly included\.

```csharp
public override Abblix.Jwt.JsonWebKey Sanitize(bool includePrivateKeys);
```
#### Parameters

###### `includePrivateKeys` [System\.Boolean](https://learn.microsoft.com/en-us/dotnet/api/system.boolean 'System\.Boolean') {#Abblix.Jwt.RsaJsonWebKey.Sanitize(bool).includePrivateKeys}

Whether to include private key data in the sanitized output\.

#### Returns
[JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey')  
A new instance of [RsaJsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.RsaJsonWebKey 'Abblix\.Jwt\.RsaJsonWebKey') with or without private key data based on the input parameter\.

#### Exceptions

[System\.InvalidOperationException](https://learn.microsoft.com/en-us/dotnet/api/system.invalidoperationexception 'System\.InvalidOperationException')  
Thrown when includePrivateKeys is true but the key contains no private key data\.
