001    /**
002     *
003     *  Licensed to the Apache Software Foundation (ASF) under one or more
004     *  contributor license agreements.  See the NOTICE file distributed with
005     *  this work for additional information regarding copyright ownership.
006     *  The ASF licenses this file to You under the Apache License, Version 2.0
007     *  (the "License"); you may not use this file except in compliance with
008     *  the License.  You may obtain a copy of the License at
009     *
010     *     http://www.apache.org/licenses/LICENSE-2.0
011     *
012     *  Unless required by applicable law or agreed to in writing, software
013     *  distributed under the License is distributed on an "AS IS" BASIS,
014     *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015     *  See the License for the specific language governing permissions and
016     *  limitations under the License.
017     */
018    
019    package org.apache.geronimo.util.asn1.pkcs;
020    
021    import org.apache.geronimo.util.asn1.DERObjectIdentifier;
022    
023    public interface PKCSObjectIdentifiers
024    {
025        //
026        // pkcs-1 OBJECT IDENTIFIER ::= {
027        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 }
028        //
029        static final String                 pkcs_1                    = "1.2.840.113549.1.1";
030        static final DERObjectIdentifier    rsaEncryption             = new DERObjectIdentifier(pkcs_1 + ".1");
031        static final DERObjectIdentifier    md2WithRSAEncryption      = new DERObjectIdentifier(pkcs_1 + ".2");
032        static final DERObjectIdentifier    md4WithRSAEncryption      = new DERObjectIdentifier(pkcs_1 + ".3");
033        static final DERObjectIdentifier    md5WithRSAEncryption      = new DERObjectIdentifier(pkcs_1 + ".4");
034        static final DERObjectIdentifier    sha1WithRSAEncryption     = new DERObjectIdentifier(pkcs_1 + ".5");
035        static final DERObjectIdentifier    srsaOAEPEncryptionSET     = new DERObjectIdentifier(pkcs_1 + ".6");
036        static final DERObjectIdentifier    id_RSAES_OAEP             = new DERObjectIdentifier(pkcs_1 + ".7");
037        static final DERObjectIdentifier    id_mgf1                   = new DERObjectIdentifier(pkcs_1 + ".8");
038        static final DERObjectIdentifier    id_pSpecified             = new DERObjectIdentifier(pkcs_1 + ".9");
039        static final DERObjectIdentifier    id_RSASSA_PSS             = new DERObjectIdentifier(pkcs_1 + ".10");
040        static final DERObjectIdentifier    sha256WithRSAEncryption   = new DERObjectIdentifier(pkcs_1 + ".11");
041        static final DERObjectIdentifier    sha384WithRSAEncryption   = new DERObjectIdentifier(pkcs_1 + ".12");
042        static final DERObjectIdentifier    sha512WithRSAEncryption   = new DERObjectIdentifier(pkcs_1 + ".13");
043        static final DERObjectIdentifier    sha224WithRSAEncryption   = new DERObjectIdentifier(pkcs_1 + ".14");
044    
045        //
046        // pkcs-3 OBJECT IDENTIFIER ::= {
047        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 3 }
048        //
049        static final String                 pkcs_3                  = "1.2.840.113549.1.3";
050        static final DERObjectIdentifier    dhKeyAgreement          = new DERObjectIdentifier(pkcs_3 + ".1");
051    
052        //
053        // pkcs-5 OBJECT IDENTIFIER ::= {
054        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 5 }
055        //
056        static final String                 pkcs_5                  = "1.2.840.113549.1.5";
057    
058        static final DERObjectIdentifier    pbeWithMD2AndDES_CBC    = new DERObjectIdentifier(pkcs_5 + ".1");
059        static final DERObjectIdentifier    pbeWithMD2AndRC2_CBC    = new DERObjectIdentifier(pkcs_5 + ".4");
060        static final DERObjectIdentifier    pbeWithMD5AndDES_CBC    = new DERObjectIdentifier(pkcs_5 + ".3");
061        static final DERObjectIdentifier    pbeWithMD5AndRC2_CBC    = new DERObjectIdentifier(pkcs_5 + ".6");
062        static final DERObjectIdentifier    pbeWithSHA1AndDES_CBC   = new DERObjectIdentifier(pkcs_5 + ".10");
063        static final DERObjectIdentifier    pbeWithSHA1AndRC2_CBC   = new DERObjectIdentifier(pkcs_5 + ".11");
064    
065        static final DERObjectIdentifier    id_PBES2                = new DERObjectIdentifier(pkcs_5 + ".13");
066    
067        static final DERObjectIdentifier    id_PBKDF2               = new DERObjectIdentifier(pkcs_5 + ".12");
068    
069        //
070        // encryptionAlgorithm OBJECT IDENTIFIER ::= {
071        //       iso(1) member-body(2) us(840) rsadsi(113549) 3 }
072        //
073        static final String                 encryptionAlgorithm     = "1.2.840.113549.3";
074    
075        static final DERObjectIdentifier    des_EDE3_CBC            = new DERObjectIdentifier(encryptionAlgorithm + ".7");
076        static final DERObjectIdentifier    RC2_CBC                 = new DERObjectIdentifier(encryptionAlgorithm + ".2");
077    
078        //
079        // object identifiers for digests
080        //
081        static final String                 digestAlgorithm     = "1.2.840.113549.2";
082        //
083        // md2 OBJECT IDENTIFIER ::=
084        //      {iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) 2}
085        //
086        static final DERObjectIdentifier    md2                     = new DERObjectIdentifier(digestAlgorithm + ".2");
087    
088        //
089        // md4 OBJECT IDENTIFIER ::=
090        //      {iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) 4}
091        //
092        static final DERObjectIdentifier    md4 = new DERObjectIdentifier(digestAlgorithm + ".4");
093    
094        //
095        // md5 OBJECT IDENTIFIER ::=
096        //      {iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) 5}
097        //
098        static final DERObjectIdentifier    md5                     = new DERObjectIdentifier(digestAlgorithm + ".5");
099    
100        static final DERObjectIdentifier    id_hmacWithSHA1         = new DERObjectIdentifier(digestAlgorithm + ".7");
101        static final DERObjectIdentifier    id_hmacWithSHA224       = new DERObjectIdentifier(digestAlgorithm + ".8");
102        static final DERObjectIdentifier    id_hmacWithSHA256       = new DERObjectIdentifier(digestAlgorithm + ".9");
103        static final DERObjectIdentifier    id_hmacWithSHA384       = new DERObjectIdentifier(digestAlgorithm + ".10");
104        static final DERObjectIdentifier    id_hmacWithSHA512       = new DERObjectIdentifier(digestAlgorithm + ".11");
105    
106        //
107        // pkcs-7 OBJECT IDENTIFIER ::= {
108        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 7 }
109        //
110        static final String                 pkcs_7                  = "1.2.840.113549.1.7";
111        static final DERObjectIdentifier    data                    = new DERObjectIdentifier(pkcs_7 + ".1");
112        static final DERObjectIdentifier    signedData              = new DERObjectIdentifier(pkcs_7 + ".2");
113        static final DERObjectIdentifier    envelopedData           = new DERObjectIdentifier(pkcs_7 + ".3");
114        static final DERObjectIdentifier    signedAndEnvelopedData  = new DERObjectIdentifier(pkcs_7 + ".4");
115        static final DERObjectIdentifier    digestedData            = new DERObjectIdentifier(pkcs_7 + ".5");
116        static final DERObjectIdentifier    encryptedData           = new DERObjectIdentifier(pkcs_7 + ".6");
117    
118        //
119        // pkcs-9 OBJECT IDENTIFIER ::= {
120        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 9 }
121        //
122        static final String                 pkcs_9                  = "1.2.840.113549.1.9";
123    
124        static final DERObjectIdentifier    pkcs_9_at_emailAddress  = new DERObjectIdentifier(pkcs_9 + ".1");
125        static final DERObjectIdentifier    pkcs_9_at_unstructuredName = new DERObjectIdentifier(pkcs_9 + ".2");
126        static final DERObjectIdentifier    pkcs_9_at_contentType = new DERObjectIdentifier(pkcs_9 + ".3");
127        static final DERObjectIdentifier    pkcs_9_at_messageDigest = new DERObjectIdentifier(pkcs_9 + ".4");
128        static final DERObjectIdentifier    pkcs_9_at_signingTime = new DERObjectIdentifier(pkcs_9 + ".5");
129        static final DERObjectIdentifier    pkcs_9_at_counterSignature = new DERObjectIdentifier(pkcs_9 + ".6");
130        static final DERObjectIdentifier    pkcs_9_at_challengePassword = new DERObjectIdentifier(pkcs_9 + ".7");
131        static final DERObjectIdentifier    pkcs_9_at_unstructuredAddress = new DERObjectIdentifier(pkcs_9 + ".8");
132        static final DERObjectIdentifier    pkcs_9_at_extendedCertificateAttributes = new DERObjectIdentifier(pkcs_9 + ".9");
133    
134        static final DERObjectIdentifier    pkcs_9_at_signingDescription = new DERObjectIdentifier(pkcs_9 + ".13");
135        static final DERObjectIdentifier    pkcs_9_at_extensionRequest = new DERObjectIdentifier(pkcs_9 + ".14");
136        static final DERObjectIdentifier    pkcs_9_at_smimeCapabilities = new DERObjectIdentifier(pkcs_9 + ".15");
137    
138        static final DERObjectIdentifier    pkcs_9_at_friendlyName  = new DERObjectIdentifier(pkcs_9 + ".20");
139        static final DERObjectIdentifier    pkcs_9_at_localKeyId    = new DERObjectIdentifier(pkcs_9 + ".21");
140    
141        static final DERObjectIdentifier    x509certType            = new DERObjectIdentifier(pkcs_9 + ".22.1");
142    
143        static final DERObjectIdentifier    id_alg_PWRI_KEK    = new DERObjectIdentifier(pkcs_9 + ".16.3.9");
144    
145        //
146        // SMIME capability sub oids.
147        //
148        static final DERObjectIdentifier    preferSignedData        = new DERObjectIdentifier(pkcs_9 + ".15.1");
149        static final DERObjectIdentifier    canNotDecryptAny        = new DERObjectIdentifier(pkcs_9 + ".15.2");
150        static final DERObjectIdentifier    sMIMECapabilitiesVersions = new DERObjectIdentifier(pkcs_9 + ".15.3");
151    
152        //
153        // other SMIME attributes
154        //
155    
156        //
157        // id-ct OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
158        // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1)}
159        //
160        static String id_ct = "1.2.840.113549.1.9.16.1";
161    
162        static final DERObjectIdentifier    id_ct_TSTInfo           = new DERObjectIdentifier(id_ct + ".4");
163        static final DERObjectIdentifier    id_ct_compressedData    = new DERObjectIdentifier(id_ct + ".9");
164    
165        //
166        // id-cti OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
167        // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6)}
168        //
169        static String id_cti = "1.2.840.113549.1.9.16.6";
170    
171        static final DERObjectIdentifier    id_cti_ets_proofOfOrigin  = new DERObjectIdentifier(id_cti + ".1");
172        static final DERObjectIdentifier    id_cti_ets_proofOfReceipt = new DERObjectIdentifier(id_cti + ".2");
173        static final DERObjectIdentifier    id_cti_ets_proofOfDelivery = new DERObjectIdentifier(id_cti + ".3");
174        static final DERObjectIdentifier    id_cti_ets_proofOfSender = new DERObjectIdentifier(id_cti + ".4");
175        static final DERObjectIdentifier    id_cti_ets_proofOfApproval = new DERObjectIdentifier(id_cti + ".5");
176        static final DERObjectIdentifier    id_cti_ets_proofOfCreation = new DERObjectIdentifier(id_cti + ".6");
177    
178        //
179        // id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
180        // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)}
181        //
182        static String id_aa = "1.2.840.113549.1.9.16.2";
183    
184        /*
185         * id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11}
186         *
187         */
188        static DERObjectIdentifier id_aa_encrypKeyPref = new DERObjectIdentifier(id_aa + ".11");
189        static DERObjectIdentifier id_aa_signingCertificate = new DERObjectIdentifier(id_aa + ".12");
190    
191        static final DERObjectIdentifier id_aa_contentIdentifier = new DERObjectIdentifier(id_aa + ".7"); // See RFC 2634
192        static final DERObjectIdentifier id_aa_signatureTimeStampToken = new DERObjectIdentifier(id_aa + ".14"); // See RFC 3126
193        static final DERObjectIdentifier id_aa_sigPolicyId = new DERObjectIdentifier(id_aa + ".15"); // See RFC 3126
194        static final DERObjectIdentifier id_aa_commitmentType = new DERObjectIdentifier(id_aa + ".16"); // See RFC 3126
195        static final DERObjectIdentifier id_aa_signerLocation = new DERObjectIdentifier(id_aa + ".17"); // See RFC 3126
196        static final DERObjectIdentifier id_aa_otherSigCert = new DERObjectIdentifier(id_aa + ".19"); // See RFC 3126
197        //
198        // pkcs-12 OBJECT IDENTIFIER ::= {
199        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 12 }
200        //
201        static final String                 pkcs_12                  = "1.2.840.113549.1.12";
202        static final String                 bagtypes                 = pkcs_12 + ".10.1";
203    
204        static final DERObjectIdentifier    keyBag                  = new DERObjectIdentifier(bagtypes + ".1");
205        static final DERObjectIdentifier    pkcs8ShroudedKeyBag     = new DERObjectIdentifier(bagtypes + ".2");
206        static final DERObjectIdentifier    certBag                 = new DERObjectIdentifier(bagtypes + ".3");
207        static final DERObjectIdentifier    crlBag                  = new DERObjectIdentifier(bagtypes + ".4");
208        static final DERObjectIdentifier    secretBag               = new DERObjectIdentifier(bagtypes + ".5");
209        static final DERObjectIdentifier    safeContentsBag         = new DERObjectIdentifier(bagtypes + ".6");
210    
211        static final String pkcs_12PbeIds  = pkcs_12 + ".1";
212    
213        static final DERObjectIdentifier    pbeWithSHAAnd128BitRC4 = new DERObjectIdentifier(pkcs_12PbeIds + ".1");
214        static final DERObjectIdentifier    pbeWithSHAAnd40BitRC4  = new DERObjectIdentifier(pkcs_12PbeIds + ".2");
215        static final DERObjectIdentifier    pbeWithSHAAnd3_KeyTripleDES_CBC = new DERObjectIdentifier(pkcs_12PbeIds + ".3");
216        static final DERObjectIdentifier    pbeWithSHAAnd2_KeyTripleDES_CBC = new DERObjectIdentifier(pkcs_12PbeIds + ".4");
217        static final DERObjectIdentifier    pbeWithSHAAnd128BitRC2_CBC = new DERObjectIdentifier(pkcs_12PbeIds + ".5");
218        static final DERObjectIdentifier    pbewithSHAAnd40BitRC2_CBC = new DERObjectIdentifier(pkcs_12PbeIds + ".6");
219    
220    }
221