1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
namespace DotNetOpenAuth.OAuth2.Crypto {
internal static class JsonWebSignatureAlgorithms {
/// <summary>
/// HMAC using SHA-256 hash algorithm.
/// </summary>
internal const string HmacSha256 = "HS256";
/// <summary>
/// HMAC using SHA-384 hash algorithm.
/// </summary>
internal const string HmacSha384 = "HS384";
/// <summary>
/// HMAC using SHA-512 hash algorithm.
/// </summary>
internal const string HmacSha512 = "HS512";
/// <summary>
/// RSA using SHA-256 hash algorithm.
/// </summary>
internal const string RsaSha256 = "RS256";
/// <summary>
/// RSA using SHA-384 hash algorithm.
/// </summary>
internal const string RsaSha384 = "RS384";
/// <summary>
/// RSA using SHA-512 hash algorithm.
/// </summary>
internal const string RsaSha512 = "RS512";
/// <summary>
/// ECDSA using P-256 curve and SHA-256 hash algorithm.
/// </summary>
internal const string ECDsaSha256 = "ES256";
/// <summary>
/// ECDSA using P-384 curve and SHA-384 hash algorithm.
/// </summary>
internal const string ECDsaSha384 = "ES384";
/// <summary>
/// ECDSA using P-521 curve and SHA-512 hash algorithm.
/// </summary>
internal const string ECDsaSha512 = "ES512";
/// <summary>
/// No digital signature or HMAC value included.
/// </summary>
internal const string None = "none";
}
/// <summary>
/// The set of alg (algorithm) header parameter values that are defined by this
/// specification for use with JWE. These algorithms are used to encrypt the CEK,
/// which produces the JWE Encrypted Key.
/// </summary>
/// <remarks>
/// http://self-issued.info/docs/draft-ietf-jose-json-web-algorithms-01.html#EncAlgTable
/// </remarks>
internal static class JsonWebEncryptionAlgorithms {
/// <summary>
/// RSA using RSA-PKCS1-1.5 padding, as defined in RFC 3447 [RFC3447]
/// </summary>
internal const string RSA1_5 = "RSA1_5";
/// <summary>
/// RSA using Optimal Asymmetric Encryption Padding (OAEP), as defined in RFC 3447 [RFC3447]
/// </summary>
internal const string RSA_OAEP = "RSA-OAEP";
/// <summary>
/// Elliptic Curve Diffie-Hellman Ephemeral Static, as defined in RFC 6090
/// [RFC6090], and using the Concat KDF, as defined in [NIST‑800‑56A],
/// where the Digest Method is SHA-256 and all OtherInfo parameters are
/// the empty bit string
/// </summary>
internal const string ECDH_ES = "ECDH-ES";
/// <summary>
/// Advanced Encryption Standard (AES) Key Wrap Algorithm using 128 bit keys,
/// as defined in RFC 3394 [RFC3394]
/// </summary>
internal const string A128KW = "A128KW";
/// <summary>
/// Advanced Encryption Standard (AES) Key Wrap Algorithm using 256 bit keys,
/// as defined in RFC 3394 [RFC3394]
/// </summary>
internal const string A256KW = "A256KW";
/// <summary>
/// Advanced Encryption Standard (AES) Key Wrap Algorithm using 512 bit keys,
/// as defined in RFC 3394 [RFC3394]
/// </summary>
internal const string A512KW = "A512KW";
/// <summary>
/// Advanced Encryption Standard (AES) using 128 bit keys in Galois/Counter
/// Mode, as defined in [FIPS‑197] and [NIST‑800‑38D]
/// </summary>
internal const string A128GCM = "A128GCM";
/// <summary>
/// Advanced Encryption Standard (AES) using 256 bit keys in Galois/Counter
/// Mode, as defined in [FIPS‑197] and [NIST‑800‑38D]
/// </summary>
internal const string A256GCM = "A256GCM";
}
/// <summary>
/// The set of enc (encryption method) header parameter values that are defined
/// by this specification for use with JWE. These algorithms are used to encrypt
/// the Plaintext, which produces the Ciphertext.
/// </summary>
/// <remarks>
/// http://self-issued.info/docs/draft-ietf-jose-json-web-algorithms-01.html#EncTable
/// </remarks>
internal static class JsonWebEncryptionMethods {
/// <summary>
/// Advanced Encryption Standard (AES) using 128 bit keys in Cipher Block Chaining mode, as defined in [FIPS‑197] and [NIST‑800‑38A]
/// </summary>
internal const string A128CBC = "A128CBC";
/// <summary>
/// Advanced Encryption Standard (AES) using 256 bit keys in Cipher Block Chaining mode, as defined in [FIPS‑197] and [NIST‑800‑38A]
/// </summary>
internal const string A256CBC = "A256CBC";
/// <summary>
/// Advanced Encryption Standard (AES) using 128 bit keys in Galois/Counter Mode, as defined in [FIPS‑197] and [NIST‑800‑38D]
/// </summary>
internal const string A128GCM = "A128GCM";
/// <summary>
/// Advanced Encryption Standard (AES) using 256 bit keys in Galois/Counter Mode, as defined in [FIPS‑197] and [NIST‑800‑38D]
/// </summary>
internal const string A256GCM = "A256GCM";
}
}
|