| | | 1 | | |
| | | 2 | | using System.Text.Json.Serialization; |
| | | 3 | | |
| | | 4 | | namespace Kestrun.Certificates; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// Represents an RSA JSON Web Key (JWK). |
| | | 8 | | /// </summary> |
| | | 9 | | public sealed class RsaJwk |
| | | 10 | | { |
| | | 11 | | /// <summary> |
| | | 12 | | /// Key Type - should be "RSA" |
| | | 13 | | /// </summary> |
| | | 14 | | [JsonPropertyName("kty")] |
| | 0 | 15 | | public string Kty { get; set; } = "RSA"; |
| | | 16 | | |
| | | 17 | | /// <summary> |
| | | 18 | | /// Modulus |
| | | 19 | | /// </summary> |
| | | 20 | | [JsonPropertyName("n")] |
| | 0 | 21 | | public string? N { get; set; } |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Exponent |
| | | 25 | | /// </summary> |
| | | 26 | | [JsonPropertyName("e")] |
| | 0 | 27 | | public string? E { get; set; } |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// Private Exponent |
| | | 31 | | /// </summary> |
| | | 32 | | [JsonPropertyName("d")] |
| | 0 | 33 | | public string? D { get; set; } |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// First Prime Factor |
| | | 37 | | /// </summary> |
| | | 38 | | [JsonPropertyName("p")] |
| | 0 | 39 | | public string? P { get; set; } |
| | | 40 | | |
| | | 41 | | /// <summary> |
| | | 42 | | /// Second Prime Factor |
| | | 43 | | /// </summary> |
| | | 44 | | [JsonPropertyName("q")] |
| | 0 | 45 | | public string? Q { get; set; } |
| | | 46 | | |
| | | 47 | | /// <summary> |
| | | 48 | | /// First Factor CRT Exponent |
| | | 49 | | /// </summary> |
| | | 50 | | [JsonPropertyName("dp")] |
| | 0 | 51 | | public string? DP { get; set; } |
| | | 52 | | |
| | | 53 | | /// <summary> |
| | | 54 | | /// Second Factor CRT Exponent |
| | | 55 | | /// </summary> |
| | | 56 | | [JsonPropertyName("dq")] |
| | 0 | 57 | | public string? DQ { get; set; } |
| | | 58 | | |
| | | 59 | | /// <summary> |
| | | 60 | | /// CRT Coefficient |
| | | 61 | | /// </summary> |
| | | 62 | | [JsonPropertyName("qi")] |
| | 0 | 63 | | public string? QI { get; set; } |
| | | 64 | | |
| | | 65 | | /// <summary> |
| | | 66 | | /// Key ID |
| | | 67 | | /// </summary> |
| | | 68 | | [JsonPropertyName("kid")] |
| | 0 | 69 | | public string? Kid { get; set; } |
| | | 70 | | } |