001: package org.bouncycastle.jce.provider.symmetric;
002:
003: import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
004:
005: import java.util.HashMap;
006:
007: public class AESMappings extends HashMap {
008: /**
009: * These three got introduced in some messages as a result of a typo in an
010: * early document. We don't produce anything using these OID values, but we'll
011: * read them.
012: */
013: private static final String wrongAES128 = "2.16.840.1.101.3.4.2";
014: private static final String wrongAES192 = "2.16.840.1.101.3.4.22";
015: private static final String wrongAES256 = "2.16.840.1.101.3.4.42";
016:
017: public AESMappings() {
018: put("AlgorithmParameters.AES",
019: "org.bouncycastle.jce.provider.symmetric.AES$AlgParams");
020: put("Alg.Alias.AlgorithmParameters." + wrongAES128, "AES");
021: put("Alg.Alias.AlgorithmParameters." + wrongAES192, "AES");
022: put("Alg.Alias.AlgorithmParameters." + wrongAES256, "AES");
023: put("Alg.Alias.AlgorithmParameters."
024: + NISTObjectIdentifiers.id_aes128_CBC, "AES");
025: put("Alg.Alias.AlgorithmParameters."
026: + NISTObjectIdentifiers.id_aes192_CBC, "AES");
027: put("Alg.Alias.AlgorithmParameters."
028: + NISTObjectIdentifiers.id_aes256_CBC, "AES");
029:
030: put("AlgorithmParameterGenerator.AES",
031: "org.bouncycastle.jce.provider.symmetric.AES$AlgParamGen");
032: put("Alg.Alias.AlgorithmParameterGenerator." + wrongAES128,
033: "AES");
034: put("Alg.Alias.AlgorithmParameterGenerator." + wrongAES192,
035: "AES");
036: put("Alg.Alias.AlgorithmParameterGenerator." + wrongAES256,
037: "AES");
038: put("Alg.Alias.AlgorithmParameterGenerator."
039: + NISTObjectIdentifiers.id_aes128_CBC, "AES");
040: put("Alg.Alias.AlgorithmParameterGenerator."
041: + NISTObjectIdentifiers.id_aes192_CBC, "AES");
042: put("Alg.Alias.AlgorithmParameterGenerator."
043: + NISTObjectIdentifiers.id_aes256_CBC, "AES");
044:
045: put("Cipher.AES",
046: "org.bouncycastle.jce.provider.symmetric.AES$ECB");
047: put("Alg.Alias.Cipher." + wrongAES128, "AES");
048: put("Alg.Alias.Cipher." + wrongAES192, "AES");
049: put("Alg.Alias.Cipher." + wrongAES256, "AES");
050: put("Cipher." + NISTObjectIdentifiers.id_aes128_ECB,
051: "org.bouncycastle.jce.provider.symmetric.AES$ECB");
052: put("Cipher." + NISTObjectIdentifiers.id_aes192_ECB,
053: "org.bouncycastle.jce.provider.symmetric.AES$ECB");
054: put("Cipher." + NISTObjectIdentifiers.id_aes256_ECB,
055: "org.bouncycastle.jce.provider.symmetric.AES$ECB");
056: put("Cipher." + NISTObjectIdentifiers.id_aes128_CBC,
057: "org.bouncycastle.jce.provider.symmetric.AES$CBC");
058: put("Cipher." + NISTObjectIdentifiers.id_aes192_CBC,
059: "org.bouncycastle.jce.provider.symmetric.AES$CBC");
060: put("Cipher." + NISTObjectIdentifiers.id_aes256_CBC,
061: "org.bouncycastle.jce.provider.symmetric.AES$CBC");
062: put("Cipher." + NISTObjectIdentifiers.id_aes128_OFB,
063: "org.bouncycastle.jce.provider.symmetric.AES$OFB");
064: put("Cipher." + NISTObjectIdentifiers.id_aes192_OFB,
065: "org.bouncycastle.jce.provider.symmetric.AES$OFB");
066: put("Cipher." + NISTObjectIdentifiers.id_aes256_OFB,
067: "org.bouncycastle.jce.provider.symmetric.AES$OFB");
068: put("Cipher." + NISTObjectIdentifiers.id_aes128_CFB,
069: "org.bouncycastle.jce.provider.symmetric.AES$CFB");
070: put("Cipher." + NISTObjectIdentifiers.id_aes192_CFB,
071: "org.bouncycastle.jce.provider.symmetric.AES$CFB");
072: put("Cipher." + NISTObjectIdentifiers.id_aes256_CFB,
073: "org.bouncycastle.jce.provider.symmetric.AES$CFB");
074: put("Cipher.AESWRAP",
075: "org.bouncycastle.jce.provider.symmetric.AES$Wrap");
076: put("Alg.Alias.Cipher." + NISTObjectIdentifiers.id_aes128_wrap,
077: "AESWRAP");
078: put("Alg.Alias.Cipher." + NISTObjectIdentifiers.id_aes192_wrap,
079: "AESWRAP");
080: put("Alg.Alias.Cipher." + NISTObjectIdentifiers.id_aes256_wrap,
081: "AESWRAP");
082: put("Cipher.AESRFC3211WRAP",
083: "org.bouncycastle.jce.provider.symmetric.AES$RFC3211Wrap");
084:
085: put("KeyGenerator.AES",
086: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen");
087: put("KeyGenerator.2.16.840.1.101.3.4.2",
088: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen128");
089: put("KeyGenerator.2.16.840.1.101.3.4.22",
090: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen192");
091: put("KeyGenerator.2.16.840.1.101.3.4.42",
092: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen256");
093: put("KeyGenerator." + NISTObjectIdentifiers.id_aes128_ECB,
094: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen128");
095: put("KeyGenerator." + NISTObjectIdentifiers.id_aes128_CBC,
096: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen128");
097: put("KeyGenerator." + NISTObjectIdentifiers.id_aes128_OFB,
098: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen128");
099: put("KeyGenerator." + NISTObjectIdentifiers.id_aes128_CFB,
100: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen128");
101: put("KeyGenerator." + NISTObjectIdentifiers.id_aes192_ECB,
102: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen192");
103: put("KeyGenerator." + NISTObjectIdentifiers.id_aes192_CBC,
104: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen192");
105: put("KeyGenerator." + NISTObjectIdentifiers.id_aes192_OFB,
106: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen192");
107: put("KeyGenerator." + NISTObjectIdentifiers.id_aes192_CFB,
108: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen192");
109: put("KeyGenerator." + NISTObjectIdentifiers.id_aes256_ECB,
110: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen256");
111: put("KeyGenerator." + NISTObjectIdentifiers.id_aes256_CBC,
112: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen256");
113: put("KeyGenerator." + NISTObjectIdentifiers.id_aes256_OFB,
114: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen256");
115: put("KeyGenerator." + NISTObjectIdentifiers.id_aes256_CFB,
116: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen256");
117: put("KeyGenerator.AESWRAP",
118: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen");
119: put("KeyGenerator." + NISTObjectIdentifiers.id_aes128_wrap,
120: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen128");
121: put("KeyGenerator." + NISTObjectIdentifiers.id_aes192_wrap,
122: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen192");
123: put("KeyGenerator." + NISTObjectIdentifiers.id_aes256_wrap,
124: "org.bouncycastle.jce.provider.symmetric.AES$KeyGen256");
125: }
126: }
|