1、Information technology Telecommunications and information exchange between systems NFC Security Part 1: NFC-SEC NFCIP-1 security services and protocol Technologies de linformation Tlinformatique Scurit NFC Partie 1: Services de scurit et protocole NFC-SEC NFCIP-1 INTERNATIONAL STANDARD ISO/IEC 13157
2、-1 Reference number ISO/IEC 13157-1:2014(E) Second edition 2014-08-15 ISO/IEC 2014 Corrected version 2014-11-15 ii ISO/IEC 2014 All rights reserved COPYRIGHT PROTECTED DOCUMENT ISO/IEC 2014 All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized oth
3、erwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or ISOs member body in the country of the requester. ISO copyright offic
4、e Case postale 56 CH-1211 Geneva 20 Tel. + 41 22 749 01 11 Fax + 41 22 749 09 47 E-mail copyrightiso.org Web www.iso.org Published in Switzerland ISO/IEC 13157-1:2014(E) ISO/IEC 13157-1:2014(E)Contents Page Foreword iv Introduction v 1 Scope . 1 2 Conformance . 1 3 Normative references 1 4 T erms an
5、d definitions . 1 5 Conventions and notations 2 5.1 Representation of numbers . 2 5.2 Names . 3 6 Acronyms 3 7 General 4 8 Services 4 8.1 Shared Secret Service (SSE) . 4 8.2 Secure Channel Service (SCH) . 5 9 Protocol Mechanisms . 5 9.1 Key agreement . 5 9.2 Key confirmation . 5 9.3 PDU security 5 9
6、.4 Termination . 5 10 States and Sub-states . 6 11 NFC-SEC-PDUs 7 11.1 Secure Exchange Protocol (SEP) 7 11.2 Protocol Identifier (PID) . 8 11.3 NFC-SEC Payload . 8 11.4 Terminate (TMN) 8 11.5 Error (ERROR) . 8 12 Protocol Rules 8 12.1 Protocol and Service Errors . 8 12.2 Interworking Rules 9 12.3 Se
7、quence Integrity . 9 12.4 Cryptographic Processing 9 Annex A (normative) Pr ot oc ol Machine Specification 10 ISO/IEC 2014 All rights reserved iii ISO/IEC 13157-1:2014(E) Foreword ISO (the International Organization for Standardization) and IEC (the International Electrotechnical Commission) form th
8、e specialized system for worldwide standardization. National bodies that are members of ISO or IEC participate in the development of International Standards through technical committees established by the respective organization to deal with particular fields of technical activity. ISO and IEC techn
9、ical committees collaborate in fields of mutual interest. Other international organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1. Th
10、e procedures used to develop this document and those intended for its further maintenance are described in the ISO/IEC Directives, Part 1. In particular the different approval criteria needed for the different types of document should be noted. This document was drafted in accordance with the editor
11、ial rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives). Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights. Details of any pate
12、nt rights identified during the development of the document will be in the Introduction and/or on the ISO list of patent declarations received (see www.iso.org/patents). Any trade name used in this document is information given for the convenience of users and does not constitute an endorsement. For
13、 an explanation on the meaning of ISO specific terms and expressions related to conformity assessment, as well as information about ISOs adherence to the WTO principles in the Technical Barriers to Trade (TBT) see the following URL: Foreword - Supplementary information ISO/IEC 13157-1 was prepared b
14、y Ecma International (as ECMA-385) and was adopted, under a special “fast-track procedure”, by Joint Technical Committee ISO/IEC JTC 1, Information technology, in parallel with its approval by national bodies of ISO and IEC. This second edition cancels and replaces the first edition (ISO/IEC 13157-1
15、:2010), which has been technically revised. ISO/IEC 13157 consists of the following parts, under the general title Information technology Telecommunications and information exchange between systems NFC Security: Part 1: NFC-SEC NFCIP-1 security services and protocol Part 2: NFC-SEC cryptography stan
16、dard using ECDH and AES. This corrected version of ISO 13157-1:2014 incorporates the following corrections: 5.1, last list item: the underlined part has been added: In octets the lsb is bit number 1, the msb is bit number 8; in n-length bit strings the lsb is bit number 1 and the msb is bit number n
17、.iv ISO/IEC 2014 All rights reserved ISO/IEC 13157-1:2014(E) Introduction This International Standard specifies common NFC Security services and a protocol. This International Standard is a part of the NFC Security series of standards. The NFC-SEC cryptography standards of the series complement and
18、use the services and protocol specified in this International Standard. This second edition has removed Annex B because it has been included in ISO/IEC 18092:2013 and it allows implementation on generic NFC connections. ISO/IEC 2014 All rights reserved v Information technology Telecommunications and
19、 information exchange between systems NFC Security Part 1: NFC-SEC NFCIP-1 security services and protocol 1 Scope This International Standard specifies the NFC-SEC secure channel and shared secret services for NFCIP-1 and the PDUs and protocol for those services. NOTE This International Standard doe
20、s not address application specific security mechanisms (as typically needed for smart card related use cases and standardized in the ISO/IEC 7816 series). NFC-SEC may complement application specific security mechanisms of ISO/IEC 7816. 2 Conformance Conformant implementations implement one or more o
21、f the services specified in this International Standard, using the security mechanisms from the NFC-SEC cryptography part identified by the selected Protocol Identifier. 3 Normative references The following documents, in whole or in part, are normatively referenced in this document and are indispens
22、able for its application. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies. ISO/IEC 7498-1:1994, Information technology Open Systems Interconnection Basic Reference Model: The Basic Model IS
23、O 7498-2:1989, Information processing systems Open Systems Interconnection Basic Reference Model Part 2: Security Architecture ISO/IEC 10731:1994, Information technology Open Systems Interconnection Basic Reference Model Conventions for the definition of OSI services ISO/IEC 11770-1:1996, Informatio
24、n technology Securit y techniques Key management Part 1: Framework ISO/IEC 13157-2:2010, Information technology Telecommunications and information exchange between systems NFC Security Part 2: NFC-SEC cryptography standard using ECDH and AES (also published by Ecma as Standard ECMA-386) ISO/IEC 1809
25、2:2013, Information technology Telecommunications and information exchange between systems Near Field Communication Interface and Protocol (NFCIP-1) (also published by Ecma as Standard ECMA-340) 4 T erms an d definiti ons For the purposes of this document, the terms and definitions given in ISO/IEC
26、18092, ISO/IEC 7498-1, ISO 7498-2, ISO/IEC 10731, ISO/IEC 11770-1 and the following apply. INTERNATIONAL ST ANDARD ISO/IEC 13157-1:2014(E) ISO/IEC 2014 All rights reserved 1 ISO/IEC 13157-1:2014(E) 4.1 connection (N)-connection as specified in ISO/IEC 7498-1 4.2 entity (N)-entity as specified in ISO
27、/IEC 7498-1 4.3 link key secret key securing communications across a secure channel 4.4 NFC-SEC User entity using the NFC-SEC service 4.5 protocol (N)-protocol as specified in ISO/IEC 7498-1 4.6 recipient NFC-SEC entity that receives ACT_REQ 4.7 secure channel secure NFC-SEC connection 4.8 sender NF
28、C-SEC entity that sends ACT_REQ 4.9 service (N)-service as specified in ISO/IEC 7498-1 4.10 shared secret secret shared by two peer NFC-SEC Users 5 Conventions and notations The following conventions and notations apply in this document unless otherwise stated. 5.1 Representation of numbers The foll
29、owing conventions and notations apply in this document unless otherwise stated. Letters and digits in parentheses represent numbers in hexadecimal notation. The setting of bits is denoted by ZERO or ONE. Numbers in binary notation and bit patterns are represented by sequences of 0 and 1 bits shown w
30、ith the most significant bit to the left. Within such strings, X may be used to indicate that the setting of a bit is not specified within the string. In octets the lsb is bit number 1, the msb is bit number 8; in n-length bit strings the lsb is bit number 1 and the msb is bit number n.2 ISO/IEC 201
31、4 All rights reserved ISO/IEC 13157-1:2014(E) 5.2 Names The names of basic elements, e.g. specific fields, are written with a capital initial letter. 6 Acronyms For the purposes of this International Standard, the acronyms specified in ISO/IEC 18092 apply. Additionally, the following acronyms apply.
32、 ACT_REQ Activation Request PDU ACT_RES Activation Response PDU ENC Encrypted Packet PDU ERROR Error PDU lsb least significant bit LSB Least Significant Byte msb most significant bit MSB Most Significant Byte MSG MesSaGe code PCI Protocol Control Information (see ISO/IEC 7498-1) PDU Protocol Data Un
33、it (see ISO/IEC 7498-1) PID Protocol Identifier RFU Reserved for Future Use SAP Service Access Point SCH Secure Channel service SDL Specification and Description Language (as specified in ITU-T Z.100) SDU Service Data Unit (see ISO/IEC 7498-1) SEP Security Exchange protocol Parameter SN Sequence Num
34、ber SNV SN variable SSE Shared Secret Service SVC SerVicE code TMN Terminate PDU VFY_REQ Verification Request PDU VFY_RES Verification Response PDU ISO/IEC 2014 All rights reserved 3 ISO/IEC 13157-1:2014(E) 7 General NFC-SEC as illustrated in Figure 1 uses the OSI reference model specified in ISO/IE
35、C 7498-1. Figure 1 NFC-SEC architecture NFC-SEC Users invoke and access the NFC-SEC services through NFC-SEC Service Access Points (NFC- SEC-SAP). NFC-SEC entities obtain NFC-SEC-SDUs (requests) from NFC-SEC Users and return NFC-SEC- SDUs (confirmations) to them. This International Standard specifie
36、s the Secure Channel Service (SCH) and the Shared Secret Service (SSE). To provide the NFC-SEC services, Peer NFC-SEC entities exchange NFC-SEC-PDUs by conforming to the NFC-SEC protocol over NFC-SEC connections. Peer NFC-SEC entities send and receive NFC-SEC-PDUs through NFC Service Access Points (
37、NFC-SAP). A NFC-SEC-PDU consists of NFC-SEC Protocol Control Information (NFC-SEC-PCI) and a single NFC-SEC-SDU. 8 Services This Clause specifies two services, SSE and SCH, that NFC-SEC provides to the NFC-SEC User. When invoked, these services enable the cryptographic protected transmission of NFC-
38、SEC User messages between the peer entities by means of a protocol described in Clause 9. Shared secrets established with the services specified below shall be cryptographically uncorrelated from any shared secrets established beforehand or afterwards. 8.1 Shared Secret Service (SSE) T he SSE est ab
39、lishes a shared secret bet ween t wo peer NFC-SEC Users, which t hey c an use at t heir discret ion. Invocation of the SSE shall establish a shared secret by the key agreement and key confirmation mechanisms, according to the NFC-SEC cryptography part that defines the PID.4 ISO/IEC 2014 All rights r
40、eserved ISO/IEC 13157-1:2014(E) 8.2 Secure Channel Service (SCH) The SCH provides a secure channel. Invocation of the SCH shall establish a link key, by derivation from a shared secret established by the key agreement and key confirmation mechanisms, and shall subsequently protect all communications
41、 in either direction across the channel, according to the NFC-SEC cryptography part that defines the PID. 9 Protocol Mechanisms The NFC-SEC protocol comprises the following mechanisms. Figure 2 specifies the sequence of the protocol mechanisms. 9.1 Key agreement The peer NFC-SEC entities shall estab
42、lish a shared secret using ACT_REQ and ACT_RES, according to the NFC-SEC cryptography part that defines the PID. 9.2 K e y c onfirmation The peer NFC-SEC entities shall verify their agreed shared secret using VFY_REQ and VFY_RES, according to the NFC-SEC cryptography part that defines the PID. 9.3 P
43、DU security PDU security is a mechanism of SCH service only. The peer NFC-SEC entities shall protect data exchange using ENC, according to the NFC-SEC cryptography part that defines the PID. This mechanism shall comprise one or more of the following, as specified in the respective NFC-SEC cryptograp
44、hy standard: Sequence Integrity, conforming to the requirements of 12.3; Confidentiality; Data integrity; Origin authentication. 9.4 Termination The peer NFC-SEC entities shall terminate SSE and SCH using TMN. ISO/IEC 2014 All rights reserved 5 ISO/IEC 13157-1:2014(E) Fig u r e 2 G en er a l f low o
45、f t he NF C - SE C se r v i ces 10 States and Sub-states The NFC-SEC protocol machine in Annex A s p e c i fi e s th e s ta t e tr a n s i ti o n s f o r th e s ta t e s a n d s u b - states in Table 1. Table 1 State State Description Idle NFC-SEC is ready to start a new service upon request from th
46、e NFC-SEC User or the peer NFC-SEC Entity. Select NFC-SEC is awaiting an ACT_RES. Established An NFC-SEC Service is requested. The established state contains two sub-states In the Established_Sender sub-state it is awaiting a VFY_RES. In the Established_Recipient Sub-state it is awaiting a VFY_REQ.
47、Confirmed An NFC-SEC service is established. The Confirmed State contains two sub-states, In the Confirmed _SSE sub-state, the shared secret is ready to be retrieved. In the Con- firmed _SCH sub-state, secure data exchange is ready.6 ISO/IEC 2014 All rights reserved ISO/IEC 13157-1:2014(E) Upon tran
48、sition to the Idle state any shared secret and link key shall be destroyed. 11 NFC-SEC-PDUs Secure data shall be conveyed in the NFC-SEC Payload field of the NFC-SEC-PDU as specified in Figure 3. SEP PID NFC-SEC Payload Figure 3 Structure of NFC-SEC PDU Table 2 specifies the NFC-SEC-PDUs fields for
49、the NFC-SEC commands as mandatory (m), prohibited (p), conditional (c). The conditionality (c) is further specified in 11.3. Table 2 NFC-SEC-PDU Fields NFC-SEC commands SEP PID NFC-SEC Payload ACT_REQ m m c ACT_RES m p c VFY_REQ m p c VFY_RES m p c ENC m p c TMN m p p ERROR m p c 11.1 Secure Exchange Protocol (SEP) The 1-byte Secure Exchange Protocol (SEP) field is specified as follows: The value of 00b in the SVC indicates that the PDU is part of an SS