GP规范学习(二)

4  Security Architecture

4 安全架构

Well-designed security architectures are crucial to protecting the structure and function of cards within the GlobalPlatform system.

This chapter outlines:

•  The security goals behind the architecture;

•  The specific responsibilities of the Card Issuer as the owner of the card;

•  The Application Providers as the owners of the Applications;

•  The Controlling Authority;

•  The security requirements for the on-card components;

•  The cryptographic support provided by GlobalPlatform

GlobalPlatform系统中,精心设计的安全架构是确保卡片结构和功能安全的关键,本章包括以下内容:

  架构后面安全目标

  作为卡片所有者的发卡方的特殊安全职责;

  应用提供方的安全职责;

  授权管理者的安全职责;

  卡片组件的安全要求;

  GlobalPlatform提供的加密支持

4.1  Goals

4.1目标

The primary goal of the GlobalPlatform is to ensure the security and integrity of the card's components for the life of the card. These components are

•  The runtime environment;

•  The OPEN;

•  The Issuer Security Domain;

•  Supplementary Security Domains;

•  The Applications.

 

GlobalPlatform卡片架构的首要目标是确保在卡片生命周期内卡片各组件的安全性和完整性,这些组件包括:

  运行时环境;

  OPEN;

  发卡方安全域;

  补充安全域;

  应用

To ensure card security and integrity, the GlobalPlatform is designed to support a range of secure mechanisms for:

•  Data integrity;

•  Resource availability;

•  Confidentiality;

•  Authentication.

 

为了确保安全性和完整性,GlobalPlatform设计了一系列的机制:

  数据完整性;

  资源可用性;

  机密性;

  鉴别认证

 

The choice of security policy and cryptography is assumed to be industry and product specific. Because the cards are only part of a larger card system involving multiple parties and off-card components, the GlobalPlatform also relies upon non-cryptographic, procedural means of protection, such as code testing and verification, physical security, and secure key handling. However, these aspects are out of scope for this card specification

安全策略和加密技术的选择根据行业和产品的不同而有所不同。

由于卡片仅仅是包含了许多不同组成部分和卡外组件的更大的卡系统的一个组成部分,GlobalPlatform对安全的保障还依赖于许多非加密学的、程序性的途径,例如代码检测与认证、物理安全特性、密钥处理等等。但是这些方面的内容都超出了本规范的范围。

 

 

4.2  Security Responsibilities and Requirements

4.2 安全职责和要求

4.2.1  Card Issuer's Security Responsibilities

4.2.1 发卡方的职责

The Card Issuer is responsible for:

•  Generating and loading the Issuer Security Domain keys;

•  Enforcing standards and policies for Application Providers governing all aspects of Applications to be provided to the Card Issuer or operated on the Card Issuer's cards;

•  Working with Application Providers to create and initialize Security Domains other than the Issuer Security Domain;

•  Determining policy with regards to card and Application Life Cycle management, velocity checking levels, privileges, and other security parameters;

•  Managing the application code loading and installing both on a Pre-Issuance and Post-Issuance basis, and

•  Cryptographically authorizing load, install, and extradition to be performed by Application

Providers.

发卡方的职责包括:

  产生和加载发卡方安全域的密钥

  贯彻发卡方向执行应用提供方提出的标准和策略,以便对提交给发卡方或运行在发卡方卡片上的应用的各个方面进行监管;

  协同应用提供方,创建和初始化除了发卡方安全域之外其他安全域;

  决定与卡片和应用生命周期管理、频度检测级别、权限及其他安全参数相关的策略;

  管理发卡前和发卡后应用代码的加载和安装

  对应用提供方的加载、安装、迁移等操作进行加密授权

4.2.3  Controlling Authority's Security Responsibilities

A Controlling Authority is responsible for:

•  Generating the keys for its own Security Domain or obtaining Security Domain keys from a trusted third party;

•  Working with the Card Issuer to load generated keys into the Controlling Authority's Security Domain;

•  Providing load file data block signatures according to its own security policy for integrity and source authenticity.

 

4.2.3 授权管理者的职责

  授权管理者的职责包括:

  创建自己安全域的密钥或是从可信任的第三方获取安全域密钥;

  协同发卡方向自己的安全域加载已经创建的安全域密钥;

根据自己制定的安全策略提供加载文件数据块的数字签名,以保证数据完整性和来源的可信性;

 

4.2.4  On-Card Components' Security Requirements

4.2.4.1  Runtime Environment Security Requirements

 

The runtime environment is responsible for:

•  Providing an interface to all Applications that ensures that the runtime environment security mechanisms cannot be bypassed, deactivated, corrupted or otherwise circumvented;

4.2.4 卡片组件的安全性要求

4.2.4.1 运行时环境的安全性要求

