1    package org.bouncycastle.asn1.pkcs;
2    
3    import org.bouncycastle.asn1.DERObjectIdentifier;
4    
5    public interface PKCSObjectIdentifiers
6    {
7        //
8        // pkcs-1 OBJECT IDENTIFIER ::= {
9        //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 }
10       //
11       static final String                 pkcs_1                  = "1.2.840.113549.1.1";
12       static final DERObjectIdentifier    rsaEncryption           = new DERObjectIdentifier(pkcs_1 + ".1");
13       static final DERObjectIdentifier    md2WithRSAEncryption    = new DERObjectIdentifier(pkcs_1 + ".2");
14       static final DERObjectIdentifier    md4WithRSAEncryption    = new DERObjectIdentifier(pkcs_1 + ".3");
15       static final DERObjectIdentifier    md5WithRSAEncryption    = new DERObjectIdentifier(pkcs_1 + ".4");
16       static final DERObjectIdentifier    sha1WithRSAEncryption   = new DERObjectIdentifier(pkcs_1 + ".5");
17       static final DERObjectIdentifier    srsaOAEPEncryptionSET   = new DERObjectIdentifier(pkcs_1 + ".6");
18       static final DERObjectIdentifier    sha256WithRSAEncryption   = new DERObjectIdentifier(pkcs_1 + ".11");
19       static final DERObjectIdentifier    sha384WithRSAEncryption   = new DERObjectIdentifier(pkcs_1 + ".12");
20       static final DERObjectIdentifier    sha512WithRSAEncryption   = new DERObjectIdentifier(pkcs_1 + ".13");
21   
22       //
23       // pkcs-3 OBJECT IDENTIFIER ::= {
24       //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 3 }
25       //
26       static final String                 pkcs_3                  = "1.2.840.113549.1.3";
27       static final DERObjectIdentifier    dhKeyAgreement          = new DERObjectIdentifier(pkcs_3 + ".1");
28   
29       //
30       // pkcs-5 OBJECT IDENTIFIER ::= {
31       //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 5 }
32       //
33       static final String                 pkcs_5                  = "1.2.840.113549.1.5";
34   
35       static final DERObjectIdentifier    id_PBES2                = new DERObjectIdentifier(pkcs_5 + ".13");
36   
37       static final DERObjectIdentifier    id_PBKDF2               = new DERObjectIdentifier(pkcs_5 + ".12");
38   
39       //
40       // encryptionAlgorithm OBJECT IDENTIFIER ::= {
41       //       iso(1) member-body(2) us(840) rsadsi(113549) 3 }
42       //
43       static final String                 encryptionAlgorithm     = "1.2.840.113549.3";
44   
45       static final DERObjectIdentifier    des_EDE3_CBC            = new DERObjectIdentifier(encryptionAlgorithm + ".7");
46       static final DERObjectIdentifier    RC2_CBC                 = new DERObjectIdentifier(encryptionAlgorithm + ".2");
47   
48       //
49       // object identifiers for digests
50       //
51   
52       //
53       // md2 OBJECT IDENTIFIER ::=
54       //      {iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) 2}
55       //
56       static final DERObjectIdentifier    md2                     = new DERObjectIdentifier("1.2.840.113549.2.2");
57   
58       //
59       // md5 OBJECT IDENTIFIER ::=
60       //      {iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) 5}
61       //
62       static final DERObjectIdentifier    md5                     = new DERObjectIdentifier("1.2.840.113549.2.5");
63   
64       //
65       // pkcs-7 OBJECT IDENTIFIER ::= {
66       //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 7 }
67       //
68       static final String                 pkcs_7                  = "1.2.840.113549.1.7";
69       static final DERObjectIdentifier    data                    = new DERObjectIdentifier(pkcs_7 + ".1");
70       static final DERObjectIdentifier    signedData              = new DERObjectIdentifier(pkcs_7 + ".2");
71       static final DERObjectIdentifier    envelopedData           = new DERObjectIdentifier(pkcs_7 + ".3");
72       static final DERObjectIdentifier    signedAndEnvelopedData  = new DERObjectIdentifier(pkcs_7 + ".4");
73       static final DERObjectIdentifier    digestedData            = new DERObjectIdentifier(pkcs_7 + ".5");
74       static final DERObjectIdentifier    encryptedData           = new DERObjectIdentifier(pkcs_7 + ".6");
75   
76       //
77       // pkcs-9 OBJECT IDENTIFIER ::= {
78       //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 9 }
79       //
80       static final String                 pkcs_9                  = "1.2.840.113549.1.9";
81   
82       static final DERObjectIdentifier    pkcs_9_at_emailAddress  = new DERObjectIdentifier(pkcs_9 + ".1");
83       static final DERObjectIdentifier    pkcs_9_at_unstructuredName = new DERObjectIdentifier(pkcs_9 + ".2");
84       static final DERObjectIdentifier    pkcs_9_at_contentType = new DERObjectIdentifier(pkcs_9 + ".3");
85       static final DERObjectIdentifier    pkcs_9_at_messageDigest = new DERObjectIdentifier(pkcs_9 + ".4");
86       static final DERObjectIdentifier    pkcs_9_at_signingTime = new DERObjectIdentifier(pkcs_9 + ".5");
87       static final DERObjectIdentifier    pkcs_9_at_counterSignature = new DERObjectIdentifier(pkcs_9 + ".6");
88       static final DERObjectIdentifier    pkcs_9_at_challengePassword = new DERObjectIdentifier(pkcs_9 + ".7");
89       static final DERObjectIdentifier    pkcs_9_at_unstructuredAddress = new DERObjectIdentifier(pkcs_9 + ".8");
90       static final DERObjectIdentifier    pkcs_9_at_extendedCertificateAttributes = new DERObjectIdentifier(pkcs_9 + ".9");
91   
92       static final DERObjectIdentifier    pkcs_9_at_signingDescription = new DERObjectIdentifier(pkcs_9 + ".13");
93       static final DERObjectIdentifier    pkcs_9_at_extensionRequest = new DERObjectIdentifier(pkcs_9 + ".14");
94       static final DERObjectIdentifier    pkcs_9_at_smimeCapabilities = new DERObjectIdentifier(pkcs_9 + ".15");
95   
96       static final DERObjectIdentifier    pkcs_9_at_friendlyName  = new DERObjectIdentifier(pkcs_9 + ".20");
97       static final DERObjectIdentifier    pkcs_9_at_localKeyId    = new DERObjectIdentifier(pkcs_9 + ".21");
98   
99       static final DERObjectIdentifier    x509certType            = new DERObjectIdentifier(pkcs_9 + ".22.1");
100  
101      //
102      // SMIME capability sub oids.
103      //
104      static final DERObjectIdentifier    preferSignedData        = new DERObjectIdentifier(pkcs_9 + ".15.1");
105      static final DERObjectIdentifier    canNotDecryptAny        = new DERObjectIdentifier(pkcs_9 + ".15.2");
106      static final DERObjectIdentifier    sMIMECapabilitiesVersions = new DERObjectIdentifier(pkcs_9 + ".15.3");
107  
108      //
109      // other SMIME attributes
110      //
111  
112          //
113          // id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
114          // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)}
115          //
116          static String id_aa = "1.2.840.113549.1.9.16.2";
117          
118          /*
119           * id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11}
120           * 
121           */
122          static DERObjectIdentifier id_aa_encrypKeyPref = new DERObjectIdentifier(id_aa + ".11");
123  
124      //
125      // pkcs-12 OBJECT IDENTIFIER ::= {
126      //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 12 }
127      //
128      static final String                 pkcs_12                  = "1.2.840.113549.1.12";
129      static final String                 bagtypes                 = pkcs_12 + ".10.1";
130  
131      static final DERObjectIdentifier    keyBag                  = new DERObjectIdentifier(bagtypes + ".1");
132      static final DERObjectIdentifier    pkcs8ShroudedKeyBag     = new DERObjectIdentifier(bagtypes + ".2");
133      static final DERObjectIdentifier    certBag                 = new DERObjectIdentifier(bagtypes + ".3");
134      static final DERObjectIdentifier    crlBag                  = new DERObjectIdentifier(bagtypes + ".4");
135      static final DERObjectIdentifier    secretBag               = new DERObjectIdentifier(bagtypes + ".5");
136      static final DERObjectIdentifier    safeContentsBag         = new DERObjectIdentifier(bagtypes + ".6");
137  }
138  
139