View Javadoc

1   /*
2    * Copyright [2006] [University Corporation for Advanced Internet Development, Inc.]
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.opensaml.xml.encryption;
18  
19  import org.opensaml.xml.util.XMLConstants;
20  
21  /**
22   * Constants defined in or related to the XML Encryption specification, version 20021210.
23   */
24  public class EncryptionConstants {
25      
26      // *********************************************************
27      // URI values which represent type attribute values
28      // *********************************************************
29      /** URI for Content. */
30      public static final String TYPE_CONTENT                = XMLConstants.XMLENC_NS + "Content";
31      
32      /** URI for Element. */
33      public static final String TYPE_ELEMENT                = XMLConstants.XMLENC_NS + "Element";
34      
35      /** URI for EncryptionProperties. */
36      public static final String TYPE_ENCRYPTION_PROPERTIES =  XMLConstants.XMLENC_NS + "EncryptionProperties";
37      
38      /** URI for EncryptedKey. */
39      public static final String TYPE_ENCRYPTED_KEY          = XMLConstants.XMLENC_NS + "EncryptedKey";
40      
41      /** URI for DHKeyValue. */
42      public static final String TYPE_KEYINFO_DH_KEYVALUE =  XMLConstants.XMLENC_NS + "DHKeyValue";
43      
44  
45      // *************************************************
46      // Block encryption algorithms
47      // *************************************************
48      /** Block Encryption - REQUIRED TRIPLEDES. */
49      public static final String ALGO_ID_BLOCKCIPHER_TRIPLEDES = XMLConstants.XMLENC_NS + "tripledes-cbc";
50      
51      /** Block Encryption - REQUIRED AES-128. */
52      public static final String ALGO_ID_BLOCKCIPHER_AES128 = XMLConstants.XMLENC_NS + "aes128-cbc";
53      
54      /** Block Encryption - REQUIRED AES-256. */
55      public static final String ALGO_ID_BLOCKCIPHER_AES256 = XMLConstants.XMLENC_NS + "aes256-cbc";
56      
57      /** Block Encryption - OPTIONAL AES-192. */
58      public static final String ALGO_ID_BLOCKCIPHER_AES192 = XMLConstants.XMLENC_NS + "aes192-cbc";
59  
60      // *************************************************
61      // Key Transport
62      // *************************************************
63      /** Key Transport - REQUIRED RSA-v1.5. */
64      public static final String ALGO_ID_KEYTRANSPORT_RSA15 = XMLConstants.XMLENC_NS + "rsa-1_5";
65      
66      /** Key Transport - REQUIRED RSA-OAEP.  */
67      public static final String ALGO_ID_KEYTRANSPORT_RSAOAEP = XMLConstants.XMLENC_NS + "rsa-oaep-mgf1p";
68  
69      // *************************************************
70      // Key Agreement
71      // *************************************************
72      /** Key Agreement - OPTIONAL Diffie-Hellman. */
73      public static final String ALGO_ID_KEYAGREEMENT_DH = XMLConstants.XMLENC_NS + "dh";
74  
75      // *************************************************
76      // Symmetric Key Wrap
77      // *************************************************
78      /** Symmetric Key Wrap - REQUIRED TRIPLEDES KeyWrap. */
79      public static final String ALGO_ID_KEYWRAP_TRIPLEDES = XMLConstants.XMLENC_NS + "kw-tripledes";
80      
81      /** Symmetric Key Wrap - REQUIRED AES-128 KeyWrap. */
82      public static final String ALGO_ID_KEYWRAP_AES128 = XMLConstants.XMLENC_NS + "kw-aes128";
83      
84      /** Symmetric Key Wrap - REQUIRED AES-256 KeyWrap. */
85      public static final String ALGO_ID_KEYWRAP_AES256 = XMLConstants.XMLENC_NS + "kw-aes256";
86      
87      /** Symmetric Key Wrap - OPTIONAL AES-192 KeyWrap. */
88      public static final String ALGO_ID_KEYWRAP_AES192 = XMLConstants.XMLENC_NS + "kw-aes192";
89  
90      // *************************************************
91      // Message Digest
92      // *************************************************
93      /** Message Digest - RECOMMENDED SHA256. */
94      public static final String ALGO_ID_DIGEST_SHA256 = XMLConstants.XMLENC_NS + "sha256";
95      
96      /** Message Digest - OPTIONAL SHA512. */
97      public static final String ALGO_ID_DIGEST_SHA512 = XMLConstants.XMLENC_NS + "sha512";
98      
99      /** Message Digest - OPTIONAL RIPEMD-160. */
100     public static final String ALGO_ID_DIGEST_RIPEMD160 = XMLConstants.XMLENC_NS + "ripemd160";
101 
102 }