对运行时环境的安全性要求包括:

向所有应用提供一套接口,以确保运行时环境自身的安全机制不会被规避、无效、崩溃以及遭到其他任何危害;

  

•  Performing secure memory management to ensure that:

进行内存的安全性管理,以确保:

-  Each application's code and data (including transient session data) as well as the runtime environment itself and its data (including transient session data) is protected from unauthorized access from within the card;

每个应用的代码和数据(包括瞬时会话数据)和运行时环境自身的代码和数据(包括瞬时会话数据)一样不会遭受任何来自卡内的未经授权的访问;

-  When more than one logical channel is supported, each concurrently selected Application's code and data (including transient session data) as well as the runtime environment itself and its data (including transient session data) is protected from unauthorized access from within the card;

当卡片支持超过一个以上的逻辑通道时,每个被并行选择的应用的代码和数据(包括瞬时会话数据)和运行时环境自身的代码和数据(包括瞬时会话数据)一样不会遭受任何来自卡内的未经授权的访问;

-  The previous contents of the memory is not accessible when that memory is reused;

内存被回收重复使用时,该内存之前驻留的内容应该不能被访问到;

-  The memory recovery process is secure and consistent in case of a loss of power or withdrawal of the card from the card reader while an operation is in progress;

当正在进行操作时卡片断电或是从读卡器上取走的情况下,内存的恢复过程应能保证数据的安全性和一致性;

•  Providing communication services with off-card entities that ensures the proper transmission (according to the specific communication protocol rules) of unaltered command and response messages. (See the appropriate runtime environment documentation for more details).

提供给卡片和卡外实体的通信服务(依据特定的通信协议规则)应确保命令和响应消息未经篡改地正确传送(详情请参阅相应的运行时环境文档)。

 

 

4.2.4.2  Trusted Framework Requirements

Each Trusted Framework present on the card shall:

4.2.4.2 可信任框架的安全性要求

  对每个可信任框架的安全性要求包括:

 

•  Check the application access rules of the inter-acting Applications according to their respective privileges;

根据各个应用被赋予的权限,检查进行互操作的应用的访问规则;

•  Enforce the Trusted Framework security rules for inter-application communication, including the rules; defined in appendix G;

在处理应用间通信时,贯彻附录G中定义的可信任框架安全规则;

•  Ensure that incoming messages are properly routed unaltered to their intended destinations;

确保发送出来的消息未经篡改地正确路由到其相应的目标;

•  Ensure that any response messages are properly returned unaltered (except for any

cryptographic protection) to the original receiver of the incoming message.

确保返回的响应未经篡改(正常的保护性加密处理除外)地正确返回到其相应的目标

4.2.4.3  OPEN Security Requirements

The OPEN shall:

4.2.4.3 OPEN的安全性要求

  对OPEN的安全性要求包括:

•  Provide an interface to all Applications that ensures that the GlobalPlatform security mechanism cannot be bypassed, deactivated, corrupted or otherwise circumvented;

向所有应用提供一套接口,以确保GlobalPlatform自身的安全机制不会被规避、无效、崩溃以及遭到其他任何危害;

•  Check application access rules according to the Applications' privileges;

根据各个应用被赋予的权限,检查该应用的访问规则;

•  Manage card and Application Life Cycle (see chapter 5 - Life Cycle Models);

管理卡片和应用的生命周期(参见第五章 生命周期模型);

•  Ensure that the Card Content changes are authorized by the Card Issuer;

确保卡片内容的任何变化都经过了发卡方的合法授权;

•  Ensure that application code has been signed by the Controlling Authority represented on the card;

确保应用代码经过了授权管理者的签名;

•  Ensure that application code has been signed by Application Providers represented on the card, if required.

如果需要的话,确保应用代码经过了应用提供方的签名

4.2.4.4  Security Domain Security Requirements

Security Domains enforce the security policies of their off-card Security Domain Provider.

When applicable a Security Domain shall:

4.2.4.4 安全域的的安全性要求

安全域负责贯彻其卡外安全域提供者制定的安全策略。当安全域可用时,必须负责:

•  Communicate with off-card entities in accordance with its Security Domain Provider's security policy in Pre-Issuance and Post-Issuance;

在发卡前或者发卡后,根据其卡外安全域提供者制定的安全策略,与卡外实体进行通信

•  Manage on-card data securely;

管理卡片数据的安全性

•  Provide cryptographic protection services for its own Applications during their personalization and optionally during their subsequent operation;

为其相关联的应用在个人化或接下来的操作中,提供加密保护服务;

•  Request the OPEN to load, install, extradite, and delete card content;

请求OPEN进行加载、安装、迁移、删除卡片内容的操作;

