Reading data from European DTCO company card

十年热恋 提交于 2019-12-06 09:22:19

I believe that you first have to obtain a certificate from a country CA. You can then perform the following algorithm (simplified from Appendix 11, section 4):

  1. Select and read the card certificate (EF_CERTIFICATE)
  2. Issue a Manage Security Environment command to select the Root CA public key
  3. Issue a Verify Certificate with the country CA certificate
  4. Issue a Manage Security Environment command to select the country CA public key
  5. Issue a Verify Certificate with your certificate
  6. Issue a Manage Security Environment command to select your public key
  7. Issue an Internal authenticate command. Verify response.
  8. Issue a Get Challenge command
  9. Issue an External authenticate command
  10. Calculate the session key
  11. Select File EF_IDENTIFICATION
  12. Perform a Read Binary command using secure messaging (you need the session key to calculate the checksum and decrypt the result).

I don't know the standard, but I would assume that you read out EF Card_Certificate, recover the certificate content and extract the key identifier from that.

Assuming you have the root certificate (it is published here: http://dtc.jrc.it/erca_of_doc/EC_PK.zip), you will need to:

  1. Read EF CA_Certificate
  2. Follow the algorithm in Appendix 11, section 3.3.3
  3. Extract the CA public key from the certificate content
  4. Read EF Card_Certificate
  5. Follow the algorithm in Appendix 11, section 3.3.3
  6. The Key Identifier should now be byte 20-27 of the recovered certificate content.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!