简体   繁体   English

智能卡文件结构的安全访问条件

[英]Security Access Condition for smart card file structure

We are working with SCOSTA smart card with ISO7816-4 APDU Commands. 我们正在使用具有ISO7816-4 APDU命令的SCOSTA智能卡。 I had create file structure but didn't understand how to set security Access Condition in Compact and Extended Format For Example. 我已经创建了文件结构,但是不了解如何以“紧凑和扩展格式”设置安全访问条件。

I am using TLV structure for Creating File MF,DF,EF,SE etc 我正在使用TLV结构创建文件MF,DF,EF,SE等

Deticated File will have following FCP: 专用文件将具有以下FCP:

  • Tag 8C 标签8C
  • Len 08 伦08
  • Security Attribute AM 7F 安全属性AM 7F
  • VALUE FF Delete File(Self):Never VALUE FF删除文件(自我):从不
  • VALUE FF Terminate DF:Never VALUE FF终止DF:从不
  • VALUE 22 Activate File:(SE#2) VALUE 22激活文件:(SE#2)
  • VALUE 22 Deactivate File:(SE#2) VALUE 22停用文件:(SE#2)
  • VALUE 22 Create File EF:(SE#2) VALUE 22创建文件EF:(SE#2)
  • VALUE 22 Create File DF:(SE#2) VALUE 22创建文件DF:(SE#2)
  • VALUE FF Delete File(child):Never VALUE FF删除文件(子级):从不

So My Question is : Where from VALUE 22 Set and what is the meaning of SE#2 ? 所以我的问题是:从VALUE 22 Set那里,SE#2的含义是什么?

How to calculate AM Byte? 如何计算AM字节?

I refer ISO/IEC 7816-4:2005(E) Document Page No:24-25 我参考ISO / IEC 7816-4:2005(E)文档页码:24-25

Tag 8C indicates an access rule in compact format . 标签8C指示紧凑格式的访问规则。 There an Access Mode Byte (7F) is followed by as many Security Condition Byte s as bits are set in the access mode byte. 访问模式字节 (7F)之后跟着与在访问模式字节中设置的位一样多的安全条件字节。 The example looks reasonable, even if in my opinion, it would be more intuitive, to leave out the bits (and corresponding SCBs) for which only a NEVER security condition byte follows. 该示例看起来很合理,即使在我看来,更直观的做法是,仅保留紧随其后的NEVER安全条件字节的位(以及相应的SCB)。 (An operation not explicitly allowed, should be rejected anyway). (未明确允许的操作,无论如何都应拒绝)。

The coding of the Access mode byte for a DF is found in table 16 and the encoding of the security condition byte is in table 20 of ISO 7816-4. DF的访问模式字节的编码在表16中找到,安全条件字节的编码在ISO 7816-4的表20中。

SE#2 means, that the key IDs necessary for User Authentication, External Authentication and Secure Messaging are determined by Security Environment 2, the value 22 means, that in your case only an external authentication is necessary. SE#2表示用户身份验证,外部身份验证和安全消息传递所必需的密钥ID由安全环境2确定,值22表示在您的情况下仅需要外部身份验证。

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

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