•  Return to the off-card entity any receipt for load, install, extradition, and delete;

       向卡外实体返回加载、安装、让渡、删除等操作的收条;

•  Verify the authorization for Card Content changes initiated by an off-card authority;

       验证卡外机构发起的改变卡片内容的操作是否经过了合法授权;

•  Generate receipts for load, install, extradition, and delete;

创建加载、安装、迁移、删除等操作的收条

•  Verify the load file data block signature when requested by the OPEN.

       根据OPEN的要求,验证加载文件数据块的数字签名

4.2.4.5  Global Services Application Security Requirements

A Global Services Application shall:

•  Be able to provide services to other Applications, such as CVM services;

•  Hold the Global Services application-related data securely;

•  Perform internal security measures as required by the service.

 

4.2.4.5 全局服务应用的安全性要求

  一个全局服务应用必须:

  能够向其他应用提供CVM之类的服务;

  安全地持有全局服务应用相关的数据;

  提供服务时,执行内部的安全评估

4.2.4.6  Application Security Requirements

Applications should:

•  Expose only data and resources that are necessary for proper application functionality and;

•  Perform internal security measures required by the Application Provider.

4.2.4.6 应用的安全性要求

  应用应该:

  只暴露完成功能所必须的数据和资源;

  执行应用提供方要求的内部安全评估

4.2.5  Back-End System Security Requirements

4.2.5 后台系统的安全性要求

 

Despite the best efforts of the card and the loading processes to provide a stable and secure environment, these components alone cannot ensure total security. The back-end systems (multiple back-end systems may exist for a single card), which communicate with the cards, perform the verifications, and manage the off-card key databases, also shall be trusted. Responsible personnel, secure operating systems, system security policies, and audit procedures are all essential components that secure the back-end systems. These requirements are beyond the scope of this Specification.

Information on GlobalPlatform's off-card requirements relating to card management can be found in the GlobalPlatform Key Management System Functional Requirements, GlobalPlatform Smart Card Management System Functional Requirements and GlobalPlatform Messaging Specification.

  尽管卡片及其初始化过程尽可能地提供了一个稳定而安全的环境;但仅有这些组件,还不足以单独提供全面的安全性。负责与进行卡片通信、执行安全验证、管理卡外密钥数据块等功能的后台系统(也许针对单独的卡片就存在多个后台系统)本身,也必须是可信的。尽责的操作人员,安全的操作系统,系统级的安全策略,安全审计程序,所有这些组件对一个安全的后台系统来说,都是不可或缺的。对它们的具体要求已经超出了本规范的内容范围。GlobalPlatform的卡外系统中,与卡片管理相关的内容请参阅《GlobalPlatform密钥管理系统功能需求》和《GlobalPlatform智能卡管理系统功能需求》,以及《GlobalPlatform消息规范》。

4.3  Cryptographic support

One of the major requirements for a GlobalPlatform card is the ability to provide a minimum level of cryptographic functionality. This cryptography is, for example, used for the generation of signatures, and is available for use by the Applications present on the card.

 

4.3 加密支持

对GlobalPlatform卡片的最主要的要求之一就是要有能力提供最起码的加密支持功能。这里说的加密支持,包括数字签名的创建,而且要能够为卡上的应用所使用

The Issuer Security Domain shall implement one Secure Channel Protocol. A Security Domain other than the Issuer Security Domain shall implement [at least] one Secure Channel Protocol. A GlobalPlatform card should support symmetric cryptography such as the Data Encryption Standard (DES) algorithm. A GlobalPlatform card may also support asymmetric cryptography such as the Rivest / Shamir / Adleman(RSA) algorithm.

 

发卡方安全域必须实现一种安全通道协议,其他安全域必须至少实现一种安全通道协议。GlobalPlatform卡片应该支持DES之类的对称加密算法,以及RSA之类的非对称加密算法。

 

The following cryptographic services are described in this section:

•  Integrity and authentication;

•  Secure messaging.

 

本节描述的加密服务包括:

数据完整性和可信性;

安全消息传递。

When present, services to encrypt and decrypt any pattern of data using these algorithms shall be available to Applications.

It is the responsibility of the Card Issuer or the Controlling Authority to set up the appropriate off-card procedures to comply with the governmental restrictions upon cryptography. Features to disable or restrict cryptography usage by Applications on a card are beyond the scope of this Specification.

如果某种加密服务存在于卡上,则必须向调用这些服务的应用支持与其对应的各种加解密模式。

发卡方或者授权管理者必须负责制定恰当的流程以符合政府部门对加密领域的各类约束。对卡片上应用所调用的加密算法进行的禁止或限制的内容,已超出了本规范的范围。

 

4.3.1  Secure Card Content Management

The concepts of integrity and authentication represent an additional value associated with a message or a block of data.

