1212class Constants extends \SimpleSAML \XML \Constants
1313{
1414 /**
15- * Digest algorithms
15+ * Symmetric key wrap algorithms
16+ */
17+ public const KEY_WRAP_3DES = 'http://www.w3.org/2001/04/xmlenc#kw-tripledes ' ;
18+ public const KEY_WRAP_AES128 = 'http://www.w3.org/2001/04/xmlenc#kw-aes128 ' ;
19+ public const KEY_WRAP_AES192 = 'http://www.w3.org/2001/04/xmlenc#kw-aes192 ' ;
20+ public const KEY_WRAP_AES256 = 'http://www.w3.org/2001/04/xmlenc#kw-aes256 ' ;
21+
22+ /** @var string[] */
23+ public static array $ KEY_WRAP_ALGORITHMS = [
24+ self ::KEY_WRAP_3DES ,
25+ self ::KEY_WRAP_AES128 ,
26+ self ::KEY_WRAP_AES192 ,
27+ self ::KEY_WRAP_AES256 ,
28+ ];
29+
30+
31+ /**
32+ * Key derivation algorithms
33+ */
34+ public const KEY_DERIVATION_CONCATKDF = 'http://www.w3.org/2009/xmlenc11#ConcatKDF ' ;
35+ public const KEY_DERIVATION_PBKDF2 = 'http://www.w3.org/2009/xmlenc11#pbkdf2 ' ;
36+
37+ /** @var string[] */
38+ public static array $ KEY_DERIVATION_ALGORITHMS = [
39+ self ::KEY_DERIVATION_CONCATKDF ,
40+ self ::KEY_DERIVATION_PBKDF2 ,
41+ ];
42+
43+
44+ /**
45+ * Key agreement algorithms
46+ */
47+ public const KEY_AGREEMENT_ECDH_ES = 'http://www.w3.org/2009/xmlenc11#ECDH-ES ' ;
48+ public const KEY_AGREEMENT_DH = 'http://www.w3.org/2001/04/xmlenc#dh ' ;
49+ public const KEY_AGREEMENT_DH_ES = 'http://www.w3.org/2009/xmlenc11#dh-es ' ;
50+
51+ /** @var string[] */
52+ public static array $ KEY_AGREEMENT_ALGORITHMS = [
53+ self ::KEY_AGREEMENT_ECDH_ES ,
54+ self ::KEY_AGREEMENT_DH ,
55+ self ::KEY_AGREEMENT_DH_ES ,
56+ ];
57+
58+
59+ /**
60+ * Message digest algorithms
1661 */
1762 public const DIGEST_SHA1 = 'http://www.w3.org/2000/09/xmldsig#sha1 ' ;
1863 public const DIGEST_SHA224 = 'http://www.w3.org/2001/04/xmldsig-more#sha224 ' ;
@@ -31,12 +76,14 @@ class Constants extends \SimpleSAML\XML\Constants
3176 self ::DIGEST_RIPEMD160 => 'ripemd160 ' ,
3277 ];
3378
79+
3480 /**
3581 * Padding schemas
3682 */
3783 public const PADDING_PKCS1 = "PKCS1 " ;
3884 public const PADDING_PKCS1_OAEP = "OAEP " ;
3985
86+
4087 /**
4188 * Block encryption algorithms
4289 */
@@ -81,6 +128,7 @@ class Constants extends \SimpleSAML\XML\Constants
81128 self ::BLOCK_ENC_AES256_GCM => 32 ,
82129 ];
83130
131+
84132 /**
85133 * Key transport algorithms
86134 */
@@ -95,13 +143,27 @@ class Constants extends \SimpleSAML\XML\Constants
95143 self ::KEY_TRANSPORT_OAEP_MGF1P ,
96144 ];
97145
146+
98147 /**
99148 * Canonicalization algorithms
100149 */
101150 public const C14N_INCLUSIVE_WITH_COMMENTS = 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments ' ;
102151 public const C14N_INCLUSIVE_WITHOUT_COMMENTS = 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315 ' ;
103152 public const C14N_EXCLUSIVE_WITH_COMMENTS = 'http://www.w3.org/2001/10/xml-exc-c14n#WithComments ' ;
104153 public const C14N_EXCLUSIVE_WITHOUT_COMMENTS = 'http://www.w3.org/2001/10/xml-exc-c14n# ' ;
154+ public const C14N11_INCLUSIVE_WITH_COMMENTS = 'http://www.w3.org/2006/12/xml-c14n11 ' ;
155+ public const C14N11_INCLUSIVE_WITHOUT_COMMENTS = 'http://www.w3.org/2006/12/xml-c14n11#WithComments ' ;
156+
157+ /** @var string[] */
158+ public static array $ CANONICALIZATION_ALGORITHMS = [
159+ self ::C14N_INCLUSIVE_WITH_COMMENTS ,
160+ self ::C14N_INCLUSIVE_WITHOUT_COMMENTS ,
161+ self ::C14N_EXCLUSIVE_WITH_COMMENTS ,
162+ self ::C14N_EXCLUSIVE_WITHOUT_COMMENTS ,
163+ self ::C14N11_INCLUSIVE_WITH_COMMENTS ,
164+ self ::C14N11_INCLUSIVE_WITHOUT_COMMENTS ,
165+ ];
166+
105167
106168 /**
107169 * Signature algorithms
@@ -139,6 +201,19 @@ class Constants extends \SimpleSAML\XML\Constants
139201 self ::SIG_HMAC_RIPEMD160 => self ::DIGEST_RIPEMD160 ,
140202 ];
141203
204+
205+ /**
206+ * Encoding algorithms
207+ */
208+ public const ENCODING_BASE64 = 'http://www.w3.org/2000/09/xmldsig#base64 ' ;
209+
210+
211+ /**
212+ * Transforms algorithms
213+ */
214+ public const TRANSFORMS_BASE64 = 'http://www.w3.org/2000/09/xmldsig#base64 ' ;
215+
216+
142217 /**
143218 * XML & XPath namespaces and identifiers
144219 */
@@ -153,7 +228,4 @@ class Constants extends \SimpleSAML\XML\Constants
153228 public const XMLENC_ELEMENT = 'http://www.w3.org/2001/04/xmlenc#Element ' ;
154229 public const XMLENC_ENCRYPTEDKEY = 'http://www.w3.org/2001/04/xmlenc#EncryptedKey ' ;
155230 public const XMLENC_EXI = 'http://www.w3.org/2009/xmlenc11#EXI ' ;
156-
157- // The namespace for the Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES) algorithm
158- public const XMLENC11_ECDH_ES = 'http://www.w3.org/2009/xmlenc11#ECDH-ES ' ;
159231}
0 commit comments