CCID Over Serial and CCID Over TCP Implementations
Total Page:16
File Type:pdf, Size:1020Kb
PMD15282-AA DRAFT - PUBLIC SPRINGCARD PC/SC COUPLERS CCID over Serial and CCID over TCP implementations www.springcard.com PMD15282-AA page 2 of 54 SPRINGCARD PC/SC COUPLERS - CCID over Serial and CCID over TCP implementations DOCUMENT IDENTIFICATION Category Specification Family/Customer CCID PC/SC Couplers Reference PMD15282 Version AA Status Draft Classification Public Keywords Smart Card, Integrated Circuit(s) Cards, PC/SC, CCID, RS-232, RS-TTL, CCID Abstract File name V:\Dossiers\SpringCard\A-Notices\PCSC\CCID over Serial and over TCP\[PMD15282-AA] CCID Couplers over Serial or TCP.odt Date saved 29/07/15 Date printed 16/04/15 SPRINGCARD, the SPRINGCARD logo, PRO ACTIVE and the PRO ACTIVE logo are registered trademarks of SPRINGCARD SAS. All other brand names, product names, or trademarks belong to their respective holders. Information in this document is subject to change without notice. Reproduction without written permission of SPRINGCARD is forbidden. PMD15282-AA page 3 of 54 SPRINGCARD PC/SC COUPLERS - CCID over Serial and CCID over TCP implementations REVISION HISTORY Ver. Date Author Valid. by Approv. Details by Tech. Qual. AA 29/06/15 JDA Draft SPRINGCARD, the SPRINGCARD logo, PRO ACTIVE and the PRO ACTIVE logo are registered trademarks of SPRINGCARD SAS. All other brand names, product names, or trademarks belong to their respective holders. Information in this document is subject to change without notice. Reproduction without written permission of SPRINGCARD is forbidden. PMD15282-AA page 4 of 54 SPRINGCARD PC/SC COUPLERS - CCID over Serial and CCID over TCP implementations CONTENTS 1.INTRODUCTION....................................................................6 5.COMMAND LAYER – BULK-OUT ENDPOINT (PC TO RDR MESSAGES)............................................................................25 1.1.ABSTRACT......................................................................6 1.2.SUPPORTED PRODUCT.........................................................6 5.1.LIST OF SUPPORTED/UNSUPPORTED BULK-OUT MESSAGES.............25 1.3.AUDIENCE......................................................................6 5.2.BINDING TO THE TRANSPORT LAYERS.....................................26 1.4.SUPPORT AND UPDATES.......................................................7 5.3.DETAILS......................................................................27 1.5.RELATED DOCUMENTS.........................................................7 5.3.1.PC_To_RDR_IccPowerOn.............................................27 1.5.1.CCID standard.................................................................7 5.3.2.PC_To_RDR_IccPowerOff.............................................27 1.5.2.Developer's guides.........................................................7 5.3.3.PC_To_RDR_GetSlotStatus...........................................28 1.5.3.Products' specifications..................................................7 5.3.4.PC_To_RDR_XfrBlock...................................................28 5.3.5.PC_To_RDR_Escape......................................................29 2.CCID OVER SERIAL................................................................8 6.COMMAND LAYER – BULK-IN ENDPOINT (RDR TO PC 2.1.PHYSICAL LAYER................................................................8 MESSAGES)............................................................................30 2.2.TRANSPORT LAYER.............................................................8 2.2.1.Block format...................................................................8 6.1.LIST OF SUPPORTED/UNSUPPORTED BULK-IN MESSAGES................30 2.2.2.Description of the fields.................................................8 6.2.BINDING TO THE TRANSPORT LAYERS.....................................31 2.2.3.Values for the ENDPOINT field.......................................9 6.3.DETAILS......................................................................31 2.2.4.Size of the blocks............................................................9 6.3.1.RDR_To_PC_DataBlock.................................................31 2.2.5.Timeout..........................................................................9 6.3.2.RDR_To_PC_SlotStatus.................................................32 2.3.COMMAND LAYER.............................................................9 6.3.3.RDR_To_PC_Escape......................................................32 2.4.GENERAL COMMUNICATION FLOW...........................................9 6.4.VALUES OF THE STATUS AND ERROR FIELDS.............................33 2.4.1.Session establishment....................................................9 6.4.1.Slot Status....................................................................33 2.4.2.Half-duplex or full-duplex?...........................................10 6.4.2.Slot Error......................................................................34 2.5.ERROR HANDLING AND RECOVERY.........................................10 7.COMMAND LAYER – INTERRUPT ENPOINT (RDR TO PC 2.5.1.For the Coupler............................................................10 NOTIFICATIONS)....................................................................35 2.5.2.For the PC.....................................................................10 2.5.3.Quick recovery.............................................................11 7.1.LIST OF SUPPORTED INTERRUPT MESSAGES...............................35 7.2.BINDING TO THE TRANSPORT LAYERS.....................................35 3.CCID OVER TCP...................................................................12 7.3.DETAILS......................................................................36 3.1.TCP LINK....................................................................12 7.3.1.PC_To_RDR_NotifySlotChange.....................................36 3.2.TRANSPORT LAYER...........................................................12 8.MAPPING PC/SC CALLS TO PC_TO_RDR / RDR_TO_PC 3.2.1.Block format.................................................................12 MESSAGES.............................................................................37 3.2.2.Description of the fields...............................................13 3.2.3.Values for the ENDPOINT field.....................................13 8.1.1.SCardStatus..................................................................37 3.2.4.Size of the blocks..........................................................13 8.1.2.SCardConnect...............................................................37 3.3.COMMAND LAYER...........................................................13 8.1.3.SCardTransmit..............................................................38 8.1.4.SCardDisconnect..........................................................38 3.4.GENERAL COMMUNICATION FLOW.........................................14 3.4.1.Session establishment..................................................14 8.1.5.SCardControl................................................................39 3.4.2.Nominal dialogue.........................................................14 9.SECURE COMMUNICATION MODE OVER TCP....................40 3.5.ERROR HANDLING AND RECOVERY.........................................14 3.5.1.For the Coupler............................................................14 9.1.ABSTRACT....................................................................40 3.5.2.For the PC.....................................................................14 9.2.CRYPTOGRAPHIC BACKGROUND.............................................40 3.5.3.Recovery......................................................................15 9.3.CONFIGURATION.............................................................41 9.3.1.Configuring the authentication mode..........................41 4.COMMAND LAYER – CONTROL ENDPOINT.........................16 9.4.3-PASS AUTHENTICATION...................................................41 4.1.LIST OF CONTROL MESSAGE PAIRS.........................................16 9.4.1.Step 0, PC to RDR.........................................................41 4.2.GET STATUS COMMAND/RESPONSE.......................................17 9.4.2.Step 1, RDR to PC.........................................................41 9.4.3.Step 2, PC to RDR.........................................................42 4.3.GET DESCRIPTOR COMMAND/RESPONSE.................................18 4.3.1.Command/response format.........................................18 9.4.4.Step 3, RDR to PC.........................................................43 4.3.2.List of available descriptors..........................................19 9.5.SECURE COMMUNICATION..................................................44 4.3.3.Response to a query for an unknown descriptor..........22 9.5.1.Generation of the disposable keys...............................45 9.5.2.Format of the secure blocks.........................................46 4.4.SET CONFIGURATION COMMAND/RESPONSE.............................23 9.5.3.CMAC...........................................................................47 4.5.ANSWERS TO UNSUPPORTED MESSAGES...................................24 9.5.4.AES-CBC encryption......................................................48 SPRINGCARD, the SPRINGCARD logo, PRO ACTIVE and the PRO ACTIVE logo are registered trademarks of SPRINGCARD SAS. All other brand names, product names, or trademarks belong to their respective holders. Information in this document is subject to change without notice. Reproduction without written