The purpose of this additional value is to provide a method of verifying the source and/or the integrity of particular block of code or data.

The following describes the different usages of integrity and authentication for Card Content management in this Specification.

4.3.1 安全的卡片内容管理

完整性和可信性的概念是和消息或数据块的附加的数据值相关联的。这个附加的数据值的目的,是提供一种验证数据来源的可信性及数据本身完整性的方法。下面的内容描述了在卡片内容管理中,本规范采用的确保完整性和可信性一些方式。

4.3.1.1  Load File Data Block Hash

The Load File Data Block Hash is intended to verify the integrity of a complete Load File Data Block when loaded to a GlobalPlatform card. 

The Load File Data Block Hash is used in the computation of:

•  The Load File Data Block Signature (see section 4.3.1.2 - Load File Data Block Signature); and

•  The Load Token (see section 4.3.1.3 - Delegated Management Tokens).

4.3.1.1 加载文件数据块散列值

加载文件数据块散列值用来在向GlobalPlatform卡加载数据时,验证加载文件数据块的完整性。

加载文件数据块散列值用在下列的计算过程:

  加载文件数据块签名(参见4.3.1.2 加载文件数据签名)

  加载令牌(参见4.3.1.3 委托管理令牌)

4.3.1.2  Load File Data Block Signature (DAP)

The Load File Data Block Signature is an authentication value generated by an off-card entity (an Application Provider or a Controlling Authority). This is the signature of the Load File Data Block Hash and is included in the DAP Block of the Load File. One or more DAP Blocks may be included in a Load File.

 

4.3.1.2 加载文件数据块签名(DAP)

  加载文件数据块签名是由一个卡外实体(应用提供方或授权管理者)产生的认证数据值,它是加载文件数据块散列值的数字签名并附着在加载文件的数据鉴别块中。每个加在文件附有一个或多个数据鉴别块。

 

When present during the loading of a Load File to the card, each signature shall be verified by the appropriate Security Domain. The verification operation is referred to as Data Authentication Pattern (DAP) Verification.

当在向卡片加载文件时,每个存在的数字签名必须由恰当的安全域进行验证。该验证被称为数据鉴别模式(DAP)验证。

4.3.1.3  Delegated Management Tokens

Delegated Management Tokens are signatures of one or more Delegated Management functions (loading, installing, extraditing and deleting) generated by the Card Issuer and used to provide the Card Issuer the control over these Card Content changes. Tokens shall be verified by the appropriate Security Domain.

 

4.3.1.3 委托管理令牌

  委托管理令牌是发卡方对一个或多个委托管理操作(加载、安装、让渡、删除)创建的签名,作用是让发卡方能对其发行卡片的内容变化有所控制。该令牌必须由恰当的安全域进行验证。

4.3.1.4  Receipts

       The appropriate Security Domain may generate Receipts during Delegated Management. A Receipt is proof that an Application Provider has modified the Card Content.

4.3.1.4 收条

  委托管理时,恰当的安全域可以创建收条,作为应用提供方已经对卡片内容进行了改变的证据。

4.3.2  Secure Communication

4.3.2 安全通信

A GlobalPlatform card may provide security services related to information exchanged between the card and an off-card entity. The security level of the communication with an off-card entity does not necessarily apply to each individual message being transmitted but can only apply to the environment and/or context in which messages are transmitted. The concept of the Life Cycle of the card (see section 5.1 - Card Life Cycle) may be used to determine the security level of the communication between the card and an off-card entity.

  GlobalPlatform卡可以为卡片和卡外实体的信息交换提供对应的安全服务。与卡外实体的通信安全级别没有必要应用于每个单独的消息传输过程,但是却可以用在进行内部消息传输的环境或上下文中。卡片生命周期的概念(参见5.1节 卡片生命周期)可用来确定卡片和卡外实体的通信安全级别。安全通信的加密算法取决于不同的行业和产品。

 

The choice of cryptographic algorithms for secure communication is assumed to be industry and product specific.

A GlobalPlatform card offers the following security services associated with messages and defined within a Secure Channel Protocol (see chapter 10 - Secure Communication):

GlobalPlatform卡提供了下列与消息交换相关的安全服务,且在安全通道协议中有定义(参见第10  安全通信)

 

•  Entity authentication - in which the card or the off-card entity proves its authenticity to the other entity through a cryptographic exchange;

实体认证-通过这种方式,卡片和卡外实体能够通过加密的消息交换,验证对方的可信性

 

•  Integrity and authentication - in which the receiving entity (the card or off-card entity) ensures that the data being received from the sending entity (respectively the off-card entity or card) actually came from an authenticated entity in the correct sequence and has not been altered;

