简体   繁体   English

DESFire和DESFire EV1卡有什么区别?

[英]What's the difference between DESFire and DESFire EV1 cards?

I have a contactless card and I know it is a MIFARE card. 我有一张非接触式卡,我知道它是一张MIFARE卡。 I have no document and no authentication key. 我没有文档,也没有身份验证密钥。 After a reset, I received the following ATS: 重置后,我收到了以下ATS:

myubuntu@lol-MS-7693:~$ nfc-list 
nfc-list uses libnfc 1.7.1
NFC device: ACS / ACR122U PICC Interface opened
1 ISO14443A passive target(s) found:
ISO/IEC 14443A (106 kbps) target:
    ATQA (SENS_RES): 03  44  
       UID (NFCID1): 04  8c  4c  92  e9  48  80  
      SAK (SEL_RES): 20  
                ATS: 75  77  81  02  80

After searching above ATS in google, I found the following info here : 在谷歌上面搜索ATS之后,我在这里找到了以下信息:

在此输入图像描述

So, my card is either a DESFire card or a DESFire EV1 card. 所以,我的卡是DESFire卡或DESFire EV1卡。 The question is, how can I detect which of the two my card is precisely? 问题是,如何才能检测到我的卡中的哪一张正好?

MIFARE DESFire EV1 is the followup generation of MIFARE DESFire. MIFARE DESFire EV1是MIFARE DESFire的后续产品。 DESFire EV1 adds support for new cryptographic algorithms (specifically AES) and improves security of crypto operations against side-channel attacks known for MIFARE DESFire. DESFire EV1增加了对新加密算法(特别是AES)的支持,并提高了加密操作对MIFARE DESFire已知的旁道攻击的安全性。

You could distinguish the the two versions by sending a GetVersion command (command code 0x60) to the card. 您可以通过向卡发送GetVersion命令(命令代码0x60)来区分这两个版本。

If you are using the native command mode, this would look something like: 如果您使用的是本机命令模式,则类似于:

READER ---> CARD:  60
CARD <--- READER:  AF 04 01 XX XX XX XX 05
READER ---> CARD:  AF
CARD <--- READER:  AF 04 01 01 HH LL XX 05
READER ---> CARD:  AF
CARD <--- READER:  00 XX XX XX XX XX XX XX XX XX XX XX XX XX XX

The byte HH contains the major software version, which is 0x00 for DESFire and 0x01 for DESFire EV1. 字节HH包含主要软件版本,DESFire为0x00,DESFire EV1为0x01。

If you are using a PC/SC reader to communicate with the card, you would probably need to use the DESFire APDU-wrapped native command set instead: 如果您使用PC / SC阅读器与卡通信,则可能需要使用DESFire APDU包装的本机命令集:

READER ---> CARD:  90 60 00 00 00
CARD <--- READER:  04 01 XX XX XX XX 05 91 AF
READER ---> CARD:  90 AF 00 00 00
CARD <--- READER:  04 01 01 HH LL XX 05 91 AF
READER ---> CARD:  90 AF 00 00 00
CARD <--- READER:  XX XX XX XX XX XX XX XX XX XX XX XX XX XX 91 00

You can identify the card type by the Major Hardware version number which you would get like this 您可以通过主要硬件版本号识别卡类型,您可以使用此类型

Reader       Card
 60      -> 
         <-  AF 04 01 XX HH LL XX 05
 AF      ->
         <-  AF 04 01 01 XX XX XX 05
 AF      ->  
         <-  00 XX XX XX XX XX XX XX XX XX XX XX XX XX XX

where HH would be: HH将是:

  • 0x00 = DESFire (MF3ICD40) 0x00 = DESFire(MF3ICD40)
  • 0x01 = MIFARE DESFire EV1 0x01 = MIFARE DESFire EV1
  • 0x12 = MIFARE DESFire EV2 0x12 = MIFARE DESFire EV2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM