<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Christian Henzl on Medium]]></title>
        <description><![CDATA[Stories by Christian Henzl on Medium]]></description>
        <link>https://medium.com/@christian.henzl?source=rss-44ddc0986b25------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*GX_c1csVkaWBlbqJ</url>
            <title>Stories by Christian Henzl on Medium</title>
            <link>https://medium.com/@christian.henzl?source=rss-44ddc0986b25------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 12:02:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@christian.henzl/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Supplemental Access Control and Active Authentication]]></title>
            <link>https://medium.com/jumio/supplemental-access-control-and-active-authentication-2d40f181d521?source=rss-44ddc0986b25------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d40f181d521</guid>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[nfc]]></category>
            <category><![CDATA[passport]]></category>
            <dc:creator><![CDATA[Christian Henzl]]></dc:creator>
            <pubDate>Wed, 23 Dec 2020 13:22:53 GMT</pubDate>
            <atom:updated>2020-12-23T13:22:53.401Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Power of NFC: Reading Passports from your Phone</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AbRH_WnlJUQYhwQ6yqSWMg.jpeg" /></figure><p>Welcome to our continuing exploration of NFC capabilities and how they enable you to read the data on electronic passports. <a href="https://medium.com/jumio/reading-passports-from-a-phone-the-power-of-nfc-9ce67fdea2ed">Part 1</a> and <a href="https://medium.com/jumio/access-controls-for-electronic-machine-readable-travel-documents-430a6e511d22">part 2</a> of this series examined the history of NFC on iOS, discussed the NFC protocol, and introduced ICAO9303, the specification for Electronic Machine-Readable Travel Documents (eMRTDs). This post expands on these concepts to focus on the features introduced with Supplemental Access Control (SAC) to shore up weaknesses in the Basic Access Control (BAC) specification. We will also look briefly at Active Authentication, which is used to validate the integrity of the NFC chip.</p><p><strong>Why Supplemental Access Controls?</strong></p><p>Prior to the establishment of SAC protocols, the security of electronic passports relied on the BAC mechanism explored in detail in the previous article of this series. The older protocol displayed several notable vulnerabilities, which SAC primarily addresses through the new Password-Authenticated Connection Establishment (PACE) mechanism.</p><p>The most straightforward change with the newer protocol is the introduction of more robust encryption standards. PACE allows for AES encryption with up to 256-bit keys, a vast improvement over the 3DES encryption that BAC originally required. More important than this encryption upgrade, however, is the introduction of a Diffie-Hellman key exchange algorithm for deriving session keys. This greatly improves upon the simple shared secret used to derive session keys with BAC.</p><p>Negotiating session keys still begins with a shared password. Just as with BAC, this shared password may be the machine-readable zone (MRZ) on the passport’s data page. A more secure option is now available, however, in the form of a Card Access Number (CAN). The CAN is randomly generated using a cryptographically secure algorithm providing a much greater degree of entropy over the MRZ, which has many predictable or narrowly defined elements.</p><p>With Diffie-Hellman, or the more secure Elliptic-Curve variant, the system uses this shared password to arrive at cryptographically strong session keys. Standard Diffie-Hellman uses modulo arithmetic to compute a shared secret. This shared secret may be determined via brute-force methods, though it’s computationally expensive. Elliptic-Curve Diffie-Hellman creates an even more secure shared key for the same key length. When compared to RSA encryption, for example, a 256-bit elliptic curve key is equivalent in strength to a 3,072-bit RSA public key.</p><p>Along with the enhanced encryption, SAC defines a mechanism for the passport’s NFC chip to validate whether the reader is authorized to access data on the passport. This is accomplished by establishing a chain of trust whereby issuers provide signed certificates to the inspection stations of trusted nations or devices.</p><p>This aspect of SAC works alongside Extended Access Control (EAC), which describes two capabilities to increase security of eMRTDs — chip authentication and terminal authentication. These controls are used primarily to gate access to the more sensitive data groups described in <a href="https://medium.com/jumio/access-controls-for-electronic-machine-readable-travel-documents-430a6e511d22">part two</a> of this series. Most notably, this includes fingerprint and iris images. Accessing this information is not necessary for the identity verification Jumio currently performs, so EAC is beyond the scope of this article.</p><p><strong>Initiating PACE</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*TCpHbbYD6FcyfFqREEKcSQ.png" /></figure><p>Establishing a PACE session is a multi-step process, including (at a very high level):</p><ul><li>Determine the appropriate encryption protocols</li><li>Compute the initial password and map nonces</li><li>Generate ephemeral domain parameters</li><li>Perform a Diffie-Hellman key exchange</li><li>Derive session keys and verify authentication tokens</li><li>Begin secure messaging</li></ul><p>Performing these steps involves a sequence of Application Protocol Data Units (APDUs) issued to the passport NFC chip. The APDU specification is part of the ISO/IEC smartcard specification and is defined in <em>ISO/IEC 7816–4 Organization, security and commands for interchange</em>. For the purposes of this article we’ll mention the commands used and then explore the APDU structure in more detail in Part 4 of this series.</p><p><strong>Protocol Determination</strong></p><p>The first step in negotiating a PACE connection is querying the CardAccess file from the passport. This file is available to the inspection station (mobile device) before a secure session is established. It describes the encryption protocols supported by the eMRTD NFC chip. If this file is not available, the inspection station reverts to using BAC.</p><p>Querying the file uses a basic Read Binary APDU. The file consists of a few key elements: a list of protocols supported by the eMRTD, a version number, and parameter ID. Each line in the protocol list defines the following information for a given protocol: the mapping type, symmetric cipher, key length, block cipher mode, and authentication token. For example, PACE with an Elliptic Curve Diffie-Helman key agreement, generic mapping mode, and 256-bit AES block cipher with CMAC is represented as id-PACE-ECDH-GM-AES-CBC-CMAC-256.</p><p>All combinations of protocols, as well as descriptions of the other parameters, are found in the <a href="https://www.icao.int/security/mrtd/downloads/technical%20reports/technical%20report.pdf">ICAO report on supplemental access control</a>. Issuers of passports using PACE must support at least one of the listed protocols. Inspection stations by contrast must support all possible combinations to ensure interoperability. To keep this requirement manageable, the ICAO chose to keep the available protocol permutations to a manageable count, defining a total of eight standard Diffie-Hellman and 11 Elliptic Curve Diffie-Hellman protocols.</p><p><strong>Password Computation</strong></p><p>As with BAC, the PACE protocol begins with a shared password. Unlike BAC, the password is used to initiate a Diffie-Hellman key exchange. The password may be one of two values: the MRZ or, if available, the CAN printed on the passport’s data page. The CAN is much more secure than the MRZ, being generated by a cryptographically secure algorithm, but it is optional, and not all passport issuers make use of it.</p><p>Regardless of which password is used, the first step is computing its SHA-1 message digest. This hashed value is then issued to the eMRTD in a Basic Authentication APDU. The response from the NFC chip contains a securely generated nonce — a one-time use, cryptographically secure random number — encrypted with the same shared password.</p><p>One word of caution here: some NFC chips implement protections against invalid password submission. One of our developers, in prototyping PACE interactions, managed to lock his passport. Of course, figuring this out was complicated by the 20-second timeout iOS enforces on NFC reads. He had a long moment of panic until he realized he could unlock the passport using a separate Android device that had a different passport-reading utility loaded on it.</p><p><strong>Nonce Mapping and Shared Secret Generation</strong></p><p>Once decrypted, the nonce is mapped into a pseudorandom number generator. There are two mapping methods available: integrated and generic. Under integrated mapping, the inspection device randomly generates a new nonce and sends it to the eMRTD to be used in the mapping function. Under generic mapping, the inspection device and eMRTD conduct an anonymous Diffie-Hellman key exchange to generate the new value used in the mapping function.</p><p>The mapping functions yield ephemeral domain parameters, as described in the <a href="https://www.icao.int/security/mrtd/downloads/technical%20reports/technical%20report.pdf">ICAO report on supplemental access control</a> mentioned previously. The inspection system and eMRTD perform a Diffie-Hellman key exchange based on these ephemeral domain parameters. The result of this exchange is either an unsigned integer or, in the case of Elliptic Curve Diffie-Hellman, a point on the shared curve.</p><p><strong>Key Derivation and Secure Messaging</strong></p><p>The next step is derivation of session keys using the results of the Diffie-Hellman exchange. This may be classic Diffie-Hellman or the more secure Elliptic Curve variant, depending on what the eMRTD supports and defines in the CardAccess file. With the session keys in hand, the inspection station and eMRTD are free to initiate secure messaging using these keys to encrypt the APDUs. A send sequence counter (SSC) maintains an active count of every message transferred between the devices and is included as part of each APDU. In the case that secure messaging is ever interrupted, the SSC of the last successful message and the previous session key are used with basic authentication APDUs for generating new session keys, allowing messaging to resume.</p><p>Once secure messaging is started, the eMRTD may only communicate with the inspection device that initiated PACE. The SSC, along with the shared secrets generated via Diffie-Hellman, prevent other devices from inserting or intercepting messages. While messages may be recorded and decoded using brute force mechanisms, real-time interception and decoding of the messages is computationally prohibitive, allowing a great degree of trust in this communications channel.</p><p><strong>Summary</strong></p><p>This post reviewed the PACE protocol in detail. The Jumio SDK implements these steps to allow application developers a great deal of certainty in proofing the identity of users. The next post in this series will explore in more detail what the Jumio SDK provides and how it may be used in end-user applications.</p><p>This a series of blog posts highlighting our experiences with reading passports from your phone via NFC:</p><ul><li><a href="https://medium.com/jumio/reading-passports-from-a-phone-the-power-of-nfc-9ce67fdea2ed">Part 1: Introduction to Enabling NFC in your App</a></li><li><a href="https://medium.com/jumio/access-controls-for-electronic-machine-readable-travel-documents-430a6e511d22">Part 2: Access Controls for Electronic Machine-Readable Travel Documents</a></li><li>Part 3: Supplemental Access Control and Active Authentication</li><li>Part 4: Bringing NFC to the Phone (coming soon)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d40f181d521" width="1" height="1" alt=""><hr><p><a href="https://medium.com/jumio/supplemental-access-control-and-active-authentication-2d40f181d521">Supplemental Access Control and Active Authentication</a> was originally published in <a href="https://medium.com/jumio">Jumio Engineering &amp; Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Access Controls for Electronic Machine-Readable Travel Documents]]></title>
            <link>https://medium.com/jumio/access-controls-for-electronic-machine-readable-travel-documents-430a6e511d22?source=rss-44ddc0986b25------2</link>
            <guid isPermaLink="false">https://medium.com/p/430a6e511d22</guid>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[nfc]]></category>
            <category><![CDATA[passport]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Christian Henzl]]></dc:creator>
            <pubDate>Wed, 25 Nov 2020 13:04:36 GMT</pubDate>
            <atom:updated>2020-12-23T13:24:55.400Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>The Power of NFC: Reading Passports from your Phone</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EaujC7cK6Txj3uR7" /></figure><p>Welcome to our continuing exploration of NFC capabilities and how they enable you to read the data on electronic passports. In <a href="https://medium.com/jumio/reading-passports-from-a-phone-the-power-of-nfc-9ce67fdea2ed">part 1 of this series</a>, we examined the history of NFC on iOS and some of the basics of the NFC protocol. In this post, we’ll discuss the access controls in the ICAO9303 specification for electronic machine-readable travel documents (eMRTDs). We’ll also look at the common files stored on a passport’s NFC chip and how those files are accessed. Future posts will build on this foundation to explore more advanced access control options and how to use the Jumio SDK with electronic passports.</p><p><strong>Security Capabilities of Electronic Passports</strong></p><p>The NFC chips in passports host a basic operating system that provides cryptographic and file retrieval capabilities. The chip may optionally be encrypted and secured with either a basic access mechanism or a password-authenticated access mechanism. Encryption is not required but it’s heavily recommended by the International Civil Aviation Organization (ICAO) and by security organizations. Some countries include additional passive protections, such as the wire mesh faraday cage in the covers of United States passports, preventing access to the NFC chip unless the cover is open.</p><p>These security capabilities provide a way of ensuring the data stored on an eMRTD is only read with the consent of the owner of the passport. Without at least basic encryption, a passport could be read unsuspectingly while still in a person’s pocket. The ICAO added supplemental access controls to the standard after security professionals demonstrated several notable weaknesses in the basic encryption. These included brute-force attacks against the encryption key and man-in-the-middle attacks while the passport is being read.</p><p><strong>Access Control Types</strong></p><p>When the passport data is encrypted, the ICAO9303 specification allows for two primary ways of accessing it: Basic Access Control (BAC) and Password Authenticated Connection Establishment (PACE). Passports issued since January 1, 2018 may have any one of the following configurations (at least as of the time of writing this post):</p><ul><li>No chip access controls, simply called plain MRTDs</li><li>BAC only</li><li>PACE and BAC</li><li>PACE only</li></ul><p>In the future the BAC protocol may be deprecated, but as of the time of writing all applications reading an eMRTD must maintain support for both protocols. This post will focus on explaining BAC, and we’ll reserve an in-depth discussion of PACE for the next post in our series.</p><p>Whether using BAC or PACE, the purpose of the access controls is to force the reader to provide some knowledge of the physical passport and to then establish a channel for secure communication between the NFC reader and the passport NFC chip. Data is exchanged over this channel using a capability referred to as Secure Messaging. This Secure Messaging mechanism then allows the reader to access the passport’s digital signing certificate as well as sensitive information including biometric identifiers.</p><p><strong>Basic Access Control</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*wsaijynszwDFuIHt" /></figure><p>In order to establish secure messaging with and retrieve data from the NFC chip, the NFC reader must establish a session key. This key is established using 3DES as a block cipher and following a three-pass challenge-response protocol. The password for this key is relatively straightforward, using data printed in the passport itself. The reader can scan the machine-readable zone (MRZ) of the passport using OCR or rely on manual entry of the data. The data elements comprising the password are: document number, date of birth, and expiration date.</p><p>In order to begin authentication, the reader issues a <em>get challenge</em> command to the chip. This causes the chip to generate a nonce (a random, one-time-use identifier) and send it to the reader. The reader then issues an <em>external authenticate</em> command to the chip, providing both the chip’s original nonce (to prove it was received and the message is valid) and a new randomly generated nonce. Once this is completed, the reader and chip derive the session keys for further communication, and secure messaging is now possible.</p><p>The BAC specification operates on the assumption that negotiating a session key requires opening and physically inspecting the passport. This implies that the passport owner must knowingly hand over the document for inspection and validation. Unfortunately, in practice, the standard is weaker than anticipated.</p><p>One major weakness in BAC is the fact that most passport issuers do not assign document numbers randomly; instead, they’re typically assigned sequentially. Knowing how particular countries assign passport IDs, a sophisticated attacker can arrive at a reasonable approximation of the passport number. Combining this with educated guesses on the expiration date and date of birth, the range of possible passwords is greatly reduced and brute force attacks on the encryption are feasible in reasonable timeframes.</p><p>Using this knowledge, an attacker gains a few different vectors to compromise passport data. The most straightforward is to passively intercept the transmissions between the reader and the card and then attack the session key later. Attackers can also actively attack cards present in a target’s pocket or purse by concealing a reader under a table or chair. In either case, BAC is not as robust as initially envisioned. This weakness led the ICAO to create the Supplemental Access Controls, including PACE.</p><p><strong>Secure Messaging</strong></p><p>The result of completing authentication between the reader and the chip, whether BAC or PACE, is establishment of a secure communications channel. Information is exchanged over this channel through a defined Secure Messaging protocol. Once the channel is established, communications are only allowed between the authenticated reader and chip. If another reader attempts to initiate communication, the Secure Messaging channel is aborted and the reader must re-authenticate.</p><p>Under BAC, the derived session key is used to encrypt all transmissions over the Secure Messaging channel using 3DES encryption. The BAC protocol allows both the reader and the chip to arrive at the same fixed key (based on the MRZ as described previously), an important facet of symmetric encryption algorithms like 3DES. The PACE protocol also uses symmetric encryption but allows for much more robust AES encryption, and it introduces a Diffie-Hellman algorithm for deriving shared keys.</p><p>With Secure Messaging established, the reader may begin issuing commands to the passport chip to retrieve specific data elements. The data on the chip is structured according to the ISO/IEC 7816 standard (see page 12 in <a href="https://www.icao.int/publications/Documents/9303_p10_cons_en.pdf">ICAO9303, Part 10</a>). Within the chip’s Master File is at least one Application bearing the ISO-registered ID for eMRTDs. The Master File also contains files associated with PACE authentication: <em>EF.CardAccess</em> and <em>EF.CardSecurity</em>. The contents of the Application File are described below.</p><p>The commands used with Security Messaging are formulated as smartcard Application Protocol Data Units (APDUs), compliant with <em>ISO/IEC 7816 </em>— <em>Part 4: Organization, security and commands for interchange</em>. The commands supported by MRTDs, as defined in <a href="https://www.icao.int/publications/Documents/9303_p10_cons_en.pdf">ICAO9303, Part 10</a>, are:</p><ul><li>SELECT — Select the Application and File within the Application to be read</li><li>READ BINARY — Read the binary data from the SELECTed file; the reader may be required to invoke this multiple times to retrieve a larger file, such as the passport image</li></ul><p>As part of the Secure Messaging format, both the reader and the chip compute special Command and Response APDUs. After determining the full command or response to be sent, the payload is padded to the proper length and encrypted using 3DES or AES, depending on the access method and configuration of the chip. Section 9.8 of <a href="https://www.icao.int/publications/Documents/9303_p11_cons_en.pdf">ICAO9303, Part 11</a>, contains an in-depth description of how these APDUs are computed.</p><p><strong>Application File and Data Groups<br></strong>The eMRTD Application (assigned the ID <strong>A0 00 00 02 47 10 01</strong> by the ISO) contains up to 18 Electronic Files (EFs) as shown on page 4 in <a href="https://www.icao.int/publications/Documents/9303_p10_cons_en.pdf">ICAO9303, Part 10</a>. The bulk of these are referred to as Data Groups, numbered 1 through 16. The other two are <em>EF.COM</em>, which provides header and group inventory information, and <em>EF.SOD</em>, a digitally signed file that contains hash values for each Data Group in the Application.</p><p>The <em>EF.SOD</em> file is of particular interest to us at Jumio. The signatory for this file is the nation state issuing the passport. The ICAO maintains a master list of valid root certificates used to sign passports. By first satisfying access controls on the passport and then retrieving the <em>EF.SOD</em> file, we’re able to use the ICAO master list to establish a trust chain through to the issuing authority. This gives us an acceptable level of assurance that the passport is legitimate and can be trusted as an identity-proofing document.</p><p>Of the 16 possible Data Groups, only the first two are mandatory. The first Data Group (DG1) contains details from the MRZ, as well as additional identifying information as printed on the passport. Also present in DG1 are various check digits, both for certain individual fields as well as a composite check digit. The second Data Group (DG2) contains an image of the passport holder. This image is intended for use with facial recognition systems. The other Data Groups allow for standardized storage of, among other things, additional biometric information (fingerprint and retinal images) and images of passport elements such as the holder’s signature.</p><p>At present, Jumio primarily validates the authenticity of passports. This is accomplished by establishing a chain of trust to a certificate authority using the <em>EF.SOD</em> as described above. Our SDK does have access to all the Data Groups, but validation focuses on a few of the fields in Data Groups 1 and 11 — notably the name, date of birth, and place of birth. We can envision uses for the other data in the future, but that’s not currently part of our solution. For example, we might compare the user’s selfie to the snapshot of the passport and also compare it to the encoded photo on the NFC chip.</p><p><strong>Summary</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U9zYQuIGTXKlb3fl" /></figure><p>This post focused on foundational concepts of eMRTDs and the legacy access mechanism, BAC. Understanding BAC in particular is important, as the ICAO continues to support this for legacy passports. Even when the ICAO decides to deprecate the BAC standard, support will be required until passports requiring it reach their expiration date. Still, the PACE standard does provide much greater security, and our next post will explore it in greater detail. That post will also cover some of the other advanced security mechanisms designed to validate the integrity of the passport chip. Thank you for joining us as we continue to share what we found while working with passport NFC chips!</p><p><strong>References</strong></p><p><a href="https://www.icao.int/publications/Documents/9303_p10_cons_en.pdf">https://www.icao.int/publications/Documents/9303_p10_cons_en.pdf</a></p><p><a href="https://www.icao.int/publications/Documents/9303_p11_cons_en.pdf">https://www.icao.int/publications/Documents/9303_p11_cons_en.pdf</a></p><p>This a series of blog posts highlighting our experiences with reading passports from your phone via NFC:</p><ul><li><a href="https://medium.com/jumio/reading-passports-from-a-phone-the-power-of-nfc-9ce67fdea2ed">Part 1: Introduction to Enabling NFC in your App</a></li><li>Part 2: Access Controls for Electronic Machine-Readable Travel Documents</li><li><a href="https://medium.com/jumio/supplemental-access-control-and-active-authentication-2d40f181d521">Part 3: Supplemental Access Control and Active Authentication</a></li><li>Part 4: Bringing NFC to the Phone (coming soon)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=430a6e511d22" width="1" height="1" alt=""><hr><p><a href="https://medium.com/jumio/access-controls-for-electronic-machine-readable-travel-documents-430a6e511d22">Access Controls for Electronic Machine-Readable Travel Documents</a> was originally published in <a href="https://medium.com/jumio">Jumio Engineering &amp; Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Enabling NFC in your App]]></title>
            <link>https://medium.com/jumio/reading-passports-from-a-phone-the-power-of-nfc-9ce67fdea2ed?source=rss-44ddc0986b25------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ce67fdea2ed</guid>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[nfc]]></category>
            <dc:creator><![CDATA[Christian Henzl]]></dc:creator>
            <pubDate>Mon, 16 Nov 2020 14:31:14 GMT</pubDate>
            <atom:updated>2020-12-23T13:24:10.978Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Power of NFC: Reading Passports from your Phone</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WNQgMvq71sbCcl_eGTGBGA.jpeg" /></figure><p>Near-field communication (NFC) allows two devices to communicate within a very short range, no more than 10 cm. While NFC has been available for over a decade, the technology recently became mainstream with the proliferation of electronic passports and contactless credit cards.</p><p>Jumio’s SDK already allowed you to compare a user’s selfie with their passport photo. But accessing the NFC chip in an electronic passport dramatically improved identity verification by introducing another data point, this time provided by a trusted (state) issuing authority. We can now validate that the passport is legitimate by checking the security certificate embedded on the NFC chip against the ICAO’s public key masterlist. In the future, we hope to add the ability to compare the user’s image with the photo data on the NFC chip.</p><p>Adding NFC support to the SDK wasn’t easy. If you’ve embarked on this journey, you know that the specifications are hundreds of pages long and that there are many pitfalls along the way. In this series of blog posts, we will share what we learned so you can have a better understanding of NFC and an easier time enabling it in your own applications.</p><p><strong>NFC Support in iOS</strong></p><p>Devices supporting the near-field communication protocol first arrived in consumer hands in trial form in 2007. By 2012, most Android devices included an NFC-capable chipset. Apple Pay, deployed in 2014, was the first iOS use of the NFC protocol, but Apple prevented all other use of the NFC hardware. With the iPhone X in 2018, Apple began introducing expanded NFC capabilities through use of an external library, albeit one that only worked on newer devices. Finally, in late 2019, iOS 13 extended full NFC capabilities to all devices newer than the iPhone 7.</p><p>Apple delayed implementing NFC until the applications that needed the technology were ready for adoption. They focused initial development efforts toward Bluetooth Low-Energy (BLE), feeling this better filled consumer needs for mobile devices. They only implemented NFC when it was needed for making Apple Pay work, where the extremely short range of NFC enabled a more natural and secure solution. Even then, Apple remained focused on more robust technologies like Bluetooth by keeping the general NFC capabilities restricted in use.</p><p>The UK Home Office in 2018, with support from the Dutch government and others, <a href="https://www.bbc.com/news/uk-politics-46043668">ran a pressure campaign</a> to convince Apple to add this capability to iOS. Scanning the NFC chips in passports allows app providers, like the UK Home Office, to better validate an individual’s identity using multiple security factors; in the passport scenario, combining something you have (your official passport) with something you are (a selfie).</p><p><strong>Why is NFC So Valuable?</strong></p><p>The NFC protocol is an evolution of the more-familiar RFID protocol. Unlike RFID, NFC operates over a very short range (no more than 10 cm). Also unlike RFID, which tends to make use of proprietary protocols, NFC chips store and provide data in a standardized way that is reader-agnostic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Guw8EnRoJZLWkgJY" /></figure><p>Modern electronic passports follow the ICAO9303 standard established by the International Civil Aviation Organization (ICAO), acting as ISO/IEC 14443 NFC-enabled smart cards. Whereas most NFC chips possess at most a few kilobytes of on-board memory, the biometric passport standard requires at least 32 kilobytes of EEPROM storage. The standard specifies three biometric identifiers — fingerprint, facial, and iris recognition — and provides for images of these identifiers stored on the NFC chip. The passport NFC chip also contains a rudimentary operating system that provides, among other things, support for cryptographic capabilities.</p><p>The problem, of course, is that prior to general iOS support for reading NFC chips, major segments of the smartphone-using public would be alienated by any app provider wanting (or needing) this enhanced security. As of March 2020, <a href="https://gs.statcounter.com/os-market-share/mobile/europe">over 27%</a> of smartphone users in Europe have iOS devices. The share in the UK is <a href="https://gs.statcounter.com/os-market-share/mobile/united-kingdom">over 50%.</a> In the United States, the iOS market share rises <a href="https://gs.statcounter.com/os-market-share/mobile/united-states-of-america">above 60%</a>. With iOS 13, we can finally build multi-platform apps that use the NFC chips in passports and other identity documents to gain greater confidence in identity matches and improved security in making those matches.</p><p><strong>NFC Access Modes</strong></p><p>When using NFC, there are three general modes of access: Card Emulation, Reader/Writer, and Peer-to-Peer. Prior to iOS 13, only the reader mode was supported, and even then it was largely restricted to Apple Pay. In iOS 13, all NFC modes are now accessible to app developers. Here’s a brief rundown of what these capabilities entail.</p><p><strong><em>Card Emulation</em></strong> — This mode allows the phone to act as an NFC smartcard. Using this mode, a hotel can use your smartphone as your key for your hotel room. This is the mode that enables Apple Pay to function.</p><p><strong><em>Reader/Writer</em></strong> — In this mode, a device can access and/or manipulate the storage on an NFC tag. NFC tags can be found in product or inventory management labels, smart posters, and even in some toys, like the popular Amiibos used with Nintendo consoles. This mode enables access to data on passports and other secure electronic documents.</p><p><strong><em>Peer-to-Peer</em></strong> — Using this capability, two NFC-enabled devices can pair with each other to share information. Most commonly this mode is used to bootstrap another communications protocol, like Bluetooth, to facilitate faster transfer of data. This allows devices to share video and image data, for example.</p><p>Regardless of the mode of access, security is a primary concern of providers. Card emulation, for example, must provide the same cryptographic support as the tags used by credit card issuers if those issuers are going to trust the platform for payments. Likewise, the ICAO9303 standard governing electronic passports describes how data is encrypted and accessed on these documents.</p><p><strong>Reading NFC Data</strong></p><p>As a wireless communications protocol, NFC requires a standards-compliant device to communicate with. An NFC device like a phone interacts with either a powered target (an NFC card reader, for example) or an unpowered target (like the tag in a passport). In either case, the coiled antennas on both the NFC device and the target form an air-core transformer through which data (and power for passive tags) are transferred.</p><p>A powered target is another device such as a point-of-sale terminal or other card reader. These devices generate their own electromagnetic field that can provide power to a passive smartcard or tag. A phone uses the Host Card Emulation standard to mimic one of these passive devices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rVIbsZKxWVXV8rwvL1RBtA.png" /></figure><p>An unpowered target, generally referred to as an NFC tag, commonly takes the form of a small sticker. These stickers can be affixed to posters, books, inventory, or anything else you might think of. Bulk rolls with modest storage needs can be very economical. At the time of writing, <a href="https://www.amazon.com/2500-NFC-Stickers-Reel-NTAG213-25mm/dp/B01MRZIRV6">Amazon lists a roll of 2,500 NFC stickers</a> with 144 bytes of accessible storage each for $625, which comes out to $0.25 per sticker. While 144 bytes seems miniscule, it’s far more than enough to store several URLs, especially if they’re run through a URL shortener. There’s also plenty of storage to store a compressed JSON structure containing complex identifying information in the inventory management use case.</p><p>On iOS devices, reading NFC tags requires use of the Core NFC library in the Apple SDK. Apple provides a <a href="https://developer.apple.com/documentation/corenfc/building_an_nfc_tag-reader_app">quick tutorial with code examples</a>, which goes through the basics of setting up an NFC tag-reader app.</p><p>Note: Although the tutorial intro specifies that iOS 13 supports NFC tag types 1 through 5, those are currently the only tag types the <a href="https://nfc-forum.org/our-work/specification-releases/specifications/">NFC Forum defines</a>. In other words, iOS 13 supports all current NFC tag types.</p><p><strong>Getting Started</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*kk1uUa-rdG-q8jbx" /></figure><p>With the full range of NFC capabilities that are available on both Android and iOS 13, app developers can now address a wide array of use cases. However, utilizing this functionality, especially for something as sensitive as identity verification, requires a distinct blend of knowledge. Before you dive in, you will need:</p><ul><li>Knowledge of tag specifications so you don’t waste money on purchasing tags with more storage than is needed</li><li>Understanding of the hardware specifications and limitations of using NFC so you can design your apps to provide a user experience that is both intuitive and functional</li><li>Familiarity with the various security protocols at play, such as BAC and PACE for reading passports</li><li>Knowledge of the standard governing the access mode you want to use in order to understand how data in the target (tag, reader, etc.) is structured and/or delivered</li><li>Understanding of the libraries enabling different access modes, especially core OS libraries and any third-party SDKs (like Jumio’s) that interact with it on the developer’s behalf</li></ul><p>The articles in this series will not exhaustively cover these topics. Our primary goal is to share what we learned in deploying NFC capabilities for large-scale usage through our mobile SDKs. We do aim to provide enough of a technical foundation, however, to make tackling the other topics (such as NFC tag specifications) much easier. We’ve learned a lot of exciting new things as we’ve implemented NFC reading in the Jumio SDK!</p><p>This a series of blog posts highlighting our experiences with reading Passports from your phone via NFC:</p><ul><li>Part 1: Introduction to Enabling NFC in your App</li><li><a href="https://medium.com/jumio/access-controls-for-electronic-machine-readable-travel-documents-430a6e511d22">Part 2: Access Controls for Electronic Machine-Readable Travel Documents</a></li><li><a href="https://medium.com/jumio/supplemental-access-control-and-active-authentication-2d40f181d521">Part 3: Supplemental Access Control and Active Authentication</a></li><li>Part 4: Bringing NFC to the Phone (coming soon)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ce67fdea2ed" width="1" height="1" alt=""><hr><p><a href="https://medium.com/jumio/reading-passports-from-a-phone-the-power-of-nfc-9ce67fdea2ed">Introduction to Enabling NFC in your App</a> was originally published in <a href="https://medium.com/jumio">Jumio Engineering &amp; Data Science</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>