home *** CD-ROM | disk | FTP | other *** search
/ ftp.rsa.com / 2014.05.ftp.rsa.com.tar / ftp.rsa.com / pub / pkcs / pkcs-15 / testvectors.txt < prev   
Text File  |  2014-05-02  |  91KB  |  2,215 lines

  1. $Revision: 1.3 $
  2.  
  3.            Test vectors for PKCS #15 v1.1
  4.  
  5.  
  6. NOTE 1 - All examples are shown both in the formal value notation
  7. defined in ISO/IEC 8824-1, as an ASN.1 dump, and DER encoded.
  8.  
  9. NOTE 2 - These examples have been developed with the help of the OSS
  10. ASN.1 compiler.
  11.  
  12. 1. Example of an EID profile of PKCS #15 application
  13.  
  14. The IC card in this example has on-chip support for RSA and
  15. DES-EDE-CBC algorithm computation in addition to pseudo-random number
  16. generation. It is assumed that this information can be deduced from
  17. the card's ATR string. As a consequence of this, the TokenInfo file
  18. contains no supportedAlgorithms field. The PKCS #15 application is
  19. profiled for use in an electronic identification environment, in
  20. compliance with Appendix B, and has two RSA key pairs and two
  21. certificates. One private key is for digital signature purposes only
  22. and is protected with a separate authentication object (a PIN). There
  23. is also a private data object belonging to an application named
  24. "APP". The total overhead for storing the PKCS #15 relevant
  25. information is in this case 374 bytes, but without the data object
  26. belonging to the "APP" application it would have been 333 bytes.
  27.  
  28. 1.1 Example of EF(DIR)
  29.  
  30. Example contents for a PKCS #15 application template on an IC card
  31. using indirect application selection. A non-standard file path for
  32. EF(UnusedSpace) is defined, /3F00/5015/4320.
  33.  
  34. 1.1.1 Value notation
  35.  
  36.   {
  37.     aid 'A000000063504B43532D3135'H,
  38.     label "RSA DSI",
  39.     path '3F005015'H,
  40.     ddo 
  41.     {
  42.       oid { 1 2 840 113549 1 15 4 1 },
  43.       unusedPath 
  44.       {
  45.         path '3F0050154320'H
  46.       }
  47.     }
  48.   }
  49.  
  50.  
  51. 1.1.2 ASN.1 dump
  52.  
  53.   DIRRecord SEQUENCE: tag = [APPLICATION 1] constructed; length = 53
  54.     aid OCTET STRING: tag = [APPLICATION 15] primitive; length = 12
  55.       0xa000000063504b43532d3135
  56.     label UTF8String: tag = [APPLICATION 16] primitive; length = 7
  57.       0x52534120445349
  58.     path OCTET STRING: tag = [APPLICATION 17] primitive; length = 4
  59.       0x3f005015
  60.     ddo DDO SEQUENCE: tag = [APPLICATION 19] constructed; length = 22
  61.       oid OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 10
  62.         { 1 2 840 113549 1 15 4 1 }
  63.       unusedPath Path SEQUENCE: tag = [1] constructed; length = 8
  64.         path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 6
  65.           0x3f0050154320
  66.  
  67. 1.1.3 DER encoding
  68.  
  69. 61354F0C A0000000 63504B43 532D3135 50075253 41204453 4951043F
  70. 00501573 16060A2A 864886F7 0D010F04 01A10804 063F0050 154320
  71.  
  72. 1.2 Example of EF(TokenInfo)
  73.  
  74. 1.2.1 Value notation
  75.  
  76. {
  77.   version v1,
  78.   serialNumber '159752222515401240'H,
  79.   manufacturerID "Acme, Inc.",
  80.   tokenflags { prnGeneration, eidCompliant }
  81. }
  82.  
  83. 1.2.2 ASN.1 dump
  84.  
  85. TokenInfo SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 30
  86.   version INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  87.     0
  88.   serialNumber OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 9
  89.     0x159752222515401240
  90.   manufacturerID Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 10
  91.     0x41636d652c20496e632e
  92.   tokenflags TokenFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  93.     0x0430
  94.  
  95. 1.2.3 DER encoding
  96.  
  97. 301E0201 00040915 97522225 15401240 0C0A4163 6D652C20 496E632E
  98. 03020430
  99.  
  100. 1.3 EF(ODF)
  101.  
  102. As can be seen, the ODF simply consists of four records, and the
  103. total size of the data is 32 bytes.
  104.  
  105. 1.3.1 Value notation
  106.  
  107.   privateKeys : path : 
  108.       {
  109.         path '4401'H
  110.       },
  111.   certificates : path : 
  112.       {
  113.         path '4402'H
  114.       },
  115.   dataObjects : path : 
  116.       {
  117.         path '4403'H
  118.       },
  119.   authObjects : path : 
  120.       {
  121.         path '4404'H
  122.       }
  123.  
  124. 1.3.2 ASN.1 dump
  125.  
  126.   PKCS15Objects CHOICE
  127.     privateKeys : tag = [0] constructed; length = 6
  128.       PrivateKeys CHOICE
  129.         path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  130.           path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  131.             0x4401
  132.   PKCS15Objects CHOICE
  133.     certificates : tag = [4] constructed; length = 6
  134.       Certificates CHOICE
  135.         path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  136.           path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  137.             0x4402
  138.   PKCS15Objects CHOICE
  139.     dataObjects : tag = [7] constructed; length = 6
  140.       DataObjects CHOICE
  141.         path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  142.           path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  143.             0x4403
  144.   PKCS15Objects CHOICE
  145.     authObjects : tag = [8] constructed; length = 6
  146.       AuthObjects CHOICE
  147.         path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  148.           path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  149.             0x4404
  150.  
  151. 1.3.3 DER encoding
  152.  
  153. A0063004 04024401 A4063004 04024402 A7063004 04024403 A8063004
  154. 04024404
  155.  
  156. 1.4 EF(PrKDF)
  157.  
  158. The content of files 3F00/5015/4B01 and 3F00/5015/4B02 is completely
  159. card-specific. Operations possible to perform with keys in these
  160. files may either be deduced by looking at the contents of the
  161. TokenInfo file or by external knowledge of the card in question
  162. (ATR). The size of the data is 123 bytes (one record of 61 bytes and
  163. one record of 62 bytes).
  164.  
  165. 1.4.1 Value notation
  166.  
  167.   privateRSAKey : 
  168.     {
  169.       commonObjectAttributes 
  170.       {
  171.         label "KEY1",
  172.         flags { private },
  173.         authId '01'H
  174.       },
  175.       classAttributes 
  176.       {
  177.         iD '45'H,
  178.         usage { decrypt, sign, unwrap }
  179.       },
  180.       subClassAttributes 
  181.       {
  182.         keyIdentifiers 
  183.         {
  184.           {
  185.             idType 4,
  186.             idValue ParameterString : '4321567890ABCDEF'H
  187.           }
  188.         }
  189.       },
  190.       typeAttributes 
  191.       {
  192.         value indirect : path : 
  193.             {
  194.               path '4B01'H
  195.             },
  196.         modulusLength 1024
  197.       }
  198.     },
  199.   privateRSAKey : 
  200.     {
  201.       commonObjectAttributes 
  202.       {
  203.         label "KEY2",
  204.         flags { private },
  205.         authId '02'H
  206.       },
  207.       classAttributes 
  208.       {
  209.         iD '46'H,
  210.         usage { sign, nonRepudiation }
  211.       },
  212.       subClassAttributes 
  213.       {
  214.         keyIdentifiers 
  215.         {
  216.           {
  217.             idType 4,
  218.             idValue ParameterString : '1234567890ABCDEF'H
  219.           }
  220.         }
  221.       },
  222.       typeAttributes 
  223.       {
  224.         value indirect : path : 
  225.             {
  226.               path '4B02'H
  227.             },
  228.         modulusLength 1024
  229.       }
  230.     }
  231.  
  232. 1.4.2 ASN.1 dump
  233.  
  234.   PrivateKeyType CHOICE
  235.     privateRSAKey SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 59
  236.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 13
  237.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 4
  238.           0x4b455931
  239.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  240.           0x0780
  241.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  242.           0x01
  243.       classAttributes CommonKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 7
  244.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  245.           0x45
  246.         usage KeyUsageFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  247.           0x0264
  248.       subClassAttributes : tag = [0] constructed; length = 19
  249.         CommonPrivateKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 17
  250.           keyIdentifiers SEQUENCE OF: tag = [0] constructed; length = 15
  251.             SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 13
  252.               idType INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  253.                 4
  254.               idValue OpenType
  255.                 0x04084321567890abcdef
  256.       typeAttributes : tag = [1] constructed; length = 12
  257.         PrivateRSAKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  258.           value CHOICE
  259.             indirect CHOICE
  260.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  261.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  262.                   0x4b01
  263.           modulusLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  264.             1024
  265.   PrivateKeyType CHOICE
  266.     privateRSAKey SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 60
  267.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 13
  268.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 4
  269.           0x4b455932
  270.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  271.           0x0780
  272.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  273.           0x02
  274.       classAttributes CommonKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  275.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  276.           0x46
  277.         usage KeyUsageFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 3
  278.           0x062040
  279.       subClassAttributes : tag = [0] constructed; length = 19
  280.         CommonPrivateKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 17
  281.           keyIdentifiers SEQUENCE OF: tag = [0] constructed; length = 15
  282.             SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 13
  283.               idType INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  284.                 4
  285.               idValue OpenType
  286.                 0x04081234567890abcdef
  287.       typeAttributes : tag = [1] constructed; length = 12
  288.         PrivateRSAKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  289.           value CHOICE
  290.             indirect CHOICE
  291.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  292.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  293.                   0x4b02
  294.           modulusLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  295.             1024
  296.  
  297. 1.4.3 DER encoding
  298.  
  299. 303B300D 0C044B45 59310302 07800401 01300704 01450302 0264A013
  300. 3011A00F 300D0201 04040843 21567890 ABCDEFA1 0C300A30 0404024B
  301. 01020204 00303C30 0D0C044B 45593203 02078004 01023008 04014603
  302. 03062040 A0133011 A00F300D 02010404 08123456 7890ABCD EFA10C30
  303. 0A300404 024B0202 020400
  304.  
  305. 1.5 EF(CDF)
  306.  
  307. Files 3F00/5015/4331 and 3F00/5015/4332 should contain DER-encoded
  308. certificate structures in accordance with ISO/IEC 9594-8. The size of
  309. the data is 58 bytes (two records of 29 bytes each).
  310.  
  311. 1.5.1 Value notation
  312.  
  313.   x509Certificate : 
  314.     {
  315.       commonObjectAttributes 
  316.       {
  317.         label "CERT1",
  318.         flags {  }
  319.       },
  320.       classAttributes 
  321.       {
  322.         iD '45'H
  323.       },
  324.       typeAttributes 
  325.       {
  326.         value indirect : path : 
  327.             {
  328.               path '4331'H
  329.             }
  330.       }
  331.     },
  332.   x509Certificate : 
  333.     {
  334.       commonObjectAttributes 
  335.       {
  336.         label "CERT2",
  337.         flags {  }
  338.       },
  339.       classAttributes 
  340.       {
  341.         iD '46'H
  342.       },
  343.       typeAttributes 
  344.       {
  345.         value indirect : path : 
  346.             {
  347.               path '4332'H
  348.             }
  349.       }
  350.     }
  351.  
  352. 1.5.2 ASN.1 dump
  353.  
  354.   CertificateType CHOICE
  355.     x509Certificate SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 27
  356.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  357.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 5
  358.           0x4345525431
  359.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 1
  360.           0x00
  361.       classAttributes CommonCertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  362.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  363.           0x45
  364.       typeAttributes : tag = [1] constructed; length = 8
  365.         X509CertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 6
  366.           value CHOICE
  367.             indirect CHOICE
  368.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  369.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  370.                   0x4331
  371.   CertificateType CHOICE
  372.     x509Certificate SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 27
  373.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  374.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 5
  375.           0x4345525432
  376.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 1
  377.           0x00
  378.       classAttributes CommonCertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  379.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  380.           0x46
  381.       typeAttributes : tag = [1] constructed; length = 8
  382.         X509CertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 6
  383.           value CHOICE
  384.             indirect CHOICE
  385.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  386.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  387.                   0x4332
  388.  
  389. 1.5.3 DER encoding
  390.  
  391. 301B300A 0C054345 52543103 01003003 040145A1 08300630 04040243
  392. 31301B30 0A0C0543 45525432 03010030 03040146 A1083006 30040402 
  393. 4332 
  394.  
  395. 1.6 EF(AODF)
  396.  
  397. The content of files 3F00/5015/0100 and 3F00/0000 is card specific
  398. and not specified in PKCS #15. The total size of the data is 88 bytes
  399. (one record of length 39 bytes, the other of length 49 bytes).
  400.  
  401. 1.6.1 Value notation
  402.  
  403.   pin : 
  404.     {
  405.       commonObjectAttributes 
  406.       {
  407.         label "PIN1",
  408.         flags { private }
  409.       },
  410.       classAttributes 
  411.       {
  412.         authId '01'H
  413.       },
  414.       typeAttributes 
  415.       {
  416.         pinFlags { change-disabled, initialized, needs-padding },
  417.         pinType bcd,
  418.         minLength 4,
  419.         storedLength 8,
  420.         padChar 'FF'H
  421.       }
  422.     },
  423.   pin : 
  424.     {
  425.       commonObjectAttributes 
  426.       {
  427.         label "PIN2",
  428.         flags { private }
  429.       },
  430.       classAttributes 
  431.       {
  432.         authId '02'H
  433.       },
  434.       typeAttributes 
  435.       {
  436.         pinFlags { change-disabled, initialized, needs-padding },
  437.         pinType bcd,
  438.         minLength 4,
  439.         storedLength 8,
  440.         padChar 'FF'H,
  441.         path 
  442.         {
  443.           path '3F0050150100'H
  444.         }
  445.       }
  446.     }
  447.  
  448. 1.6.2 ASN.1 dump
  449.  
  450.   AuthenticationType CHOICE
  451.     pin SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 37
  452.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  453.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 4
  454.           0x50494e31
  455.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  456.           0x0780
  457.       classAttributes CommonAuthenticationObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  458.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  459.           0x01
  460.       typeAttributes : tag = [1] constructed; length = 18
  461.         PinAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 16
  462.           pinFlags PinFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  463.             0x022c
  464.           pinType PinType ENUMERATED: tag = [UNIVERSAL 10] primitive; length = 1
  465.             0
  466.           minLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  467.             4
  468.           storedLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  469.             8
  470.           padChar OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  471.             0xff
  472.   AuthenticationType CHOICE
  473.     pin SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 47
  474.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  475.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 4
  476.           0x50494e32
  477.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  478.           0x0780
  479.       classAttributes CommonAuthenticationObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  480.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  481.           0x02
  482.       typeAttributes : tag = [1] constructed; length = 28
  483.         PinAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 26
  484.           pinFlags PinFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  485.             0x022c
  486.           pinType PinType ENUMERATED: tag = [UNIVERSAL 10] primitive; length = 1
  487.             0
  488.           minLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  489.             4
  490.           storedLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  491.             8
  492.           padChar OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  493.             0xff
  494.           path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  495.             path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 6
  496.               0x3f0050150100
  497.  
  498. 1.6.3 DER encoding
  499.  
  500. 3025300A 0C045049 4E310302 07803003 040101A1 12301003 02022C0A
  501. 01000201 04020108 0401FF30 2F300A0C 0450494E 32030207 80300304
  502. 0102A11C 301A0302 022C0A01 00020104 02010804 01FF3008 04063F00
  503. 50150100
  504.  
  505. 1.7 EF(DODF)
  506.  
  507. The size of the data is 41 bytes (one record). The data entry in file
  508. 3F00/5015/4431 is to be found 64 bytes from the beginning of the file
  509. and is 48 bytes long. 
  510.  
  511. 1.7.1 Value notation
  512.  
  513.   opaqueDO : 
  514.     {
  515.       commonObjectAttributes 
  516.       {
  517.         label "OBJECT1",
  518.         flags { private, modifiable },
  519.         authId '02'H
  520.       },
  521.       classAttributes 
  522.       {
  523.         applicationName "APP"
  524.       },
  525.       typeAttributes indirect : path : 
  526.           {
  527.             path '4431'H,
  528.             index 64,
  529.             length 48
  530.           }
  531.     }
  532.  
  533. 1.7.2 ASN.1 dump
  534.  
  535.   DataType CHOICE
  536.     opaqueDO SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 39
  537.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 16
  538.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 7
  539.           0x4f424a45435431
  540.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  541.           0x06c0
  542.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  543.           0x02
  544.       classAttributes CommonDataObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 5
  545.         applicationName Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 3
  546.           0x415050
  547.       typeAttributes : tag = [1] constructed; length = 12
  548.         Opaque CHOICE
  549.           indirect CHOICE
  550.             path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  551.               path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  552.                 0x4431
  553.               index INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  554.                 64
  555.               length INTEGER: tag = [0] primitive; length = 1
  556.                 48
  557.  
  558. 1.7.3 DER encoding
  559.  
  560. 30273010 0C074F42 4A454354 31030206 C0040102 30050C03 415050A1
  561. 0C300A04 02443102 01408001 30
  562.  
  563. 2. Example of a PKCS #15 application for a DIN NI-17.4 [7] digital
  564.    signature card.
  565.  
  566. The IC card in this example has on-chip support for RSA and
  567. DES-EDE-CBC algorithm computation in addition to hashing and MACing.
  568. This information can be read from the TokenInfo files
  569. supportedAlgorithms field. The PKCS #15 application does not contain
  570. any files except TokenInfo, ODF, CDF, PrKDF, PuKDF, AODF, and DODF -
  571. all objects reside in the (parallell) DIN NI-17.4 application.
  572.  
  573. There are two private keys, and four trusted public keys; each one of
  574. these public keys belongs to some CA. One of the private keys is for
  575. non-repudiation digital signature purposes only, and is protected
  576. with a combination of authentication objects, the other one is for
  577. the purpose of authenticating the ICC itself.
  578.  
  579. In the 'trustedCertificates' file there are 4 certificates; one for
  580. the cardholder's non-repudiation key, one card-verifiable certificate
  581. for the ICC, and two CA certificates.
  582.  
  583. The AODF contains not only PINs two biometric objects and one object
  584. containing information about a used 'cha' authentication method.
  585.  
  586. DODF contains pointers to files specified in DIN NI-17.4.
  587.  
  588. 2.1 EF(DIR)
  589.  
  590. The file contains two records. The AID in the second record is the
  591. AID for the German digital signature application.
  592.  
  593. 2.1.1 Value notation
  594.  
  595.   {
  596.     aid 'A000000063504B532D3135'H,
  597.     label "PKCS#15 application",
  598.     path '3F005015'H
  599.   },
  600.   {
  601.     aid 'D27600006601'H,
  602.     label "German digital signature card",
  603.     path '3F004016'H
  604.   }
  605.  
  606. 2.1.2 ASN.1 dump
  607.  
  608.   DIRRecord SEQUENCE: tag = [APPLICATION 1] constructed; length = 40
  609.     aid OCTET STRING: tag = [APPLICATION 15] primitive; length = 11
  610.       0xa000000063504b532d3135
  611.     label UTF8String: tag = [APPLICATION 16] primitive; length = 19
  612.       0x504b4353233135206170706c69636174696f6e
  613.     path OCTET STRING: tag = [APPLICATION 17] primitive; length = 4
  614.       0x3f005015
  615.   DIRRecord SEQUENCE: tag = [APPLICATION 1] constructed; length = 45
  616.     aid OCTET STRING: tag = [APPLICATION 15] primitive; length = 6
  617.       0xd27600006601
  618.     label UTF8String: tag = [APPLICATION 16] primitive; length = 29
  619.       0x4765726d616e206469676974616c207369676e61747572652063617264
  620.     path OCTET STRING: tag = [APPLICATION 17] primitive; length = 4
  621.       0x3f004016
  622.  
  623. 2.1.3 DER encoding
  624.  
  625. 61284F0B A0000000 63504B53 2D313550 13504B43 53233135 20617070
  626. 6C696361 74696F6E 51043F00 5015612D 4F06D276 00006601 501D4765
  627. 726D616E 20646967 6974616C 20736967 6E617475 72652063 61726451
  628. 043F0040 16
  629.  
  630. 2.2 EF(TokenInfo)
  631.  
  632. 2.2.1 Value notation
  633.  
  634. {
  635.   version v1,
  636.   serialNumber '159752222515401240'H, -- ICSN
  637.   manufacturerID "XY, Inc.", -- Card manufacturer
  638.   label "Digital signature card",
  639.   tokenflags { prnGeneration },
  640.   seInfo 
  641.   {
  642.     {
  643.       se 1,
  644.       owner { 1 0 0 }
  645.     } -- Fictive OID, , the external world must know which features
  646.     -- the security environment includes.
  647.     -- recordInfo is not present, i.e. EF(ODF), EF(PrKDF), EF(PuKDF),
  648.     -- EF(CDF), EF(DODF) and EF(AODF) are transparent files. 
  649.   },
  650.   supportedAlgorithms 
  651.   {
  652.     {
  653.       reference 1,
  654.       algorithm 1,
  655.       parameters NULL : NULL,
  656.       supportedOperations { hash },
  657.       algId { 1 3 14 3 2 26 }
  658.     },
  659.     {
  660.       reference 2,
  661.       algorithm 2,
  662.       -- OID of RSA with DSI according ISO/IEC 9796-2    
  663.       parameters NULL : NULL,
  664.       supportedOperations { compute-signature },
  665.       algId { 1 3 36 3 4 3 2 1 }
  666.     },
  667.     {
  668.       reference 3,
  669.       algorithm 3,
  670.       parameters NULL : NULL,
  671.       supportedOperations { compute-checksum, verify-checksum },
  672.       algId { 1 0 0 } -- MAC-algorithm: xxx = OID of Retail-MAC with DES
  673.     },
  674.     {
  675.       reference 4,
  676.       algorithm 4,
  677.       -- Triple-DES in CBC-Mode with IV='00'  
  678.       parameters ParameterString : '0000000000000000'H,
  679.       supportedOperations { encipher, decipher },
  680.       algId { 1 2 840 113549 3 7 }
  681.     }
  682.   },
  683.   issuerId "wxy", -- contains information about the token issuer
  684.   holderId "vwx", -- contains information about the token holder
  685.   lastUpdate referencedTime : path : 
  686.         path '4444'H -- local file identifier, contains time of last
  687.     -- change 
  688.       }
  689. }
  690.  
  691. 2.2.2 ASN.1 dump
  692.  
  693. TokenInfo SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 177
  694.   version INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  695.     0
  696.   serialNumber OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 9
  697.     0x159752222515401240
  698.   manufacturerID Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 8
  699.     0x58592c20496e632e
  700.   label Label UTF8String: tag = [0] primitive; length = 22
  701.     0x4469676974616c207369676e61747572652063617264
  702.   tokenflags TokenFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  703.     0x0520
  704.   seInfo SEQUENCE OF: tag = [UNIVERSAL 16] constructed; length = 9
  705.     SecurityEnvironmentInfo SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 7
  706.       se INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  707.         1
  708.       owner OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 2
  709.         { 1 0 0 }
  710.   supportedAlgorithms SEQUENCE OF: tag = [2] constructed; length = 94
  711.     AlgorithmInfo SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 19
  712.       reference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  713.         1
  714.       algorithm INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  715.         1
  716.       parameters OpenType
  717.         0x0500
  718.       supportedOperations Operations BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  719.         0x0102
  720.       algId OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 5
  721.         { 1 3 14 3 2 26 }
  722.     AlgorithmInfo SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 21
  723.       reference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  724.         2
  725.       algorithm INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  726.         2
  727.       parameters OpenType
  728.         0x0500
  729.       supportedOperations Operations BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  730.         0x0640
  731.       algId OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 7
  732.         { 1 3 36 3 4 3 2 1 }
  733.     AlgorithmInfo SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 16
  734.       reference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  735.         3
  736.       algorithm INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  737.         3
  738.       parameters OpenType
  739.         0x0500
  740.       supportedOperations Operations BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  741.         0x05a0
  742.       algId OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 2
  743.         { 1 0 0 }
  744.     AlgorithmInfo SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 30
  745.       reference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  746.         4
  747.       algorithm INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  748.         4
  749.       parameters OpenType
  750.         0x04080000000000000000
  751.       supportedOperations Operations BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  752.         0x020c
  753.       algId OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 8
  754.         { 1 2 840 113549 3 7 }
  755.   issuerId Label UTF8String: tag = [3] primitive; length = 3
  756.     0x777879
  757.   holderId Label UTF8String: tag = [4] primitive; length = 3
  758.     0x767778
  759.   lastUpdate : tag = [5] constructed; length = 6
  760.     LastUpdate CHOICE
  761.       referencedTime CHOICE
  762.         path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  763.           path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  764.             0x4444
  765.  
  766. 2.2.3 DER encoding
  767.  
  768. 3081B102 01000409 15975222 25154012 400C0858 592C2049 6E632E80 16446967
  769. 6974616C 20736967 6E617475 72652063 61726403 02052030 09300702 01010602
  770. 2800A25E 30130201 01020101 05000302 01020605 2B0E0302 1A301502 01020201
  771. 02050003 02064006 072B2403 04030201 30100201 03020103 05000302 05A00602
  772. 2800301E 02010402 01040408 00000000 00000000 0302020C 06082A86 4886F70D
  773. 03078303 77787984 03767778 A5063004 04024444
  774.  
  775. 2.3 EF(ODF)
  776.  
  777. 2.3.1 Value notation
  778.  
  779.     privateKeys :  path : {
  780.         path     '6034'H, -- path to EF(PrKDF), located under DF.PKCS#15
  781.     },
  782.     trustedPublicKeys :   path : {                
  783.         path     '6035'H, -- path to EF(PuKDF), located under DF.PKCS#15
  784.     },
  785.     trustedCertificates : path : {                
  786.         path     '6036'H, -- path to EF(CDF),   located under DF.PKCS#15
  787.     },
  788.     dataObjects:   path : {
  789.         path     '6037'H, -- path to EF(DODF),  located under DF.PKCS#15
  790.     },
  791.     authObjects :  path : {
  792.         path     '6038'H, -- path to EF(AODF),  located under DF.PKCS#15
  793.     }
  794.  
  795. 2.3.2 ASN.1 dump
  796.  
  797.   PKCS15Objects CHOICE
  798.     privateKeys : tag = [0] constructed; length = 6
  799.       PrivateKeys CHOICE
  800.         path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  801.           path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  802.             0x6034
  803.   PKCS15Objects CHOICE
  804.     trustedPublicKeys : tag = [2] constructed; length = 6
  805.       PublicKeys CHOICE
  806.         path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  807.           path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  808.             0x6035
  809.   PKCS15Objects CHOICE
  810.     trustedCertificates : tag = [5] constructed; length = 6
  811.       Certificates CHOICE
  812.         path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  813.           path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  814.             0x6036
  815.   PKCS15Objects CHOICE
  816.     dataObjects : tag = [7] constructed; length = 6
  817.       DataObjects CHOICE
  818.         path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  819.           path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  820.             0x6037
  821.   PKCS15Objects CHOICE
  822.     authObjects : tag = [8] constructed; length = 6
  823.       AuthObjects CHOICE
  824.         path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 4
  825.           path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 2
  826.             0x6038
  827.  
  828. 2.3.3 DER encoding
  829.  
  830. A0063004 04026034 A2063004 04026035 A5063004 04026036 A7063004
  831. 04026037 A8063004 04026038
  832.  
  833. 2.4 EF(PrKDF)
  834.  
  835. 2.4.1 Value notation
  836.  
  837.     privateRSAKey : {
  838.         commonObjectAttributes {
  839.             label    "PrK.CH.DS", -- PrK of cardholder for digital
  840.                         -- signature
  841.             userConsent 3, -- new authentication will be required
  842.             -- before the first, 4th, 7th, etc. access. 
  843.             -- Use the following authentication possiblities
  844.         accessControlRules {
  845.         {
  846.                     accessMode      {execute},
  847.             securityCondition or : {authId : '07'H, authId : '0A'H}
  848.                 }
  849.                 }
  850.             },
  851.         classAttributes {
  852.             iD '01'H, -- PKCS#15 identifier for the related key
  853.             usage {nonRepudiation},
  854.         keyReference 130  -- 0x82, key id in the card of PrK.ICC.DS
  855.             },
  856.         subClassAttributes {
  857.         subjectName rdnSequence : {} -- DN of PrK owner as
  858.                 -- specified in the X.509 certificate containing the PuK
  859.             },
  860.         typeAttributes {
  861.             value indirect : path : {
  862.                 path ''H, -- no FID given 
  863.             },
  864.             modulusLength 1024 
  865.             }
  866.         },
  867.     privateRSAKey : {
  868.         commonObjectAttributes {            
  869.             label  "PrK.ICC.AUT", -- PrK of ICC for authentication 
  870.             flags  {private},
  871.             authId '07'H
  872.             },
  873.         classAttributes {                    
  874.             iD '02'H,
  875.              usage {sign}, -- corresponds to X.509 digitalSignature
  876.         keyReference 129  -- 0x81, key id in the card of PrK.ICC.AUT
  877.             },
  878.         typeAttributes {        
  879.             value indirect : path : {
  880.                 path ''H, -- no FID given
  881.         },
  882.             modulusLength 1024
  883.             }
  884.         }
  885.  
  886. 2.4.2 ASN.1 dump
  887.  
  888.   PrivateKeyType CHOICE
  889.     privateRSAKey SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 64
  890.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 30
  891.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 9
  892.           0x50724b2e43482e4453
  893.         userConsent INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  894.           3
  895.         accessControlRules SEQUENCE OF: tag = [UNIVERSAL 16] constructed; length = 14
  896.           AccessControlRule SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 12
  897.             accessMode AccessMode BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  898.               0x0520
  899.             securityCondition SecurityCondition CHOICE
  900.               or SEQUENCE OF: tag = [2] constructed; length = 6
  901.                 SecurityCondition CHOICE
  902.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  903.                     0x07
  904.                 SecurityCondition CHOICE
  905.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  906.                     0x0a
  907.       classAttributes CommonKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 12
  908.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  909.           0x01
  910.         usage KeyUsageFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 3
  911.           0x060040
  912.         keyReference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  913.           130
  914.       subClassAttributes : tag = [0] constructed; length = 4
  915.         CommonPrivateKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 2
  916.           subjectName Name CHOICE
  917.             rdnSequence RDNSequence SEQUENCE OF: tag = [UNIVERSAL 16] constructed; length = 0
  918.       typeAttributes : tag = [1] constructed; length = 10
  919.         PrivateRSAKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  920.           value CHOICE
  921.             indirect CHOICE
  922.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 2
  923.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 0
  924.                   0x
  925.           modulusLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  926.             1024
  927.   PrivateKeyType CHOICE
  928.     privateRSAKey SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 47
  929.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 20
  930.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 11
  931.           0x50724b2e4943432e415554
  932.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  933.           0x0780
  934.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  935.           0x07
  936.       classAttributes CommonKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 11
  937.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  938.           0x02
  939.         usage KeyUsageFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  940.           0x0520
  941.         keyReference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  942.           129
  943.       typeAttributes : tag = [1] constructed; length = 10
  944.         PrivateRSAKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  945.           value CHOICE
  946.             indirect CHOICE
  947.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 2
  948.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 0
  949.                   0x
  950.           modulusLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  951.             1024
  952.  
  953. 2.4.3 DER encoding
  954.  
  955. 3040301E 0C095072 4B2E4348 2E445302 0103300E 300C0302 0520A206 
  956. 04010704 010A300C 04010103 03060040 02020082 A0043002 3000A10A 
  957. 30083002 04000202 0400302F 30140C0B 50724B2E 4943432E 41555403 
  958. 02078004 0107300B 04010203 02052002 020081A1 0A300830 02040002 
  959. 020400
  960.  
  961. 2.5 EF(PuKDF)
  962.  
  963. 2.5.1 Value notation
  964.  
  965.     publicRSAKey : {
  966.         commonObjectAttributes {      
  967.             label "PuK.RCA.DS", -- Public key of root CA
  968.             },
  969.         classAttributes {                    
  970.             iD      '03'H,
  971.             usage {nonRepudiation}, -- corresponds to X.509 keyCertSign
  972.             keyReference 4 -- key ref as used in the cards, i.e. the
  973.             -- certificate authority reference, which is taken as 
  974.             -- authority key id 
  975.             },
  976.         subClassAttributes {                
  977.             subjectName rdnSequence : {} -- DN of root CA
  978.             },
  979.         typeAttributes {
  980.             value indirect : path : {
  981.                 path '3F004016B000'H, -- path to EF.PK.RCA.DS
  982.                 },
  983.             modulusLength 1024
  984.             }
  985.         },
  986.     publicRSAKey : {
  987.         commonObjectAttributes {            
  988.             label "PuK.CA.DS", -- PuK of CA
  989.             },
  990.         classAttributes {                    
  991.             iD '04'H,
  992.              usage {nonRepudiation},
  993.             keyReference 5
  994.             },
  995.         subClassAttributes {                
  996.         subjectName rdnSequence : {} -- DN of CA
  997.             },
  998.         typeAttributes {        
  999.             value indirect : path : {
  1000.                 path '3F004016B001'H, -- path to EF.PK.CA.DS
  1001.                 },
  1002.             modulusLength 1024
  1003.             }
  1004.         },
  1005.     publicRSAKey : {
  1006.         commonObjectAttributes {            
  1007.             label "PuK.RCA.CS_AUT",
  1008.         },
  1009.         classAttributes {                    
  1010.             iD '05'H,
  1011.              usage      {nonRepudiation},
  1012.         keyReference 2
  1013.             },
  1014.         subClassAttributes {                
  1015.         subjectName rdnSequence : {} -- DN of root CA
  1016.             },
  1017.         typeAttributes {        
  1018.             value indirect : path : {
  1019.                 path ''H -- PuK for internal use, no FID given
  1020.                 },    
  1021.             modulusLength 1024
  1022.             }
  1023.          },
  1024.     publicRSAKey : {
  1025.         commonObjectAttributes {            
  1026.             label "PuK.CA.CS_AUT",
  1027.             },
  1028.         classAttributes {                    
  1029.             iD '06'H,
  1030.              usage      {nonRepudiation},
  1031.         keyReference 9 -- Key Ref in MSE:SET command
  1032.             },
  1033.         subClassAttributes {                
  1034.         subjectName rdnSequence : {} -- DN of CA
  1035.             },
  1036.         typeAttributes {        
  1037.             value indirect : path : {
  1038.                 path ''H -- PuK for internal use, no FID given
  1039.                 },    
  1040.             modulusLength 1024
  1041.             }
  1042.         }
  1043.  
  1044. 2.5.2 ASN.1 dump
  1045.  
  1046.   PublicKeyType CHOICE
  1047.     publicRSAKey SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 51
  1048.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 12
  1049.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 10
  1050.           0x50754b2e5243412e4453
  1051.       classAttributes CommonKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 11
  1052.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1053.           0x03
  1054.         usage KeyUsageFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 3
  1055.           0x060040
  1056.         keyReference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  1057.           4
  1058.       subClassAttributes : tag = [0] constructed; length = 4
  1059.         CommonPublicKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 2
  1060.           subjectName Name CHOICE
  1061.             rdnSequence RDNSequence SEQUENCE OF: tag = [UNIVERSAL 16] constructed; length = 0
  1062.       typeAttributes : tag = [1] constructed; length = 16
  1063.         PublicRSAKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 14
  1064.           value CHOICE
  1065.             indirect CHOICE
  1066.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1067.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 6
  1068.                   0x3f004016b000
  1069.           modulusLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  1070.             1024
  1071.   PublicKeyType CHOICE
  1072.     publicRSAKey SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 50
  1073.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 11
  1074.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 9
  1075.           0x50754b2e43412e4453
  1076.       classAttributes CommonKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 11
  1077.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1078.           0x04
  1079.         usage KeyUsageFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 3
  1080.           0x060040
  1081.         keyReference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  1082.           5
  1083.       subClassAttributes : tag = [0] constructed; length = 4
  1084.         CommonPublicKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 2
  1085.           subjectName Name CHOICE
  1086.             rdnSequence RDNSequence SEQUENCE OF: tag = [UNIVERSAL 16] constructed; length = 0
  1087.       typeAttributes : tag = [1] constructed; length = 16
  1088.         PublicRSAKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 14
  1089.           value CHOICE
  1090.             indirect CHOICE
  1091.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1092.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 6
  1093.                   0x3f004016b001
  1094.           modulusLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  1095.             1024
  1096.   PublicKeyType CHOICE
  1097.     publicRSAKey SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 49
  1098.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 16
  1099.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 14
  1100.           0x50754b2e5243412e43535f415554
  1101.       classAttributes CommonKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 11
  1102.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1103.           0x05
  1104.         usage KeyUsageFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 3
  1105.           0x060040
  1106.         keyReference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  1107.           2
  1108.       subClassAttributes : tag = [0] constructed; length = 4
  1109.         CommonPublicKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 2
  1110.           subjectName Name CHOICE
  1111.             rdnSequence RDNSequence SEQUENCE OF: tag = [UNIVERSAL 16] constructed; length = 0
  1112.       typeAttributes : tag = [1] constructed; length = 10
  1113.         PublicRSAKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1114.           value CHOICE
  1115.             indirect CHOICE
  1116.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 2
  1117.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 0
  1118.                   0x
  1119.           modulusLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  1120.             1024
  1121.   PublicKeyType CHOICE
  1122.     publicRSAKey SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 48
  1123.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 15
  1124.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 13
  1125.           0x50754b2e43412e43535f415554
  1126.       classAttributes CommonKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 11
  1127.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1128.           0x06
  1129.         usage KeyUsageFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 3
  1130.           0x060040
  1131.         keyReference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  1132.           9
  1133.       subClassAttributes : tag = [0] constructed; length = 4
  1134.         CommonPublicKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 2
  1135.           subjectName Name CHOICE
  1136.             rdnSequence RDNSequence SEQUENCE OF: tag = [UNIVERSAL 16] constructed; length = 0
  1137.       typeAttributes : tag = [1] constructed; length = 10
  1138.         PublicRSAKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1139.           value CHOICE
  1140.             indirect CHOICE
  1141.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 2
  1142.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 0
  1143.                   0x
  1144.           modulusLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  1145.             1024
  1146.  
  1147. 2.5.3 DER encoding
  1148.  
  1149. 3033300C 0C0A5075 4B2E5243 412E4453 300B0401 03030306 00400201
  1150. 04A00430 023000A1 10300E30 0804063F 004016B0 00020204 00303230
  1151. 0B0C0950 754B2E43 412E4453 300B0401 04030306 00400201 05A00430
  1152. 023000A1 10300E30 0804063F 004016B0 01020204 00303130 100C0E50
  1153. 754B2E52 43412E43 535F4155 54300B04 01050303 06004002 0102A004
  1154. 30023000 A10A3008 30020400 02020400 3030300F 0C0D5075 4B2E4341
  1155. 2E43535F 41555430 0B040106 03030600 40020109 A0043002 3000A10A
  1156. 30083002 04000202 0400
  1157.  
  1158. 2.6 EF(CDF)
  1159.  
  1160. 2.6.1 Value notation
  1161.  
  1162.     x509Certificate : {
  1163.         commonObjectAttributes {     
  1164.             label "C.CH.DS",
  1165.         accessControlRules {
  1166.         {
  1167.                     accessMode        {read},
  1168.             securityCondition or : {authId : '07'H, authId : '0A'H}
  1169.             }
  1170.                 }
  1171.             },
  1172.         classAttributes {
  1173.             iD'01'H    -- related to private RSA key with id '01'H
  1174.             },
  1175.         typeAttributes {    -- see clause 6.6.2
  1176.             value indirect : path : {
  1177.                 path '3F004016C000'H,    -- path to EF.C.CH.DS
  1178.                 } 
  1179.             }
  1180.         },
  1181.     x509Certificate : {
  1182.         commonObjectAttributes {    
  1183.             label "C.CA.DS",
  1184.             },
  1185.         classAttributes {                
  1186.             iD'04'H,
  1187.              authority    TRUE
  1188.             },
  1189.         typeAttributes {        
  1190.             value indirect : path : {
  1191.                 path '3F004016C008'H,    -- path to EF.C.CA.DS
  1192.                 }
  1193.             }
  1194.         },
  1195.     cvCertificate : { 
  1196.         commonObjectAttributes {            
  1197.             label "C.ICC.AUT",
  1198.         },
  1199.         classAttributes {                    
  1200.             iD '02'H -- related to private RSA key with id '02'H
  1201.             },
  1202.         typeAttributes {
  1203.             value indirect : path : {
  1204.                 path '3F004016C100'H,    -- path to EF.C.ICC.AUT
  1205.                 }
  1206.             }
  1207.         },
  1208.     cvCertificate : {
  1209.         commonObjectAttributes {            
  1210.             label "C.CA.AUT",
  1211.         },
  1212.         classAttributes {                    
  1213.             iD '06'H,
  1214.         authority    TRUE
  1215.             },
  1216.         typeAttributes {        
  1217.             value indirect : path : {
  1218.                 path '3F004016C108'H,    -- path to EF.C.CA.AUT
  1219.                 }    
  1220.             }
  1221.         }
  1222.  
  1223. 2.6.2 ASN.1 dump
  1224.  
  1225.   CertificateType CHOICE
  1226.     x509Certificate SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 46
  1227.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 25
  1228.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 7
  1229.           0x432e43482e4453
  1230.         accessControlRules SEQUENCE OF: tag = [UNIVERSAL 16] constructed; length = 14
  1231.           AccessControlRule SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 12
  1232.             accessMode AccessMode BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1233.               0x0780
  1234.             securityCondition SecurityCondition CHOICE
  1235.               or SEQUENCE OF: tag = [2] constructed; length = 6
  1236.                 SecurityCondition CHOICE
  1237.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1238.                     0x07
  1239.                 SecurityCondition CHOICE
  1240.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1241.                     0x0a
  1242.       classAttributes CommonCertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  1243.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1244.           0x01
  1245.       typeAttributes : tag = [1] constructed; length = 12
  1246.         X509CertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  1247.           value CHOICE
  1248.             indirect CHOICE
  1249.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1250.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 6
  1251.                   0x3f004016c000
  1252.   CertificateType CHOICE
  1253.     x509Certificate SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 33
  1254.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 9
  1255.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 7
  1256.           0x432e43412e4453
  1257.       classAttributes CommonCertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 6
  1258.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1259.           0x04
  1260.         authority BOOLEAN: tag = [UNIVERSAL 1] primitive; length = 1
  1261.           TRUE
  1262.       typeAttributes : tag = [1] constructed; length = 12
  1263.         X509CertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  1264.           value CHOICE
  1265.             indirect CHOICE
  1266.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1267.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 6
  1268.                   0x3f004016c008
  1269.   CertificateType CHOICE
  1270.     cvCertificate SEQUENCE: tag = [5] constructed; length = 32
  1271.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 11
  1272.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 9
  1273.           0x432e4943432e415554
  1274.       classAttributes CommonCertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  1275.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1276.           0x02
  1277.       typeAttributes : tag = [1] constructed; length = 12
  1278.         CVCertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  1279.           value CHOICE
  1280.             indirect CHOICE
  1281.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1282.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 6
  1283.                   0x3f004016c100
  1284.   CertificateType CHOICE
  1285.     cvCertificate SEQUENCE: tag = [5] constructed; length = 34
  1286.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  1287.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 8
  1288.           0x432e43412e415554
  1289.       classAttributes CommonCertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 6
  1290.         iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1291.           0x06
  1292.         authority BOOLEAN: tag = [UNIVERSAL 1] primitive; length = 1
  1293.           TRUE
  1294.       typeAttributes : tag = [1] constructed; length = 12
  1295.         CVCertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  1296.           value CHOICE
  1297.             indirect CHOICE
  1298.               path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1299.                 path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 6
  1300.                   0x3f004016c108
  1301.  
  1302. 2.6.3 DER encoding
  1303.  
  1304. 302E3019 0C07432E 43482E44 53300E30 0C030207 80A20604 01070401
  1305. 0A300304 0101A10C 300A3008 04063F00 4016C000 30213009 0C07432E
  1306. 43412E44 53300604 01040101 FFA10C30 0A300804 063F0040 16C008A5
  1307. 20300B0C 09432E49 43432E41 55543003 040102A1 0C300A30 0804063F
  1308. 004016C1 00A52230 0A0C0843 2E43412E 41555430 06040106 0101FFA1
  1309. 0C300A30 0804063F 004016C1 08 
  1310.  
  1311. 2.7 EF(AODF)
  1312.  
  1313. 2.7.1 Value notation
  1314.  
  1315.     pin : {
  1316.         commonObjectAttributes {            
  1317.             label "PIN authentication",
  1318.         flags {private, modifiable},
  1319.             authId '08'H -- link to unblocking PIN
  1320.         },
  1321.         classAttributes {
  1322.             authId '07'H
  1323.             },
  1324.         typeAttributes {
  1325.             pinFlags {case-sensitive, -- no conversion to uppercase
  1326.                       local, -- i.e. DF-specific
  1327.               initialized,
  1328.               exchangeRefData},
  1329.             pinType   utf8,  -- character coding for PIN/password
  1330.             minLength 6,
  1331.             storedLength 0,  -- not information given
  1332.             maxLength 8,
  1333.             pinReference 81  -- P2 of VERIFY/CHANGE RD command
  1334.             }
  1335.         },
  1336.     pin : {
  1337.         commonObjectAttributes {            
  1338.             label "PIN authentication for resetting code",
  1339.           flags {private}
  1340.             },
  1341.         classAttributes {
  1342.             authId '08'H
  1343.             },
  1344.         typeAttributes  { 
  1345.             pinFlags     {local, initialized, unblockingPin},
  1346.             pinType      iso9564-1,
  1347.             minLength     8,
  1348.             storedLength 0, -- no information given
  1349.             maxLength     8,
  1350.             pinReference 81 -- P2 of VERIFY/CHANGE RD command
  1351.             }
  1352.         },   
  1353.     biometricTemplate : {
  1354.         commonObjectAttributes {            
  1355.             label "Biometric finger print as user authentication",
  1356.            flags {private, modifiable},
  1357.         },
  1358.         classAttributes {
  1359.             authId '0A'H
  1360.             },
  1361.         typeAttributes {
  1362.             bioFlags {local, -- i.e. DF-specific -- initialized},
  1363.           templateId {1 0 0}, -- Fake OID, identifies the data structure
  1364.                     -- of finger print
  1365.            bioType fingerPrint : {
  1366.                 hand right,
  1367.                 finger thumb
  1368.             },
  1369.             bioReference 145, -- 0x91, P2 of VERIFY/CHANGE RD command
  1370.         }
  1371.         },
  1372.     biometricTemplate : {
  1373.         commonObjectAttributes {            
  1374.             label "Biometric iris scan as resetting code",
  1375.          flags {private},
  1376.             },
  1377.         classAttributes {
  1378.             authId '0B'H
  1379.             },
  1380.         typeAttributes {
  1381.             bioFlags {local, -- i.e. DF-specific -- initialized},
  1382.         templateId {1 0 0}, -- Fake OID, identifies the data structure
  1383.                 -- of iris scan
  1384.             bioType irisScan : {
  1385.                 eye left
  1386.             },
  1387.             bioReference 145 -- 0x91, P2 of VERIFY/CHANGE RD command
  1388.         }
  1389.         },
  1390.     external : {
  1391.         commonObjectAttributes {            
  1392.             label "Certificate holder authorisation",
  1393.             },
  1394.         classAttributes {                    
  1395.             authId '09'H
  1396.             },
  1397.         typeAttributes certBasedAttributes : {
  1398.         cha 'D2760000660102'H  -- AID with role Id 02 as defined for 
  1399.                                    -- the CV certifcate to be presented as
  1400.                    -- part of the authentication procedure
  1401.                    -- for getting access to the EF 
  1402.                                    -- containing the display message
  1403.             }
  1404.         }
  1405.  
  1406. 2.7.2 ASN.1 dump
  1407.  
  1408.   AuthenticationType CHOICE
  1409.     pin SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 58
  1410.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 27
  1411.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 18
  1412.           0x50494e2061757468656e7469636174696f6e
  1413.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1414.           0x06c0
  1415.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1416.           0x08
  1417.       classAttributes CommonAuthenticationObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  1418.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1419.           0x07
  1420.       typeAttributes : tag = [1] constructed; length = 22
  1421.         PinAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 20
  1422.           pinFlags PinFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 3
  1423.             0x04c810
  1424.           pinType PinType ENUMERATED: tag = [UNIVERSAL 10] primitive; length = 1
  1425.             2
  1426.           minLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  1427.             6
  1428.           storedLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  1429.             0
  1430.           maxLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  1431.             8
  1432.           pinReference Reference INTEGER: tag = [0] primitive; length = 1
  1433.             81
  1434.   AuthenticationType CHOICE
  1435.     pin SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 73
  1436.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 43
  1437.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 37
  1438.           0x50494e2061757468656e7469636174696f6e20666f7220726573657474696e6720636f...
  1439.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1440.           0x0780
  1441.       classAttributes CommonAuthenticationObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  1442.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1443.           0x08
  1444.       typeAttributes : tag = [1] constructed; length = 21
  1445.         PinAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 19
  1446.           pinFlags PinFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1447.             0x014a
  1448.           pinType PinType ENUMERATED: tag = [UNIVERSAL 10] primitive; length = 1
  1449.             4
  1450.           minLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  1451.             8
  1452.           storedLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  1453.             0
  1454.           maxLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  1455.             8
  1456.           pinReference Reference INTEGER: tag = [0] primitive; length = 1
  1457.             81
  1458.   AuthenticationType CHOICE
  1459.     biometricTemplate SEQUENCE: tag = [0] constructed; length = 82
  1460.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 51
  1461.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 45
  1462.           0x42696f6d65747269632066696e676572207072696e7420617320757365722061757468...
  1463.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1464.           0x06c0
  1465.       classAttributes CommonAuthenticationObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  1466.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1467.           0x0a
  1468.       typeAttributes : tag = [1] constructed; length = 22
  1469.         BiometricAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 20
  1470.           bioFlags BiometricFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1471.             0x0348
  1472.           templateId OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 2
  1473.             { 1 0 0 }
  1474.           bioType BiometricType CHOICE
  1475.             fingerPrint FingerPrint SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 6
  1476.               hand ENUMERATED: tag = [UNIVERSAL 10] primitive; length = 1
  1477.                 1
  1478.               finger ENUMERATED: tag = [UNIVERSAL 10] primitive; length = 1
  1479.                 0
  1480.           bioReference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  1481.             145
  1482.   AuthenticationType CHOICE
  1483.     biometricTemplate SEQUENCE: tag = [0] constructed; length = 71
  1484.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 43
  1485.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 37
  1486.           0x42696f6d65747269632069726973207363616e20617320726573657474696e6720636f...
  1487.         flags CommonObjectFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1488.           0x0780
  1489.       classAttributes CommonAuthenticationObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  1490.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1491.           0x0b
  1492.       typeAttributes : tag = [1] constructed; length = 19
  1493.         BiometricAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 17
  1494.           bioFlags BiometricFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1495.             0x0348
  1496.           templateId OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 2
  1497.             { 1 0 0 }
  1498.           bioType BiometricType CHOICE
  1499.             irisScan IrisScan SEQUENCE: tag = [0] constructed; length = 3
  1500.               eye ENUMERATED: tag = [UNIVERSAL 10] primitive; length = 1
  1501.                 0
  1502.           bioReference Reference INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  1503.             145
  1504.   AuthenticationType CHOICE
  1505.     external SEQUENCE: tag = [2] constructed; length = 54
  1506.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 34
  1507.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 32
  1508.           0x436572746966696361746520686f6c64657220617574686f7269736174696f6e
  1509.       classAttributes CommonAuthenticationObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  1510.         authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1511.           0x09
  1512.       typeAttributes : tag = [1] constructed; length = 11
  1513.         ExternalAuthObjectAttributes CHOICE
  1514.           certBasedAttributes CertBasedAuthenticationAttributes SEQUENCE: tag = [0] constructed; length = 9
  1515.             cha OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 7
  1516.               0xd2760000660102
  1517.  
  1518. 2.7.3 DER encoding
  1519.  
  1520. 303A301B 0C125049 4E206175 7468656E 74696361 74696F6E 030206C0
  1521. 04010830 03040107 A1163014 030304C8 100A0102 02010602 01000201 08800151
  1522. 3049302B 0C255049 4E206175 7468656E 74696361 74696F6E 20666F72 20726573
  1523. 65747469 6E672063 6F646503 02078030 03040108 A1153013 0302014A 0A010402
  1524. 01080201 00020108 800151A0 5230330C 2D42696F 6D657472 69632066 696E6765
  1525. 72207072 696E7420 61732075 73657220 61757468 656E7469 63617469 6F6E0302
  1526. 06C03003 04010AA1 16301403 02034806 02280030 060A0101 0A010002 020091A0
  1527. 47302B0C 2542696F 6D657472 69632069 72697320 7363616E 20617320 72657365
  1528. 7474696E 6720636F 64650302 07803003 04010BA1 13301103 02034806 022800A0
  1529. 030A0100 02020091 A2363022 0C204365 72746966 69636174 6520686F 6C646572
  1530. 20617574 686F7269 73617469 6F6E3003 040109A1 0BA00904 07D27600 00660102
  1531.  
  1532. 2.8 EF(DODF)
  1533.  
  1534. 2.8.1 Value notation
  1535.  
  1536.     opaqueDO : {
  1537.     commonObjectAttributes {
  1538.         label "EF.PROT",
  1539.         accessControlRules {
  1540.             {
  1541.                     accessMode {read},
  1542.             securityCondition or: {authId : '07'H , authId : '0A'H}
  1543.             },
  1544.             {
  1545.                     accessMode {update},
  1546.             securityCondition or: {authId : '07'H , authId : '0A'H}
  1547.             }
  1548.             }
  1549.     },
  1550.         classAttributes {
  1551.             applicationName "DIN NI-17.4"
  1552.         },
  1553.         typeAttributes indirect : path : {
  1554.             path '3F004016A000'H, -- path to EF.PROT
  1555.             }
  1556.         },
  1557.     opaqueDO : {
  1558.     commonObjectAttributes {
  1559.         label "EF.GDO",
  1560.     },
  1561.         classAttributes {
  1562.             applicationName "DIN NI-17.4"
  1563.         },
  1564.         typeAttributes indirect : path : {
  1565.             path '3F002F02'H, -- path to EF.GDO
  1566.             }
  1567.         },
  1568.     opaqueDO : {
  1569.     commonObjectAttributes {
  1570.         label "EF.SSD",
  1571.     },
  1572.         classAttributes {
  1573.             applicationName "DIN NI-17.4"
  1574.         },
  1575.         typeAttributes indirect : path : {
  1576.             path '3F0040161F00'H, -- path to EF.SSD
  1577.             }
  1578.         },
  1579.     opaqueDO : {
  1580.     commonObjectAttributes {
  1581.         label "EF.DM",
  1582.         accessControlRules {
  1583.                 {
  1584.                     accessMode {read}, -- readable after...
  1585.                     securityCondition or : {authId : '09'H, -- entity auth
  1586.                     -- binds to EXTERNAL AUTH with CV certificate
  1587.                     -- containing the certificate holder authorization
  1588.                     authId : '07'H, authId : '0A'H } -- user auth
  1589.                 },
  1590.                 {
  1591.                     accessMode {update}, -- writable after user auth
  1592.                     securityCondition or : {authId : '07'H, authId : '0A'H }
  1593.                 }
  1594.             }
  1595.         },
  1596.         classAttributes {
  1597.             applicationName "DIN NI-17.4"
  1598.         },
  1599.     typeAttributes indirect : path : {
  1600.             path   '3F004016D000'H, -- path to EF.DM
  1601.             }
  1602.         }
  1603.  
  1604. 2.8.2 ASN.1 dump
  1605.  
  1606.   DataType CHOICE
  1607.     opaqueDO SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 68
  1608.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 39
  1609.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 7
  1610.           0x45462e50524f54
  1611.         accessControlRules SEQUENCE OF: tag = [UNIVERSAL 16] constructed; length = 28
  1612.           AccessControlRule SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 12
  1613.             accessMode AccessMode BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1614.               0x0780
  1615.             securityCondition SecurityCondition CHOICE
  1616.               or SEQUENCE OF: tag = [2] constructed; length = 6
  1617.                 SecurityCondition CHOICE
  1618.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1619.                     0x07
  1620.                 SecurityCondition CHOICE
  1621.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1622.                     0x0a
  1623.           AccessControlRule SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 12
  1624.             accessMode AccessMode BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1625.               0x0640
  1626.             securityCondition SecurityCondition CHOICE
  1627.               or SEQUENCE OF: tag = [2] constructed; length = 6
  1628.                 SecurityCondition CHOICE
  1629.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1630.                     0x07
  1631.                 SecurityCondition CHOICE
  1632.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1633.                     0x0a
  1634.       classAttributes CommonDataObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 13
  1635.         applicationName Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 11
  1636.           0x44494e204e492d31372e34
  1637.       typeAttributes : tag = [1] constructed; length = 10
  1638.         Opaque CHOICE
  1639.           indirect CHOICE
  1640.             path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1641.               path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 6
  1642.                 0x3f004016a000
  1643.   DataType CHOICE
  1644.     opaqueDO SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 35
  1645.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1646.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 6
  1647.           0x45462e47444f
  1648.       classAttributes CommonDataObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 13
  1649.         applicationName Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 11
  1650.           0x44494e204e492d31372e34
  1651.       typeAttributes : tag = [1] constructed; length = 8
  1652.         Opaque CHOICE
  1653.           indirect CHOICE
  1654.             path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 6
  1655.               path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 4
  1656.                 0x3f002f02
  1657.   DataType CHOICE
  1658.     opaqueDO SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 37
  1659.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1660.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 6
  1661.           0x45462e535344
  1662.       classAttributes CommonDataObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 13
  1663.         applicationName Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 11
  1664.           0x44494e204e492d31372e34
  1665.       typeAttributes : tag = [1] constructed; length = 10
  1666.         Opaque CHOICE
  1667.           indirect CHOICE
  1668.             path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1669.               path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 6
  1670.                 0x3f0040161f00
  1671.   DataType CHOICE
  1672.     opaqueDO SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 69
  1673.       commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 40
  1674.         label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 5
  1675.           0x45462e444d
  1676.         accessControlRules SEQUENCE OF: tag = [UNIVERSAL 16] constructed; length = 31
  1677.           AccessControlRule SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 15
  1678.             accessMode AccessMode BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1679.               0x0780
  1680.             securityCondition SecurityCondition CHOICE
  1681.               or SEQUENCE OF: tag = [2] constructed; length = 9
  1682.                 SecurityCondition CHOICE
  1683.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1684.                     0x09
  1685.                 SecurityCondition CHOICE
  1686.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1687.                     0x07
  1688.                 SecurityCondition CHOICE
  1689.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1690.                     0x0a
  1691.           AccessControlRule SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 12
  1692.             accessMode AccessMode BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  1693.               0x0640
  1694.             securityCondition SecurityCondition CHOICE
  1695.               or SEQUENCE OF: tag = [2] constructed; length = 6
  1696.                 SecurityCondition CHOICE
  1697.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1698.                     0x07
  1699.                 SecurityCondition CHOICE
  1700.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1701.                     0x0a
  1702.       classAttributes CommonDataObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 13
  1703.         applicationName Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 11
  1704.           0x44494e204e492d31372e34
  1705.       typeAttributes : tag = [1] constructed; length = 10
  1706.         Opaque CHOICE
  1707.           indirect CHOICE
  1708.             path Path SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 8
  1709.               path OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 6
  1710.                 0x3f004016d000
  1711.  
  1712. 2.8.3 DER encoding
  1713.  
  1714. 30443027 0C074546 2E50524F 54301C30 0C030207 80A20604 01070401
  1715. 0A300C03 020640A2 06040107 04010A30 0D0C0B44 494E204E 492D3137
  1716. 2E34A10A 30080406 3F004016 A0003023 30080C06 45462E47 444F300D
  1717. 0C0B4449 4E204E49 2D31372E 34A10830 0604043F 002F0230 2530080C
  1718. 0645462E 53534430 0D0C0B44 494E204E 492D3137 2E34A10A 30080406
  1719. 3F004016 1F003045 30280C05 45462E44 4D301F30 0F030207 80A20904
  1720. 01090401 0704010A 300C0302 0640A206 04010704 010A300D 0C0B4449
  1721. 4E204E49 2D31372E 34A10A30 0804063F 004016D0 00 
  1722.  
  1723. 3 A PKCS15Token example
  1724.  
  1725. An example of a soft-token consisting of two private keys (both
  1726. individually encrypted with a session key, in turn encrypted with a
  1727. key derived from a user password) and three certificates (of which
  1728. one is a CA certificate).
  1729.  
  1730. Note - Encrypted values are fictious, the emphasize here has been on
  1731. correct token structure.
  1732.  
  1733. 3.1 Value notation
  1734.  
  1735. value PKCS15Token ::= 
  1736. {
  1737.   version v1,
  1738.   keyManagementInfo 
  1739.   {
  1740.     {
  1741.       keyId '01'H,
  1742.       keyInfo passwordInfo : 
  1743.         {
  1744.           hint "Authentication password",
  1745.           algId 
  1746.           {
  1747.             algorithm { 1 2 840 113549 1 5 12 },
  1748.             parameters PBKDF2-params : 
  1749.             {
  1750.               salt specified : 'A5A5A5A5A5A5A5A5'H,
  1751.               iterationCount 1024
  1752.             }
  1753.           }
  1754.         }
  1755.     },
  1756.     {
  1757.       keyId '02'H,
  1758.       keyInfo passwordInfo : 
  1759.         {
  1760.           hint "Digital signature password",
  1761.           algId 
  1762.           {
  1763.             algorithm { 1 2 840 113549 1 5 12 },
  1764.             parameters PBKDF2-params : 
  1765.             {
  1766.               salt specified : '9696969696969696'H,
  1767.               iterationCount 1024
  1768.             }
  1769.           }
  1770.         }
  1771.     }
  1772.   },
  1773.   pkcs15Objects 
  1774.   {
  1775.     certificates : objects : 
  1776.         {
  1777.           x509Certificate : 
  1778.             {
  1779.               commonObjectAttributes 
  1780.               {
  1781.                 label "CERT1"
  1782.               },
  1783.               classAttributes 
  1784.               {
  1785.                 iD '45'H
  1786.               },
  1787.               typeAttributes 
  1788.               {
  1789.                 value indirect : url : url : "http://www.certs-r-us.com/cert1.crt"
  1790.               }
  1791.             },
  1792.           x509Certificate : 
  1793.             {
  1794.               commonObjectAttributes 
  1795.               {
  1796.                 label "CERT2"
  1797.               },
  1798.               classAttributes 
  1799.               {
  1800.                 iD '46'H
  1801.               },
  1802.               typeAttributes 
  1803.               {
  1804.                 value indirect : url : url : "http://www.certs-r-us.com/cert2.crt"
  1805.               }
  1806.             },
  1807.           x509Certificate : 
  1808.             {
  1809.               commonObjectAttributes 
  1810.               {
  1811.                 label "My trusted CA"
  1812.               },
  1813.               classAttributes 
  1814.               {
  1815.                 iD '04'H,
  1816.                 authority TRUE,
  1817.                 implicitTrust TRUE
  1818.               },
  1819.               typeAttributes 
  1820.               {
  1821.                 value indirect : url : urlWithDigest : 
  1822.                       {
  1823.                         url "http://www.certs-r-us.com/ca-cert.c ...",
  1824.                         digest 
  1825.                         {
  1826.                           digest '01234567890123456789012345678901'H
  1827.                         }
  1828.                       }
  1829.               }
  1830.             }
  1831.         },
  1832.     privateKeys : objects : 
  1833.         {
  1834.           privateRSAKey : 
  1835.             {
  1836.               commonObjectAttributes 
  1837.               {
  1838.                 label "Auth key"
  1839.               },
  1840.               classAttributes 
  1841.               {
  1842.                 iD '45'H,
  1843.                 usage { decrypt, sign, unwrap },
  1844.                 native FALSE
  1845.               },
  1846.               subClassAttributes 
  1847.               {
  1848.                 keyIdentifiers 
  1849.                 {
  1850.                   {
  1851.                     idType 4,
  1852.                     idValue ParameterString : '4321567890ABCDEF012345678901020304010203'H
  1853.                   }
  1854.                 }
  1855.               },
  1856.               typeAttributes 
  1857.               {
  1858.                 value direct-protected : 
  1859.                   {
  1860.                     version v2,
  1861.                     recipientInfos 
  1862.                     {
  1863.                       kekri : 
  1864.                         {
  1865.                           version v4,
  1866.                           kekid 
  1867.                           {
  1868.                             keyIdentifier '01'H
  1869.                           },
  1870.                           keyEncryptionAlgorithm 
  1871.                           {
  1872.                             algorithm { 1 2 840 113549 1 9 16 3 3 },
  1873.                             parameters CMS3DESwrap : NULL
  1874.                           },
  1875.                           encryptedKey ''H
  1876.                         }
  1877.                     },
  1878.                     encryptedContentInfo 
  1879.                     {
  1880.                       contentType { 1 2 840 113549 1 7 1 },
  1881.                       contentEncryptionAlgorithm 
  1882.                       {
  1883.                         algorithm { 1 2 840 113549 3 7 },
  1884.                         parameters DES-IV : '0807060504030201'H
  1885.                       },
  1886.                       encryptedContent ''H
  1887.                     }
  1888.                   },
  1889.                 modulusLength 1024
  1890.               }
  1891.             },
  1892.           privateRSAKey : 
  1893.             {
  1894.               commonObjectAttributes 
  1895.               {
  1896.                 label "Digital signature key",
  1897.                 authId '02'H
  1898.               },
  1899.               classAttributes 
  1900.               {
  1901.                 iD '46'H,
  1902.                 usage { sign, nonRepudiation },
  1903.                 native FALSE
  1904.               },
  1905.               subClassAttributes 
  1906.               {
  1907.                 keyIdentifiers 
  1908.                 {
  1909.                   {
  1910.                     idType 4,
  1911.                     idValue ParameterString : 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'H
  1912.                   }
  1913.                 }
  1914.               },
  1915.               typeAttributes 
  1916.               {
  1917.                 value direct-protected : 
  1918.                   {
  1919.                     version v2,
  1920.                     recipientInfos 
  1921.                     {
  1922.                       kekri : 
  1923.                         {
  1924.                           version v4,
  1925.                           kekid 
  1926.                           {
  1927.                             keyIdentifier '02'H
  1928.                           },
  1929.                           keyEncryptionAlgorithm 
  1930.                           {
  1931.                             algorithm { 1 2 840 113549 1 9 16 3 3 },
  1932.                             parameters CMS3DESwrap : NULL
  1933.                           },
  1934.                           encryptedKey ''H
  1935.                         }
  1936.                     },
  1937.                     encryptedContentInfo 
  1938.                     {
  1939.                       contentType { 1 2 840 113549 1 7 1 },
  1940.                       contentEncryptionAlgorithm 
  1941.                       {
  1942.                         algorithm { 1 2 840 113549 3 7 },
  1943.                         parameters DES-IV : '0102030405060708'H
  1944.                       },
  1945.                       encryptedContent ''H
  1946.                     }
  1947.                   },
  1948.                 modulusLength 1024
  1949.               }
  1950.             }
  1951.         }
  1952.     }
  1953. }
  1954.  
  1955. 3.2 ASN.1 dump
  1956.  
  1957. 3.2.1 ASN.1 dump of "open types" included in the soft token
  1958.  
  1959. PBKDF2-params SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 14
  1960.   salt CHOICE
  1961.     specified OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 8
  1962.       0xa5a5a5a5a5a5a5a5
  1963.   iterationCount INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  1964.     1024
  1965.  
  1966. PBKDF2-params SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 14
  1967.   salt CHOICE
  1968.     specified OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 8
  1969.       0x9696969696969696
  1970.   iterationCount INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  1971.     1024
  1972.  
  1973. ParameterString OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 20
  1974.   0x4321567890abcdef012345678901020304010203
  1975.  
  1976. CMS3DESwrap NULL: tag = [UNIVERSAL 5] primitive; length = 0
  1977.   NULL
  1978.  
  1979. DES-IV OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 8
  1980.   0x0807060504030201
  1981.  
  1982. ParameterString OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 20
  1983.   0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  1984.  
  1985. CMS3DESwrap NULL: tag = [UNIVERSAL 5] primitive; length = 0
  1986.   NULL
  1987.  
  1988. DES-IV OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 8
  1989.   0x0102030405060708
  1990.  
  1991. 3.2.2 ASN.1 dump of the token
  1992.  
  1993. PKCS15Token SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 656
  1994.   version INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  1995.     0
  1996.   keyManagementInfo KeyManagementInfo SEQUENCE OF: tag = [0] constructed; length = 125
  1997.     SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 59
  1998.       keyId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  1999.         0x01
  2000.       keyInfo CHOICE
  2001.         passwordInfo PasswordInfo SEQUENCE: tag = [0] constructed; length = 54
  2002.           hint Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 23
  2003.             0x41757468656e7469636174696f6e2070617373776f7264
  2004.           algId SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 27
  2005.             algorithm OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 9
  2006.               { 1 2 840 113549 1 5 12 }
  2007.             parameters OpenType
  2008.               0x300e0408a5a5a5a5a5a5a5a502020400
  2009.     SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 62
  2010.       keyId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  2011.         0x02
  2012.       keyInfo CHOICE
  2013.         passwordInfo PasswordInfo SEQUENCE: tag = [0] constructed; length = 57
  2014.           hint Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 26
  2015.             0x4469676974616c207369676e61747572652070617373776f7264
  2016.           algId SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 27
  2017.             algorithm OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 9
  2018.               { 1 2 840 113549 1 5 12 }
  2019.             parameters OpenType
  2020.               0x300e0408969696969696969602020400
  2021.   pkcs15Objects SEQUENCE OF: tag = [UNIVERSAL 16] constructed; length = 522
  2022.     PKCS15Objects CHOICE
  2023.       certificates : tag = [4] constructed; length = 212
  2024.         Certificates CHOICE
  2025.           objects SEQUENCE OF: tag = [0] constructed; length = 209
  2026.             CertificateType CHOICE
  2027.               x509Certificate SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 55
  2028.                 commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 7
  2029.                   label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 5
  2030.                     0x4345525431
  2031.                 classAttributes CommonCertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  2032.                   iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  2033.                     0x45
  2034.                 typeAttributes : tag = [1] constructed; length = 39
  2035.                   X509CertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 37
  2036.                     value CHOICE
  2037.                       indirect CHOICE
  2038.                         url URL CHOICE
  2039.                           url PrintableString: tag = [UNIVERSAL 19] primitive; length = 35
  2040.                             "http://www.certs-r-us.com/cert1.crt"
  2041.             CertificateType CHOICE
  2042.               x509Certificate SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 55
  2043.                 commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 7
  2044.                   label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 5
  2045.                     0x4345525432
  2046.                 classAttributes CommonCertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  2047.                   iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  2048.                     0x46
  2049.                 typeAttributes : tag = [1] constructed; length = 39
  2050.                   X509CertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 37
  2051.                     value CHOICE
  2052.                       indirect CHOICE
  2053.                         url URL CHOICE
  2054.                           url PrintableString: tag = [UNIVERSAL 19] primitive; length = 35
  2055.                             "http://www.certs-r-us.com/cert2.crt"
  2056.             CertificateType CHOICE
  2057.               x509Certificate SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 93
  2058.                 commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 15
  2059.                   label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 13
  2060.                     0x4d792074727573746564204341
  2061.                 classAttributes CommonCertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 9
  2062.                   iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  2063.                     0x04
  2064.                   authority BOOLEAN: tag = [UNIVERSAL 1] primitive; length = 1
  2065.                     TRUE
  2066.                   implicitTrust BOOLEAN: tag = [3] primitive; length = 1
  2067.                     TRUE
  2068.                 typeAttributes : tag = [1] constructed; length = 63
  2069.                   X509CertificateAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 61
  2070.                     value CHOICE
  2071.                       indirect CHOICE
  2072.                         url URL CHOICE
  2073.                           urlWithDigest SEQUENCE: tag = [3] constructed; length = 59
  2074.                             url IA5String: tag = [UNIVERSAL 22] primitive; length = 37
  2075.                               "http://www.certs-r-us.com/ca-cert.c..."
  2076.                             digest DigestInfoWithDefault SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 18
  2077.                               digest OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 16
  2078.                                 0x01234567890123456789012345678901
  2079.     PKCS15Objects CHOICE
  2080.       privateKeys : tag = [0] constructed; length = 303
  2081.         PrivateKeys CHOICE
  2082.           objects SEQUENCE OF: tag = [0] constructed; length = 299
  2083.             PrivateKeyType CHOICE
  2084.               privateRSAKey SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 138
  2085.                 commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  2086.                   label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 8
  2087.                     0x41757468206b6579
  2088.                 classAttributes CommonKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 10
  2089.                   iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  2090.                     0x45
  2091.                   usage KeyUsageFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 2
  2092.                     0x0264
  2093.                   native BOOLEAN: tag = [UNIVERSAL 1] primitive; length = 1
  2094.                     FALSE
  2095.                 subClassAttributes : tag = [0] constructed; length = 31
  2096.                   CommonPrivateKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 29
  2097.                     keyIdentifiers SEQUENCE OF: tag = [0] constructed; length = 27
  2098.                       SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 25
  2099.                         idType INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  2100.                           4
  2101.                         idValue OpenType
  2102.                           0x04144321567890abcdef012345678901020304010203
  2103.                 typeAttributes : tag = [1] constructed; length = 79
  2104.                   PrivateRSAKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 77
  2105.                     value CHOICE
  2106.                       direct-protected SEQUENCE: tag = [2] constructed; length = 71
  2107.                         version INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  2108.                           2
  2109.                         recipientInfos RecipientInfos SET OF: tag = [UNIVERSAL 17] constructed; length = 29
  2110.                           RecipientInfo CHOICE
  2111.                             kekri KEKRecipientInfo SEQUENCE: tag = [2] constructed; length = 27
  2112.                               version CMSVersion INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  2113.                                 4
  2114.                               kekid KEKIdentifier SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  2115.                                 keyIdentifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  2116.                                   0x01
  2117.                               keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 15
  2118.                                 algorithm OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 11
  2119.                                   { 1 2 840 113549 1 9 16 3 3 }
  2120.                                 parameters OpenType
  2121.                                   0x0500
  2122.                               encryptedKey EncryptedKey OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 0
  2123.                                 0x
  2124.                         encryptedContentInfo SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 35
  2125.                           contentType OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 9
  2126.                             { 1 2 840 113549 1 7 1 }
  2127.                           contentEncryptionAlgorithm SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 20
  2128.                             algorithm OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 8
  2129.                               { 1 2 840 113549 3 7 }
  2130.                             parameters OpenType
  2131.                               0x04080807060504030201
  2132.                           encryptedContent OCTET STRING: tag = [0] primitive; length = 0
  2133.                             0x
  2134.                     modulusLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  2135.                       1024
  2136.             PrivateKeyType CHOICE
  2137.               privateRSAKey SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 155
  2138.                 commonObjectAttributes CommonObjectAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 26
  2139.                   label Label UTF8String: tag = [UNIVERSAL 12] primitive; length = 21
  2140.                     0x4469676974616c207369676e6174757265206b6579
  2141.                   authId Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  2142.                     0x02
  2143.                 classAttributes CommonKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 11
  2144.                   iD Identifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  2145.                     0x46
  2146.                   usage KeyUsageFlags BIT STRING: tag = [UNIVERSAL 3] primitive; length = 3
  2147.                     0x062040
  2148.                   native BOOLEAN: tag = [UNIVERSAL 1] primitive; length = 1
  2149.                     FALSE
  2150.                 subClassAttributes : tag = [0] constructed; length = 31
  2151.                   CommonPrivateKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 29
  2152.                     keyIdentifiers SEQUENCE OF: tag = [0] constructed; length = 27
  2153.                       SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 25
  2154.                         idType INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  2155.                           4
  2156.                         idValue OpenType
  2157.                           0x0414aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  2158.                 typeAttributes : tag = [1] constructed; length = 79
  2159.                   PrivateRSAKeyAttributes SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 77
  2160.                     value CHOICE
  2161.                       direct-protected SEQUENCE: tag = [2] constructed; length = 71
  2162.                         version INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  2163.                           2
  2164.                         recipientInfos RecipientInfos SET OF: tag = [UNIVERSAL 17] constructed; length = 29
  2165.                           RecipientInfo CHOICE
  2166.                             kekri KEKRecipientInfo SEQUENCE: tag = [2] constructed; length = 27
  2167.                               version CMSVersion INTEGER: tag = [UNIVERSAL 2] primitive; length = 1
  2168.                                 4
  2169.                               kekid KEKIdentifier SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 3
  2170.                                 keyIdentifier OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 1
  2171.                                   0x02
  2172.                               keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 15
  2173.                                 algorithm OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 11
  2174.                                   { 1 2 840 113549 1 9 16 3 3 }
  2175.                                 parameters OpenType
  2176.                                   0x0500
  2177.                               encryptedKey EncryptedKey OCTET STRING: tag = [UNIVERSAL 4] primitive; length = 0
  2178.                                 0x
  2179.                         encryptedContentInfo SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 35
  2180.                           contentType OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 9
  2181.                             { 1 2 840 113549 1 7 1 }
  2182.                           contentEncryptionAlgorithm SEQUENCE: tag = [UNIVERSAL 16] constructed; length = 20
  2183.                             algorithm OBJECT IDENTIFIER: tag = [UNIVERSAL 6] primitive; length = 8
  2184.                               { 1 2 840 113549 3 7 }
  2185.                             parameters OpenType
  2186.                               0x04080102030405060708
  2187.                           encryptedContent OCTET STRING: tag = [0] primitive; length = 0
  2188.                             0x
  2189.                     modulusLength INTEGER: tag = [UNIVERSAL 2] primitive; length = 2
  2190.                       1024
  2191.  
  2192. 3.3 DER encoding
  2193.  
  2194. 30820290 020100A0 7D303B04 0101A036 0C174175 7468656E 74696361 74696F6E
  2195. 20706173 73776F72 64301B06 092A8648 86F70D01 050C300E 0408A5A5 A5A5A5A5
  2196. A5A50202 0400303E 040102A0 390C1A44 69676974 616C2073 69676E61 74757265
  2197. 20706173 73776F72 64301B06 092A8648 86F70D01 050C300E 04089696 96969696
  2198. 96960202 04003082 020AA481 D4A081D1 30373007 0C054345 52543130 03040145
  2199. A1273025 13236874 74703A2F 2F777777 2E636572 74732D72 2D75732E 636F6D2F
  2200. 63657274 312E6372 74303730 070C0543 45525432 30030401 46A12730 25132368
  2201. 7474703A 2F2F7777 772E6365 7274732D 722D7573 2E636F6D 2F636572 74322E63
  2202. 7274305D 300F0C0D 4D792074 72757374 65642043 41300904 01040101 FF8301FF
  2203. A13F303D A33B1625 68747470 3A2F2F77 77772E63 65727473 2D722D75 732E636F
  2204. 6D2F6361 2D636572 742E6372 74301204 10012345 67890123 45678901 23456789
  2205. 01A08201 2FA08201 2B30818A 300A0C08 41757468 206B6579 300A0401 45030202
  2206. 64010100 A01F301D A01B3019 02010404 14432156 7890ABCD EF012345 67890102
  2207. 03040102 03A14F30 4DA24702 0102311D A21B0201 04300304 0101300F 060B2A86
  2208. 4886F70D 01091003 03050004 00302306 092A8648 86F70D01 07013014 06082A86
  2209. 4886F70D 03070408 08070605 04030201 80000202 04003081 9B301A0C 15446967
  2210. 6974616C 20736967 6E617475 7265206B 65790401 02300B04 01460303 06204001
  2211. 0100A01F 301DA01B 30190201 040414AA AAAAAAAA AAAAAAAA AAAAAAAA AAAAAAAA
  2212. AAAAAAA1 4F304DA2 47020102 311DA21B 02010430 03040102 300F060B 2A864886
  2213. F70D0109 10030305 00040030 2306092A 864886F7 0D010701 30140608 2A864886
  2214. F70D0307 04080102 03040506 07088000 02020400 
  2215.