完整性认证-通过这种方式,接收方(卡片或卡外实体)可以确保从发送方(对应的卡外实体或卡片)收到的数据是来自通过了合法认证的实体,且消息序列正确无误,未遭篡改;

 

 

•  Confidentiality - in which data being transmitted from the sending entity (the off-card entity or

card) to the receiving entity (respectively the card or off-card entity) is not viewable by an

unauthenticated entity.

机密性-通过这种方式,可以确保数据从发送方(卡外实体或卡片) 传送到接收方(对应的卡片或卡外实体)的过程中,不会遭到未经认证的实体窥探。

 

Authentication of the off-card entity combined with the card Life Cycle State allows the card to assume its environment and/or context.

卡片能够通过对卡外实体的认证连和卡片的生命周期状态,来确定其所处的环境和上下文。

  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1. 介绍 2 2. 系统架构 10 3. 卡的架构 11 3.1. 运行时环境 11 3.2. 卡的管理者(Card Manager) 12 3.2.1. GlobalPlatform运行时环境(OPEN) 12 3.2.2. 发行者安全域 12 3.2.3. 卡持有者的校验方法 13 3.3. 安全域(Secure Domains) 13 3.4. GP的API(Open Platform API) 13 3.5. 卡的内容 13 4. 安全架构 15 4.1. 目标 15 4.2. 安全职责 15 4.2.1. 卡发行者(Card Issuer) 15 4.2.2. 应用提供者(Application Provider) 16 4.2.3. 控制授权中心机构(Controlling Authority) 16 4.2.4. 卡上组件的安全要求 16 4.2.4.1. 对运行时环境的安全要求 16 4.2.4.2. 对OPEN的安全要求 17 4.2.4.3. 对发行者安全域的安全要求 17 4.2.4.4. 对CVM处理者的安全要求 17 4.2.4.5. 对安全域的安全要求 17 4.2.4.6. 对应用的安全要求 18 4.2.5. 后台系统的安全要求 18 4.3. 加密支持 18 4.3.1. 卡内容的完整性校验和数据鉴别 18 4.3.1.1. 装载文件数据块HASH 18 4.3.1.2. 装载文件数据块签名 19 4.3.1.3. 委托管理令牌 19 4.3.1.4. 收条 19 4.3.2. 安全通讯 19 5. 生命周期模型 21 5.1. 卡的生命周期 21 5.1.1. 卡生命周期的状态 21 5.1.1.1. OP_READY状态 21 5.1.1.2. INITIALIZED状态 22 5.1.1.3. SECURED状态 22 5.1.1.4. CARD_LOCKED状态 22 5.1.1.5. TERMINATED状态 22 5.1.2. 卡生命周期状态的迁移 23 5.2. 可执行装载文件的生命周期(Excutable Load File Life Cycle) 24 5.2.1. 可执行装载文件的生命周期 25 5.2.1.1. LOADED状态 25 5.2.1.2. 可执行装载文件的删除 25 5.2.2. 可执行模块的生命周期 25 5.3. 卡内应用和安全域的生命周期 25 5.3.1. 卡内应用的生命周期状态 26 5.3.1.1. INSTALLED状态 26 5.3.1.2. SELECTBLE状态 26 5.3.1.3. LOCKED状态 26 5.3.1.4. 应用的删除 27 5.3.1.5. 应用特定生命周期状态 27 5.3.2. 安全域的生命周期状态 28 5.3.2.1. INSTALL状态 28 5.3.2.2. SELECTABLE状态 28 5.3.2.3. PERSONALIZED状态 28 5.3.2.4. LOCKED状态 28 5.3.2.5. 安全域的删除 29 5.4. 卡的生命周期和AP生命周期状态的演示 30 6. 卡的管理者(CM) 32 6.1. 概述 32 6.1.1. OPEN 32 6.1.2. 发行者安全域 33 6.1.3. CVM处理者 34 6.2. CM的服务 34 6.2.1. 应用访问OPEN服务 34 6.2.2. 应用访问CVM服务 34 6.2.3. 应用访问发行者安全域的服务 35 6.2.4. 发行者域访问应用服务 35 6.4. 卡内容的管理 41 6.4.1. 卡内容的装载和安装 41 6.4.1.1. 卡内容的装载 42 6.4.1.2. 卡内容的安装 43 6.4.2. 内容的移除 45 6.4.2.1. 应用的移除 45 6.4.2.2. 可执行装载文件的移除 46 6.4.2.3. 可执行装载文件和相关应用的移除 47 6.4.3. 内容的移交(context Extradition) 48 6.5. 委托管理 48 6.6. GP的注册表 49 6.6.1. 发行者域数据元素的描述 49 6.6.1.1. 发行者安全域的AID 50 6.6.1.2. 卡的生命周期状态 50 6.6.2. 应用/可执行装载文件/可执行模块的数据元素的描述 50 6.6.2.1. 应用/可执行装载文件/可执行模块的AID 50 6.6.2.2. 应用/可执行装载文件/可执行模块的生命周期 50 6.6.2.3. 资源分配 50 6.6.2.4. 应用的权限 51 6.6.2.5. 相关联安全域的AID 52 6.7. 安全管理 52 6.7.1. 应用的锁定 53 6.7.2. 卡的锁定 54 6.7.3. 卡的终止 55 6.7.4. 操作频率的检查 56 6.7.4.1. 卡内容的装载和安装时的频率检查 56 6.7.4.2. 异常操作频率检查 56 6.7.5. 跟踪和事件的记载 57 6.7.6. 安全内容的装载和安装 57 6.7.6.1. 装载文件的数据块HASH值 57 6.7.6.2. 令牌 57 6.7.6.3. 装载文件数据块的签名 57 6.8. 发行者安全域 58 6.8.1. 发行者的标识号 58 6.8.2. 卡的Image号 58 6.8.3. 卡的识别数据 59 6.8.4. 卡上的密钥信息 59 7. 安全域 63 7.1. 概述 63 7.2. 安全域服务 64 7.2.1. 访问安全域服务的应用 64 7.2.2. 访问应用的安全域 65 7.3. 个人化支持 65 7.4. 运行时消息支持 66 7.5. DAP验证 67 7.6. 代理管理 68 7.6.1. 代理下载 68 7.6.2. 代理安装 69 7.6.3. 代理移交 70 7.6.4. 代理删除 71 7.7. 代理管理令牌、收条及DAP验证 72 7.7.1. 下载令牌 72 7.7.2. 下载收条 73 7.7.3. 安装、移交令牌 73 7.7.4. 安装收条 73 7.7.5. 移交收条 74 7.7.6. 删除收条 74 7.7.7. 下载文件数据块hash 75 7.7.8. 下载文件数据块签名 (DAP验证) 75 8. 安全通讯 76 8.1. 安全通道 76 8.2. 显式/隐式的安全通道 76 8.2.1. 显式安全通道初始化 76 8.2.2. 隐式安全通道初始化 77 8.2.3. 安全通道结束 77 8.3. 直接/间接处理安全通道协议 77 8.4. 实体认证 77 8.5. 安全消息传输 77 8.6. 安全通道协议标识 78 9. APDU命令参考 80 9.1. 总的编码规则 81 9.1.1. 生命周期状态的编码 81 9.1.2. 应用的权限编码 82 9.1.3. 一般性的错误情形 83 9.1.4. CLASS字节编码 84 9.1.5. APDU命令和响应数据 84 9.1.6. 密钥类型编码 84 9.1.7. 在委托管理的响应消息中的收条信息(可选) 85 9.2. DELETE命令 86 9.2.1. 定义和范围 86 9.2.2. 命令消息 86 9.2.2.1. 引用控制参数P1 86 9.2.2.2. 引用控制参数P2 86 9.2.2.3. 命令消息中发送的数据字段 86 9.2.3. 响应消息 87 9.2.3.1. 在响应消息中返回的数据字段 87 9.2.3.2. 在响应消息中返回的处理状态 87 9.3. GET DATA命令 88 9.3.1. 定义和范围 88 9.3.2. 命令消息 88 9.3.2.1. CLA字节 88 9.3.2.2. 参数P1和P2 88 9.3.2.3. 在命令消息中发送的数据字段 89 9.3.3. 响应消息 89 9.3.3.1. 在响应消息中返回的数据字段 89 9.3.3.2. 在响应消息中返回的处理状态 90 9.4. GET STATUS命令 90 9.4.1. 定义和范围 90 9.4.2. 命令消息 90 9.4.2.1. 引用控制参数P1 91 9.4.2.2. 引用控制参数P2 91 9.4.2.3. 命令消息中发送的数据字段 92 9.4.3. 响应消息 92 9.4.3.1. 在响应消息中返回的数据字段 92 9.4.3.2. 在响应消息中返回的处理状态 93 9.5. INSTALL命令 94 9.5.1. 定义和范围 94 9.5.2. 命令消息 94 9.5.2.1. 引用控制参数P1 94 9.5.2.2. 引用控制参数P2 95 9.5.2.3. 命令消息中发送的数据字段 95 9.5.3. 响应消息 98 9.5.3.1. 在响应消息中返回的数据字段 98 9.5.3.2. 在响应消息中返回的处理状态 99 9.6. LOAD命令 99 9.6.1. 定义和范围 99 9.6.2. 命令消息 99 9.6.2.1. 引用控制参数P1 100 9.6.2.2. 引用控制参数P2-块号 100 9.6.2.3. 命令消息中发送的数据字段 100 9.6.3. 响应消息 101 9.6.3.1. 在响应消息中返回的数据字段 101 9.6.3.2. 在响应消息中返回的处理状态 101 9.7. MANAGE CHANNEL命令 102 9.7.1. 定义和范围 102 9.7.2. 命令消息 102 9.7.2.1. 引用控制参数P1 102 9.7.2.2. 引用控制参数P2 102 9.7.2.3. 命令消息中发送的数据字段 103 9.7.3. 响应消息 103 9.7.3.1. 在响应消息中返回的数据字段 103 9.7.3.2. 在响应消息中返回的处理状态 103 9.8. PUT KEY命令 103 9.8.1. 定义和范围 103 9.8.2. 命令消息 104 9.8.2.1. 引用控制参数P1 104 9.8.2.2. 引用控制参数P2 104 9.8.2.3. 命令消息中发送的数据字段 105 9.8.3. 响应消息 106 9.8.3.1. 在响应消息中返回的数据字段 106 9.8.3.2. 在响应消息中返回的处理状态 107 9.9. SELECT命令 107 9.9.1. 定义和范围 107 9.9.2. 命令消息 107 9.9.2.1. 引用控制参数P1 108 9.9.2.2. 引用控制参数P2 108 9.9.2.3. 命令消息中发送的数据字段 108 9.9.3. 响应消息 108 9.9.3.1. 在响应消息中返回的数据字段 108 9.9.3.2. 在响应消息中返回的处理状态 109 9.10. SET STATUS命令 109 9.10.1. 定义和范围 109 9.10.2. 命令消息 109 9.10.2.1. 引用控制参数P1-状态类型 110 9.10.2.2. 引用控制参数P2-状态控制 110 9.10.2.3. 命令消息中发送的数据字段 111 9.10.3. 响应消息 111 9.10.3.1. 在响应消息中返回的数据字段 111 9.10.3.2. 在响应消息中返回的处理状态 111 9.11. STORE DATA命令 111 9.11.1. 定义和范围 111 9.11.2. 命令消息 111 9.11.2.1. 引用控制参数P1 112 9.11.2.2. 引用控制参数P2 113 9.11.2.3. 命令消息中发送的数据字段 113 9.11.3. 响应消息 114 9.11.3.1. 在响应消息中返回的数据字段 114 9.11.3.2. 在响应消息中返回的处理状态 114 A. GP的API 116 A.1. 不赞成的Open Platform Java卡API 116 A.2. GP在JAVA卡上 116 A.2.1. GP特定的要求 116 A.2.1.1. GlobalPlatform包的AID 116 A.2.1.2. 安装 116 A.2.1.3. T=0传输协议 117 A.2.1.4. 原子操作 118 A.2.1.5. 逻辑通道 118 A.2.1.6. 加密算法 118 A.2.1.7. 信任级别 118 A.2.1.8. GlobalPlatform方法的调用 118 A.2.2. 类的层次 119 A.2.2.1. 接口org.globalplatform.Application 119 A.2.2.2. 接口org.globalplatform.SecureChannel 120 A.2.2.3. 类org.globalplatform.GPSystem 127 A.2.2.4. 接口org.globalplatform.CVM 131 A.3. GP在windows Powered智能卡 136 B. 算法(加密和HASH) 138 B.1. 数据加密标准(DES) 138 B.1.1. 加密/解密 138 B.1.1.1. CBC模式 138 B.1.1.2. ECB模式 138 B.1.2. MAC 138 B.1.2.1. 完整的TDES MAC 138 B.1.2.2. Single DES加上最终的TDES MAC 138 B.2. HASH算法 139 B.2.1. 安全HASH算法(SHA-1) 139 B.3. 公钥加密方案1(PKCS#1) 139 B.4. DES数据填充 139 C. 安全内容管理 141 C.1. 密钥 141 C.1.1. 发行者安全域密钥 141 C.1.1.1. 令牌密钥 141 C.1.1.2. 收条密钥 141 C.1.2. 安全域密钥 141 C.2. 下载文件数据块Hash 142 C.3. 令牌 142 C.3.1. 下载令牌 142 C.3.2. 安装令牌 143 C.3.3. Extradition Token 145 C.4. 收条 145 C.4.1. 下载收条 146 C.4.2. 安装收条 146 C.4.3. 删除收条 147 C.4.4. 移交收条 148 C.5. DAP验证 148 C.5.1. PKC方案 149 C.5.2. DES方案 149 D. 安全通道协议‘01’ 150 D.1. 安全通讯 150 D.1.1. SCP01安全通道 150 D.1.2. 相互认证 150 D.1.3. 消息的完整性 152 D.1.4. 消息数据的机密性 152 D.1.5. ICV的加密 152 D.1.6. 安全级别 152 D.2. 加密密钥 153 D.3. 加密用法 154 D.3.1. DES会话密钥 154 D.3.2. 鉴别密码(Authenticated Cryptogram) 156 D.3.2.1. 卡的鉴别密码(Card cryptogram) 156 D.3.2.2. 主机端鉴别密码(host cryptogram) 156 D.3.3. MAC生成和MAC校验的APDU指令 156 D.3.4. APDU命令的加密和解密 157 D.3.5. 关键敏感数据的加密和解密 158 D.4. 安全通道的APDU命令 159 D.4.1. INITIALIZE UPDATE命令 159 D.4.1.1. 定义和范围 159 D.4.1.2. 命令消息 160 D.4.1.3. 引用控制参数P1——密钥版本号 160 D.4.1.4. 引用控制参数P2——密钥标识 160 D.4.1.5. 命令消息中要传送的数据段 160 D.4.1.6. 响应消息 160 D.4.1.7. 在响应消息中返回的执行状态 161 D.4.2. EXTERNAL AUTHENTICATION命令 161 D.4.2.1. 定义和范围 161 D.4.2.2. 命令消息 161 D.4.2.3. 引用控制参数P1——安全级别 162 D.4.2.4. 引用控制参数P2 162 D.4.2.5. 命令消息中要传送的数据段 162 D.4.2.6. 响应消息返回的数据段 162 D.4.2.7. 在响应消息中返回的执行状态 162 E. 安全通道协议‘02’ 164 E.1. 安全通迅 164 E.1.1. SPC02安全通道 164 E.1.2. 实体鉴别 165 E.1.2.1. 显式安全通道的初始化 166 E.1.2.2. 隐式安全通道的初始化 167 E.1.3. 消息的完整性 167 E.1.4. 消息数据的机密性 168 E.1.5. 安全级别 168 E.2. 加密密钥 170 E.3. 加密算法 171 E.3.1. CBC 171 E.3.2. 消息的完整性ICV在显式安全通道初始化中的使用 171 E.3.3. 消息的完整性ICV在隐式安全通道初始化中的使用 172 E.3.4. ICV的加密 172 E.4. 加密用法 172 E.4.1. DES会话密钥 172 E.4.2. 在显式安全通道中的鉴别密码 173 E.4.2.1. 卡的鉴别密码(Card cryptogram) 173 E.4.2.2. 主机端的鉴别密码(host cryptogram) 173 E.4.3. 在隐式安全通道中的鉴别密码(Authenticate Cryptogram) 174 E.4.4. APDU命令C-MAC的生成和校验 174 E.4.5. APDU命令响应的R-MAC生成和校验 176 E.4.6. APDU命令数据段的加密和解密 177 E.4.7. 敏感数据的加密和解密 178 E.5. 安全通道的APDU指令 178 E.5.1. INITIALIZE UPDATE命令 179 E.5.1.1. 定义和范围 179 E.5.1.2. 命令消息 179 E.5.1.3. 引用控制参数P1——密钥版本号 180 E.5.1.4. 引用控制参数P2 180 E.5.1.5. 命令消息中要传送的数据段 180 E.5.1.6. 响应消息 180 E.5.1.7. 在响应消息中返回的执行状态 180 E.5.2. EXTERNAL AUTHENTICATION命令 181 E.5.2.1. 定义和范围 181 E.5.2.2. 命令消息 181 E.5.2.3. 引用控制参数P1——安全级别 181 E.5.2.4. 引用控制参数P2 182 E.5.2.5. 命令消息中要传送的数据段 182 E.5.2.6. 响应消息返回的数据段 182 E.5.2.7. 在响应消息中返回的执行状态 182 E.5.3. BEGIN R-MAC SESSION命令 182 E.5.3.1. 定义和范围 182 E.5.3.2. 命令消息 183 E.5.3.3. 引用控制参数P1 183 E.5.3.4. 引用控制参数P2 183 E.5.3.5. 命令消息中要传送的数据段 183 E.5.3.6. 响应消息返回的数据段 184 E.5.3.7. 在响应消息中返回的执行状态 184 E.5.4. END R-MAC SESSION命令 184 E.5.4.1. 定义和范围 184 E.5.4.2. 命令消息 184 E.5.4.3. 引用控制参数P1 185 E.5.4.4. 引用控制参数P2 185 E.5.4.5. 命令消息中要传送的数据段 185 E.5.4.6. 响应消息返回的数据段 185 E.5.4.7. 在响应消息中返回的执行状态 185 F. GP的数据及卡的识别数据 187 F.1. 数据值 187 F.2. 卡识别数据的结构 187 F.3. 安全域管理数据 188
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值