Home | History | Annotate | Download | only in pkcs
      1 package org.bouncycastle.asn1.pkcs;
      2 
      3 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
      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 ASN1ObjectIdentifier    pkcs_1                    = new ASN1ObjectIdentifier("1.2.840.113549.1.1");
     12     static final ASN1ObjectIdentifier    rsaEncryption             = pkcs_1.branch("1");
     13     // BEGIN android-removed
     14     // static final ASN1ObjectIdentifier    md2WithRSAEncryption      = pkcs_1.branch("2");
     15     // static final ASN1ObjectIdentifier    md4WithRSAEncryption      = pkcs_1.branch("3");
     16     // END android-removed
     17     static final ASN1ObjectIdentifier    md5WithRSAEncryption      = pkcs_1.branch("4");
     18     static final ASN1ObjectIdentifier    sha1WithRSAEncryption     = pkcs_1.branch("5");
     19     static final ASN1ObjectIdentifier    srsaOAEPEncryptionSET     = pkcs_1.branch("6");
     20     static final ASN1ObjectIdentifier    id_RSAES_OAEP             = pkcs_1.branch("7");
     21     static final ASN1ObjectIdentifier    id_mgf1                   = pkcs_1.branch("8");
     22     static final ASN1ObjectIdentifier    id_pSpecified             = pkcs_1.branch("9");
     23     static final ASN1ObjectIdentifier    id_RSASSA_PSS             = pkcs_1.branch("10");
     24     static final ASN1ObjectIdentifier    sha256WithRSAEncryption   = pkcs_1.branch("11");
     25     static final ASN1ObjectIdentifier    sha384WithRSAEncryption   = pkcs_1.branch("12");
     26     static final ASN1ObjectIdentifier    sha512WithRSAEncryption   = pkcs_1.branch("13");
     27     // BEGIN android-removed
     28     // static final ASN1ObjectIdentifier    sha224WithRSAEncryption   = pkcs_1.branch("14");
     29     // END android-removed
     30 
     31     //
     32     // pkcs-3 OBJECT IDENTIFIER ::= {
     33     //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 3 }
     34     //
     35     static final ASN1ObjectIdentifier    pkcs_3                  = new ASN1ObjectIdentifier("1.2.840.113549.1.3");
     36     static final ASN1ObjectIdentifier    dhKeyAgreement          = pkcs_3.branch("1");
     37 
     38     //
     39     // pkcs-5 OBJECT IDENTIFIER ::= {
     40     //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 5 }
     41     //
     42     static final ASN1ObjectIdentifier    pkcs_5                  = new ASN1ObjectIdentifier("1.2.840.113549.1.5");
     43 
     44     static final ASN1ObjectIdentifier    pbeWithMD2AndDES_CBC    = pkcs_5.branch("1");
     45     static final ASN1ObjectIdentifier    pbeWithMD2AndRC2_CBC    = pkcs_5.branch("4");
     46     static final ASN1ObjectIdentifier    pbeWithMD5AndDES_CBC    = pkcs_5.branch("3");
     47     static final ASN1ObjectIdentifier    pbeWithMD5AndRC2_CBC    = pkcs_5.branch("6");
     48     static final ASN1ObjectIdentifier    pbeWithSHA1AndDES_CBC   = pkcs_5.branch("10");
     49     static final ASN1ObjectIdentifier    pbeWithSHA1AndRC2_CBC   = pkcs_5.branch("11");
     50 
     51     static final ASN1ObjectIdentifier    id_PBES2                = pkcs_5.branch("13");
     52 
     53     static final ASN1ObjectIdentifier    id_PBKDF2               = pkcs_5.branch("12");
     54 
     55     //
     56     // encryptionAlgorithm OBJECT IDENTIFIER ::= {
     57     //       iso(1) member-body(2) us(840) rsadsi(113549) 3 }
     58     //
     59     static final ASN1ObjectIdentifier    encryptionAlgorithm     = new ASN1ObjectIdentifier("1.2.840.113549.3");
     60 
     61     static final ASN1ObjectIdentifier    des_EDE3_CBC            = encryptionAlgorithm.branch("7");
     62     static final ASN1ObjectIdentifier    RC2_CBC                 = encryptionAlgorithm.branch("2");
     63 
     64     //
     65     // object identifiers for digests
     66     //
     67     static final ASN1ObjectIdentifier    digestAlgorithm        = new ASN1ObjectIdentifier("1.2.840.113549.2");
     68     //
     69     // md2 OBJECT IDENTIFIER ::=
     70     //      {iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) 2}
     71     //
     72     // BEGIN android-removed
     73     // static final ASN1ObjectIdentifier    md2                    = digestAlgorithm.branch("2");
     74     // END android-removed
     75 
     76     //
     77     // md4 OBJECT IDENTIFIER ::=
     78     //      {iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) 4}
     79     //
     80     // BEGIN android-removed
     81     // static final ASN1ObjectIdentifier    md4 = digestAlgorithm.branch("4");
     82     // END android-removed
     83 
     84     //
     85     // md5 OBJECT IDENTIFIER ::=
     86     //      {iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) 5}
     87     //
     88     static final ASN1ObjectIdentifier    md5                     = digestAlgorithm.branch("5");
     89 
     90     static final ASN1ObjectIdentifier    id_hmacWithSHA1         = digestAlgorithm.branch("7");
     91     // BEGIN android-removed
     92     // static final ASN1ObjectIdentifier    id_hmacWithSHA224       = digestAlgorithm.branch("8");
     93     // END android-removed
     94     static final ASN1ObjectIdentifier    id_hmacWithSHA256       = digestAlgorithm.branch("9");
     95     static final ASN1ObjectIdentifier    id_hmacWithSHA384       = digestAlgorithm.branch("10");
     96     static final ASN1ObjectIdentifier    id_hmacWithSHA512       = digestAlgorithm.branch("11");
     97 
     98     //
     99     // pkcs-7 OBJECT IDENTIFIER ::= {
    100     //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 7 }
    101     //
    102     static final String                 pkcs_7                  = "1.2.840.113549.1.7";
    103     static final ASN1ObjectIdentifier    data                    = new ASN1ObjectIdentifier(pkcs_7 + ".1");
    104     static final ASN1ObjectIdentifier    signedData              = new ASN1ObjectIdentifier(pkcs_7 + ".2");
    105     static final ASN1ObjectIdentifier    envelopedData           = new ASN1ObjectIdentifier(pkcs_7 + ".3");
    106     static final ASN1ObjectIdentifier    signedAndEnvelopedData  = new ASN1ObjectIdentifier(pkcs_7 + ".4");
    107     static final ASN1ObjectIdentifier    digestedData            = new ASN1ObjectIdentifier(pkcs_7 + ".5");
    108     static final ASN1ObjectIdentifier    encryptedData           = new ASN1ObjectIdentifier(pkcs_7 + ".6");
    109 
    110     //
    111     // pkcs-9 OBJECT IDENTIFIER ::= {
    112     //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 9 }
    113     //
    114     static final ASN1ObjectIdentifier    pkcs_9                  = new ASN1ObjectIdentifier("1.2.840.113549.1.9");
    115 
    116     static final ASN1ObjectIdentifier    pkcs_9_at_emailAddress  = pkcs_9.branch("1");
    117     static final ASN1ObjectIdentifier    pkcs_9_at_unstructuredName = pkcs_9.branch("2");
    118     static final ASN1ObjectIdentifier    pkcs_9_at_contentType = pkcs_9.branch("3");
    119     static final ASN1ObjectIdentifier    pkcs_9_at_messageDigest = pkcs_9.branch("4");
    120     static final ASN1ObjectIdentifier    pkcs_9_at_signingTime = pkcs_9.branch("5");
    121     static final ASN1ObjectIdentifier    pkcs_9_at_counterSignature = pkcs_9.branch("6");
    122     static final ASN1ObjectIdentifier    pkcs_9_at_challengePassword = pkcs_9.branch("7");
    123     static final ASN1ObjectIdentifier    pkcs_9_at_unstructuredAddress = pkcs_9.branch("8");
    124     static final ASN1ObjectIdentifier    pkcs_9_at_extendedCertificateAttributes = pkcs_9.branch("9");
    125 
    126     static final ASN1ObjectIdentifier    pkcs_9_at_signingDescription = pkcs_9.branch("13");
    127     static final ASN1ObjectIdentifier    pkcs_9_at_extensionRequest = pkcs_9.branch("14");
    128     static final ASN1ObjectIdentifier    pkcs_9_at_smimeCapabilities = pkcs_9.branch("15");
    129 
    130     static final ASN1ObjectIdentifier    pkcs_9_at_friendlyName  = pkcs_9.branch("20");
    131     static final ASN1ObjectIdentifier    pkcs_9_at_localKeyId    = pkcs_9.branch("21");
    132 
    133     /** @deprecated use x509Certificate instead */
    134     static final ASN1ObjectIdentifier    x509certType            = pkcs_9.branch("22.1");
    135 
    136     static final ASN1ObjectIdentifier    certTypes               = pkcs_9.branch("22");
    137     static final ASN1ObjectIdentifier    x509Certificate         = certTypes.branch("1");
    138     static final ASN1ObjectIdentifier    sdsiCertificate         = certTypes.branch("2");
    139 
    140     static final ASN1ObjectIdentifier    crlTypes                = pkcs_9.branch("23");
    141     static final ASN1ObjectIdentifier    x509Crl                 = crlTypes.branch("1");
    142 
    143     static final ASN1ObjectIdentifier    id_alg_PWRI_KEK    = pkcs_9.branch("16.3.9");
    144 
    145     //
    146     // SMIME capability sub oids.
    147     //
    148     static final ASN1ObjectIdentifier    preferSignedData        = pkcs_9.branch("15.1");
    149     static final ASN1ObjectIdentifier    canNotDecryptAny        = pkcs_9.branch("15.2");
    150     static final ASN1ObjectIdentifier    sMIMECapabilitiesVersions = pkcs_9.branch("15.3");
    151 
    152     //
    153     // id-ct OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
    154     // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1)}
    155     //
    156     static final ASN1ObjectIdentifier    id_ct = new ASN1ObjectIdentifier("1.2.840.113549.1.9.16.1");
    157 
    158     static final ASN1ObjectIdentifier    id_ct_authData          = id_ct.branch("2");
    159     static final ASN1ObjectIdentifier    id_ct_TSTInfo           = id_ct.branch("4");
    160     static final ASN1ObjectIdentifier    id_ct_compressedData    = id_ct.branch("9");
    161     static final ASN1ObjectIdentifier    id_ct_authEnvelopedData = id_ct.branch("23");
    162     static final ASN1ObjectIdentifier    id_ct_timestampedData   = id_ct.branch("31");
    163 
    164     //
    165     // id-cti OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
    166     // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) cti(6)}
    167     //
    168     static final ASN1ObjectIdentifier    id_cti = new ASN1ObjectIdentifier("1.2.840.113549.1.9.16.6");
    169 
    170     static final ASN1ObjectIdentifier    id_cti_ets_proofOfOrigin  = id_cti.branch("1");
    171     static final ASN1ObjectIdentifier    id_cti_ets_proofOfReceipt = id_cti.branch("2");
    172     static final ASN1ObjectIdentifier    id_cti_ets_proofOfDelivery = id_cti.branch("3");
    173     static final ASN1ObjectIdentifier    id_cti_ets_proofOfSender = id_cti.branch("4");
    174     static final ASN1ObjectIdentifier    id_cti_ets_proofOfApproval = id_cti.branch("5");
    175     static final ASN1ObjectIdentifier    id_cti_ets_proofOfCreation = id_cti.branch("6");
    176 
    177     //
    178     // id-aa OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
    179     // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) attributes(2)}
    180     //
    181     static final ASN1ObjectIdentifier    id_aa = new ASN1ObjectIdentifier("1.2.840.113549.1.9.16.2");
    182 
    183 
    184     static final ASN1ObjectIdentifier id_aa_receiptRequest = id_aa.branch("1");
    185 
    186     static final ASN1ObjectIdentifier id_aa_contentHint = id_aa.branch("4"); // See RFC 2634
    187     static final ASN1ObjectIdentifier id_aa_msgSigDigest = id_aa.branch("5");
    188     static final ASN1ObjectIdentifier id_aa_contentReference = id_aa.branch("10");
    189     /*
    190      * id-aa-encrypKeyPref OBJECT IDENTIFIER ::= {id-aa 11}
    191      *
    192      */
    193     static final ASN1ObjectIdentifier id_aa_encrypKeyPref = id_aa.branch("11");
    194     static final ASN1ObjectIdentifier id_aa_signingCertificate = id_aa.branch("12");
    195     static final ASN1ObjectIdentifier id_aa_signingCertificateV2 = id_aa.branch("47");
    196 
    197     static final ASN1ObjectIdentifier id_aa_contentIdentifier = id_aa.branch("7"); // See RFC 2634
    198 
    199     /*
    200      * RFC 3126
    201      */
    202     static final ASN1ObjectIdentifier id_aa_signatureTimeStampToken = id_aa.branch("14");
    203 
    204     static final ASN1ObjectIdentifier id_aa_ets_sigPolicyId = id_aa.branch("15");
    205     static final ASN1ObjectIdentifier id_aa_ets_commitmentType = id_aa.branch("16");
    206     static final ASN1ObjectIdentifier id_aa_ets_signerLocation = id_aa.branch("17");
    207     static final ASN1ObjectIdentifier id_aa_ets_signerAttr = id_aa.branch("18");
    208     static final ASN1ObjectIdentifier id_aa_ets_otherSigCert = id_aa.branch("19");
    209     static final ASN1ObjectIdentifier id_aa_ets_contentTimestamp = id_aa.branch("20");
    210     static final ASN1ObjectIdentifier id_aa_ets_certificateRefs = id_aa.branch("21");
    211     static final ASN1ObjectIdentifier id_aa_ets_revocationRefs = id_aa.branch("22");
    212     static final ASN1ObjectIdentifier id_aa_ets_certValues = id_aa.branch("23");
    213     static final ASN1ObjectIdentifier id_aa_ets_revocationValues = id_aa.branch("24");
    214     static final ASN1ObjectIdentifier id_aa_ets_escTimeStamp = id_aa.branch("25");
    215     static final ASN1ObjectIdentifier id_aa_ets_certCRLTimestamp = id_aa.branch("26");
    216     static final ASN1ObjectIdentifier id_aa_ets_archiveTimestamp = id_aa.branch("27");
    217 
    218     /** @deprecated use id_aa_ets_sigPolicyId instead */
    219     static final ASN1ObjectIdentifier id_aa_sigPolicyId = id_aa_ets_sigPolicyId;
    220     /** @deprecated use id_aa_ets_commitmentType instead */
    221     static final ASN1ObjectIdentifier id_aa_commitmentType = id_aa_ets_commitmentType;
    222     /** @deprecated use id_aa_ets_signerLocation instead */
    223     static final ASN1ObjectIdentifier id_aa_signerLocation = id_aa_ets_signerLocation;
    224     /** @deprecated use id_aa_ets_otherSigCert instead */
    225     static final ASN1ObjectIdentifier id_aa_otherSigCert = id_aa_ets_otherSigCert;
    226 
    227     //
    228     // id-spq OBJECT IDENTIFIER ::= {iso(1) member-body(2) usa(840)
    229     // rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) id-spq(5)}
    230     //
    231     final String id_spq = "1.2.840.113549.1.9.16.5";
    232 
    233     static final ASN1ObjectIdentifier id_spq_ets_uri = new ASN1ObjectIdentifier(id_spq + ".1");
    234     static final ASN1ObjectIdentifier id_spq_ets_unotice = new ASN1ObjectIdentifier(id_spq + ".2");
    235 
    236     //
    237     // pkcs-12 OBJECT IDENTIFIER ::= {
    238     //       iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 12 }
    239     //
    240     static final ASN1ObjectIdentifier   pkcs_12                  = new ASN1ObjectIdentifier("1.2.840.113549.1.12");
    241     static final ASN1ObjectIdentifier   bagtypes                 = pkcs_12.branch("10.1");
    242 
    243     static final ASN1ObjectIdentifier    keyBag                  = bagtypes.branch("1");
    244     static final ASN1ObjectIdentifier    pkcs8ShroudedKeyBag     = bagtypes.branch("2");
    245     static final ASN1ObjectIdentifier    certBag                 = bagtypes.branch("3");
    246     static final ASN1ObjectIdentifier    crlBag                  = bagtypes.branch("4");
    247     static final ASN1ObjectIdentifier    secretBag               = bagtypes.branch("5");
    248     static final ASN1ObjectIdentifier    safeContentsBag         = bagtypes.branch("6");
    249 
    250     static final ASN1ObjectIdentifier    pkcs_12PbeIds  = pkcs_12.branch("1");
    251 
    252     static final ASN1ObjectIdentifier    pbeWithSHAAnd128BitRC4 = pkcs_12PbeIds.branch("1");
    253     static final ASN1ObjectIdentifier    pbeWithSHAAnd40BitRC4  = pkcs_12PbeIds.branch("2");
    254     static final ASN1ObjectIdentifier    pbeWithSHAAnd3_KeyTripleDES_CBC = pkcs_12PbeIds.branch("3");
    255     static final ASN1ObjectIdentifier    pbeWithSHAAnd2_KeyTripleDES_CBC = pkcs_12PbeIds.branch("4");
    256     static final ASN1ObjectIdentifier    pbeWithSHAAnd128BitRC2_CBC = pkcs_12PbeIds.branch("5");
    257     static final ASN1ObjectIdentifier    pbewithSHAAnd40BitRC2_CBC = pkcs_12PbeIds.branch("6");
    258 
    259     static final ASN1ObjectIdentifier    id_alg_CMS3DESwrap = new ASN1ObjectIdentifier("1.2.840.113549.1.9.16.3.6");
    260     static final ASN1ObjectIdentifier    id_alg_CMSRC2wrap = new ASN1ObjectIdentifier("1.2.840.113549.1.9.16.3.7");
    261 }
    262 
    263