CN101266571A - Credible password module test case creation method and its test system - Google Patents
Credible password module test case creation method and its test system Download PDFInfo
- Publication number
- CN101266571A CN101266571A CNA2008101045964A CN200810104596A CN101266571A CN 101266571 A CN101266571 A CN 101266571A CN A2008101045964 A CNA2008101045964 A CN A2008101045964A CN 200810104596 A CN200810104596 A CN 200810104596A CN 101266571 A CN101266571 A CN 101266571A
- Authority
- CN
- China
- Prior art keywords
- subsystem
- state
- test
- test case
- trusted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 83
- 238000000034 method Methods 0.000 title claims abstract description 33
- 238000004458 analytical method Methods 0.000 claims abstract description 15
- 238000013515 script Methods 0.000 claims abstract description 14
- 238000004891 communication Methods 0.000 claims abstract description 5
- 230000006870 function Effects 0.000 claims description 15
- 238000013508 migration Methods 0.000 claims description 11
- 230000005012 migration Effects 0.000 claims description 11
- 230000007704 transition Effects 0.000 claims description 7
- 238000005192 partition Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000000605 extraction Methods 0.000 description 6
- 238000011161 development Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000005538 encapsulation Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 108020004705 Codon Proteins 0.000 description 1
- 238000012356 Product development Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000008092 positive effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Landscapes
- Storage Device Security (AREA)
Abstract
本发明公开了一种可信密码模块的测试用例生成方法及其测试系统,属于计算机技术领域。本发明的方法为:在可信密码模块划分的子系统内部进行建模,生成该子系统的扩展有限状态机,然后通过扩展有限状态机生成测试用例;本发明的测试系统包括:脚本解析引擎、结果分析引擎和通信模块。与现有技术相比,本发明的测试用例可以以自动化的方式生成,避免了手工测试用例无法保证测试完整性无法保证从而造成测试结果的可信度不高的问题,并且本发明给出的系统是一个自动化的测试系统,减少了一些人工的干预,节省了成本。
The invention discloses a method for generating a test case of a trusted cryptographic module and a test system thereof, belonging to the technical field of computers. The method of the present invention is: modeling inside the subsystem divided by trusted cryptographic modules, generating the extended finite state machine of the subsystem, and then generating test cases by extending the finite state machine; the test system of the present invention includes: a script analysis engine , results analysis engine and communication module. Compared with the prior art, the test case of the present invention can be generated in an automated manner, which avoids the problem that the manual test case cannot guarantee the integrity of the test and thus the reliability of the test result is not high, and the present invention provides The system is an automated test system, which reduces some manual intervention and saves costs.
Description
技术领域 technical field
本发明涉及一种嵌入式系统的测试方法及其系统,尤其涉及一种可信密码模块的测试用例生成方法及其测试系统,属于计算机技术领域。The invention relates to a testing method of an embedded system and a system thereof, in particular to a method for generating a test case of a trusted cryptographic module and a testing system thereof, belonging to the technical field of computers.
背景技术 Background technique
可信计算平台技术是一种通过硬件信任根解决安全问题的新技术,可信平台模块(简称TPM)是可信计算平台的核心和基础,是可信计算平台推广和应用的关键。可信计算平台的发展与应用是和相应的技术规范分不开的,为了促进可信计算平台的发展,2003年,可信计算组织(Trusted Computing Group,简称TCG)给出了可信平台模块(Trusted PlatformModuel,简称TPM)1.2规范,详细界定了TPM的功能。同时为了促进国内可信计算平台产业的发展,国家商用密码管理办公室发布了国产可信密码模块(Trsuted CryphographicModule,简称TCM)的相关标准,详细界定了国产TCM的功能。为可信计算平台在国内的发展奠定了基础。Trusted computing platform technology is a new technology to solve security problems through hardware root of trust. Trusted platform module (TPM) is the core and foundation of trusted computing platform, and is the key to the promotion and application of trusted computing platform. The development and application of the trusted computing platform are inseparable from the corresponding technical specifications. In order to promote the development of the trusted computing platform, in 2003, the Trusted Computing Group (TCG) gave the trusted platform module (Trusted PlatformModuel, TPM for short) 1.2 specification defines the functions of TPM in detail. At the same time, in order to promote the development of the domestic trusted computing platform industry, the National Commercial Cryptography Management Office released the relevant standards of the domestic trusted cryptographic module (Trusted Cryphographic Module, referred to as TCM), which defined the functions of the domestic TCM in detail. It laid the foundation for the development of the trusted computing platform in China.
在可信平台模块的形式化分析和建模方面,Matthew Barrett对TPM的一些关键安全机制进行了形式化分析,其建立的模型主要是用于安全性分析。同时Danilo Bruschi等人对TPM的授权协议进行了形式化的分析,并且通过模型检测技术分析该协议存在的攻击方法。In terms of formal analysis and modeling of trusted platform modules, Matthew Barrett formally analyzed some key security mechanisms of TPM, and the models he established are mainly used for security analysis. At the same time, Danilo Bruschi and others conducted a formal analysis of the TPM authorization protocol, and analyzed the attack methods of the protocol through model detection technology.
可信密码模块的测试方法和测试系统对可信密码模块的功能和符合性方面的要求进行全面而完整的测试,需要一种完善的方案支持测试的实施。Ahmad-Reza Sadeghi等人针对TPM给出了一个详细的测试方案并且给出了测试结果,对测试的结果进行了详细的分析。The test method and test system of the trusted cryptographic module conduct comprehensive and complete tests on the functions and compliance requirements of the trusted cryptographic module, and a complete solution is needed to support the implementation of the test. Ahmad-Reza Sadeghi et al. gave a detailed test plan and test results for TPM, and analyzed the test results in detail.
所有这些针对TPM或者TCM的分析和测试方法都没有给出一个完整的系统,并且没有给出一种如何从规范生成测试用例的方法。All these analysis and testing methods for TPM or TCM do not give a complete system, and do not give a way how to generate test cases from specifications.
发明内容 Contents of the invention
针对可信密码模块的测试需求,本发明提供了一种可信密码模块的测试用例生成方法及其测试系统,其通过利用扩展有限状态机对可信密码模块进行建模,然后通过扩展有限状态机生成测试用例,将测试用例输入到测试系统中对可信密码模块进行完整的测试,本发明提高了测试的准确性和覆盖率,本发明提出的方法与系统能解决如下的问题:Aiming at the test requirements of trusted cryptographic modules, the present invention provides a method for generating test cases of trusted cryptographic modules and a testing system thereof, which uses extended finite state machines to model trusted cryptographic modules, and then expands finite state The test case is generated by the computer, and the test case is input into the test system to carry out a complete test on the trusted cryptographic module. The present invention improves the accuracy and coverage of the test. The method and system proposed by the present invention can solve the following problems:
(1)可信密码模块的形式化建模(1) Formal modeling of trusted cryptographic modules
目前国家商用密码管理办公室给出的TCM规范是描述性的,容易造成歧义,不利于产品开发,因此给出一个准确的形式化模型是十分必要的,同时准确的形式化模型可以给TCM的功能验证、分析以及形式化测试提供基础。At present, the TCM specification given by the National Commercial Encryption Management Office is descriptive, which is easy to cause ambiguity and is not conducive to product development. Therefore, it is very necessary to provide an accurate formal model, and an accurate formal model can give TCM functions Verification, analysis, and formal testing provide the basis.
(2)一致性测试的测试用例的数量和质量问题(2) Quantity and quality of test cases for conformance testing
目前针对可信密码模块的测试用例都是手工来完成的,而手工测试最大的问题在于测试的完整性和覆盖度问题无法解决,从而造成测试结果的可信度不高。此外,测试用例的有效性将直接影响TCM的测试效率和测试成本,如何实现测试用例的自动生成成为亟需解决的问题。At present, the test cases for trusted cryptographic modules are all done manually, and the biggest problem of manual testing is that the integrity and coverage of the test cannot be solved, resulting in low credibility of the test results. In addition, the validity of test cases will directly affect the test efficiency and test cost of TCM. How to realize the automatic generation of test cases becomes an urgent problem to be solved.
(3)可信密码模块的测试缺少自动化测试方案的支持(3) The testing of trusted cryptographic modules lacks the support of automated testing schemes
由于TCM规范涉及的内容广泛,纯手工的的测试需要大量的人力和物力,迫切需要一种自动化的测试方案以支持测试的自动化,并提供相应的支撑系统。Because the TCM specification involves a wide range of content, purely manual testing requires a lot of manpower and material resources, and there is an urgent need for an automated testing solution to support the automation of testing and provide a corresponding support system.
测试用例的生成方法的步骤包括:The steps of the test case generation method include:
1、可信密码模块系统的划分1. Division of trusted cryptographic module systems
可信密码模块是一个完整的信息系统,其内部由多个有相互联系但并不十分紧密的系统构成,首先根据可信密码模块系统内的功能进行划分,建立划分后的各个子系统的依赖图。划分的粒度由具体情况而定;The trusted cryptographic module is a complete information system, which is composed of multiple interrelated but not very close systems. First, it is divided according to the functions of the trusted cryptographic module system, and the dependencies of each subsystem after division are established. picture. The granularity of division depends on the specific situation;
2、子系统的扩展有限状态机的生成2. Generation of extended finite state machines for subsystems
在第1步子系统划分的基础上,针对各个子系统进行系统内部的建模,建立各个命令之间的关系,生成子系统的扩展有限状态机;On the basis of the division of the subsystems in the first step, the internal modeling of the system is carried out for each subsystem, the relationship between each command is established, and the extended finite state machine of the subsystem is generated;
3、测试用例的生成3. Generation of test cases
根据生成的扩展有限状态机生成测试用例。Generate test cases based on the generated extended finite state machine.
较佳地,第2步中生成扩展有限状态机可以采用如下的步骤和方法Preferably, in step 2, the extended finite state machine can be generated using the following steps and methods
1)对子系统内部的状态进行划分,形成子系统内部的状态;1) Divide the internal state of the subsystem to form the internal state of the subsystem;
2)建立子系统内的命令之间的执行顺序依赖图,2) Establish the execution sequence dependency graph between the commands in the subsystem,
3)根据子系统内的状态,从初始状态出发,按照命令的执行先后顺序,在对应的状态上应用某个可执行命令,造成状态的迁移,从而提取出迁移路径;3) According to the state in the subsystem, starting from the initial state, according to the execution order of the commands, apply an executable command on the corresponding state to cause state migration, thereby extracting the migration path;
4)根据第1)、3)步生成的状态和迁移路径,即可形成扩展有限状态机。4) According to the states and migration paths generated in steps 1) and 3), an extended finite state machine can be formed.
较佳地,第1)步中的状态划分可以采用一种基于类型的状态划分方法,该状态提取方法如下描述:Preferably, the state division in step 1) can adopt a type-based state division method, and the state extraction method is described as follows:
设决定状态空间的状态变量为x1.xi.xn,A1..Aj..Al,其中xi表示的是单值变量,类型分别为T1,...,Tn,而Aj是一个集合变量,集合中的元素类型为TT1,...,TTl(类型决定了变量的取值空间,本发明不区分类型和取值空间)Let the state variables that determine the state space be x 1 .xi .x n , A 1 ..A j ..A l , where xi represents a single-valued variable whose types are T 1 ,...,T n , and A j is a set variable, and the element types in the set are TT 1 ,..., TT 1 (the type determines the value space of the variable, and the present invention does not distinguish type and value space)
(a)初始状态空间为 (a) The initial state space is
(b)状态的细分(b) Subdivision of states
下面根据状态变量的不同对状态进行细分:The following subdivides the state according to the state variables:
■单值变量■Single value variable
基于一定的策略对单值变量xi的取值进行划分,如边界值分析法,类别划分方法。通过这种方法可以将状态进一步的细分。基于策略policy,对状态S关于状态变量xi的划分定义为:Based on a certain strategy, the value of the single-valued variable x i is divided, such as boundary value analysis method and category division method. In this way, the state can be further subdivided. Based on the strategy policy, the division of the state S with respect to the state variable x i is defined as:
其中ASj表示状态S经过状态变量xi细分之后的子状态,Pj是对xi变量进行约束的谓词逻辑,如xi>=0;ASj1(xi)表示状态ASj1中状态变量xi的取值空间。Among them, AS j represents the sub-state of state S subdivided by state variable x i , and P j is the predicate logic that constrains variable x i , such as x i >=0; AS j1 (xi ) represents the state in state AS j1 The value space of variable x i .
■集合变量■Collection variable
对集合变量,采用基于类型的划分方法进行状态空间的划分,先定义集合划分的概念:For set variables, use the type-based partition method to divide the state space, first define the concept of set partition:
定义3.2设A是一个非空集合,如果存在一个A的子集族π,满足以下条件:Definition 3.2 Suppose A is a non-empty set, if there is a subset family π of A, satisfy the following conditions:
2)π中任意两个元素不相交;2) Any two elements in π are disjoint;
3)π中所有元素的并集等于A;3) The union of all elements in π is equal to A;
则称π为集合A的一个划分。Then π is called a partition of the set A.
■组合状态变量■ Combined state variables
如果内部存在的状态变量既包含单值变量x1,...xn,又包含集合变量A1,...,Al,那么最后的状态空间是各个变量之间的完全组合。得到的状态数为If the internal state variables include both single-valued variables x 1 , ... x n , and set variables A 1 , ..., A l , then the final state space is a complete combination of variables. The state number obtained is
(c)状态的缩减(c) Reduction of state
从上面的分析可以看出,如果状态变量的个数比较多,那么其存在的状态空间将会急剧增加,一种解决办法是在状态细分这一步中,控制各个状态变量的划分粒度;另一种解决办法是根据需求(如测试需求)对最后产生的状态空间进行限制,下面通过TCM状态的提取来说明基于类型的状态划分方法。From the above analysis, it can be seen that if the number of state variables is large, the existing state space will increase sharply. One solution is to control the division granularity of each state variable in the step of state subdivision; another One solution is to limit the final state space according to requirements (such as test requirements). The following describes the type-based state division method through the extraction of TCM states.
较佳地,第(b)步中可以采用如下的一种基于函数的集合划分方法。Preferably, the following function-based set division method can be used in step (b).
若存在由集合T到类型V的函数f:T→V,且类型V是有限集,ran(f)={v1,v2...vn}。则类型T的函数值划分If there is a function f from a set T to a type V: T→V, and the type V is a finite set, ran(f)={v 1 , v 2 ...v n }. Then the function value division of type T
因此函数f按照状态集合变量Aj可对状态S进行划分,得到划分后的结果为:Therefore, the function f can divide the state S according to the state set variable A j , and the divided result is:
其中BS1(Aj)表示状态BS1中集合变量Aj的取值空间中类型为TTj的元素集合。各个划分之间互相组合得到最后的状态空间。划分之间进行状态组合得到状态空间的个数为:Where BS 1 (A j ) represents the set of elements of type TT j in the value space of the set variable A j in state BS 1 . Each partition is combined with each other to obtain the final state space. The number of state spaces obtained by combining states between partitions is:
较佳地,第3步中生成测试用例时可以按照状态或者迁移标准为依据生成测试用例。Preferably, when generating test cases in step 3, test cases can be generated according to status or migration criteria.
测试系统主要包括:The test system mainly includes:
1、脚本解析引擎:分析描述测试用例的脚本,并对其进行解析,调用可信密码模块的命令执行脚本;1. Script analysis engine: analyze and analyze the script describing the test case, and execute the script by calling the command of the trusted cryptographic module;
2、结果分析引擎:对测试生成的结果进行分析,产生合适的统计数据和统计报表,并生成综合报告文档;2. Result analysis engine: analyze the results generated by the test, generate appropriate statistical data and statistical reports, and generate comprehensive report documents;
3、通信模块:与可信密码模块和数据库进行通信。3. Communication module: communicate with trusted cryptographic modules and databases.
较佳地,脚本解析引擎所能识别的测试脚本语言采用一种过程语言,具体的脚本语言可自行设计实现。Preferably, the test script language recognized by the script analysis engine adopts a procedural language, and the specific script language can be designed and implemented by itself.
较佳地,可信密码模块与测试系统可以分布在不同的网络上,由通信模块完成数据的交互与采集。Preferably, the trusted cryptographic module and the test system can be distributed on different networks, and the communication module completes data interaction and collection.
将生成的测试用例输入到测试系统中(以脚本的形式),由脚本解析引擎解释执行测试用例就可以实现对测试用例进行测试。The generated test cases are input into the test system (in the form of scripts), and the test cases can be tested by the script analysis engine to interpret and execute the test cases.
本发明的积极效果:Positive effect of the present invention:
采用本发明之后,测试用例可以以自动化的方式生成,避免了手工测试用例无法保证测试完整性无法保证从而造成测试结果的可信度不高的问题。并且本发明给出的系统是一个自动化的测试系统,减少了一些人工的干预,节省了成本。After adopting the invention, the test case can be generated in an automatic manner, avoiding the problem that the manual test case cannot guarantee the integrity of the test and thus the reliability of the test result is not high. Moreover, the system provided by the present invention is an automatic test system, which reduces some manual interventions and saves costs.
附图说明 Description of drawings
图1为可信密码模块测试用例生成方法;Fig. 1 is a trusted cryptographic module test case generation method;
图2为系统抽象状态和初始化定义;Figure 2 is the system abstract state and initialization definition;
图3为密钥生成,载入,载出操作模式;Figure 3 is the operation mode of key generation, loading, and loading;
图4为封装和解封操作模式;Figure 4 is the encapsulation and decapsulation operation mode;
图5为状态迁移的提取算法;Fig. 5 is the extraction algorithm of state transition;
图6为密码子系统的EFSM图;Figure 6 is an EFSM diagram of the codon system;
图7为可信密码模块测试系统结构图;Fig. 7 is a structural diagram of a trusted cryptographic module testing system;
图8为TCM各个子系统依赖关系图;FIG. 8 is a dependency diagram of each subsystem of the TCM;
图9为密码子系统内的命令依赖关系。Figure 9 shows the command dependencies within the cryptosystem.
具体实施方式 Detailed ways
下面结合附图详细描述本发明的具体实施方式。Specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.
首先对可信密码模块的子系统进行划分,根据各个子系统实现的功能进行严格划分,这样各个划分后的子系统依赖程度低;这里可信密码模块可以分为如下各个子系统:密码子系统,TCM管理子系统,平台身份表识管理子系统,存储保护子系统,标识和鉴别子系统,完整性保护子系统,可信路径子系统。First, divide the subsystems of the trusted cryptographic module, and strictly divide them according to the functions realized by each subsystem, so that the dependence of each partitioned subsystem is low; here, the trusted cryptographic module can be divided into the following subsystems: cryptographic subsystem , TCM management subsystem, platform identity management subsystem, storage protection subsystem, identification and authentication subsystem, integrity protection subsystem, trusted path subsystem.
各个子系统之间的依赖关系如图8所示,其中箭头指向表示依赖关系,如密码子系统指向完整性保护子系统,表示密码子系统依赖完整性保护子系统。The dependency relationship between various subsystems is shown in Figure 8, where the arrow points to indicate the dependency relationship, for example, the cryptographic subsystem points to the integrity protection subsystem, indicating that the cryptographic subsystem depends on the integrity protection subsystem.
其次分别对各个子系统进行EFSM建模,下面以可信密码模块的密码子系统为例说明测试用例的生成方法,以TCM的密码子系统作为建模的对象。Secondly, EFSM modeling is carried out for each subsystem respectively. The cryptographic subsystem of the trusted cryptographic module is used as an example to illustrate the method of generating test cases, and the cryptographic subsystem of TCM is used as the object of modeling.
在具体建模过程中,由于TCM规范中指定的具体数据结构比较复杂,需要进行一定程度的数据抽象。从状态上看,TCM的初始状态是已经建立了属主身份(Take Owner),并且TCM中将会保存有密钥的相关信息,最重要的是密钥的句柄以及密钥的属性(如类型),引入如下的抽象数据类型和全局变量。In the specific modeling process, due to the complex specific data structure specified in the TCM specification, a certain degree of data abstraction is required. From the status point of view, the initial state of the TCM is that the owner identity (Take Owner) has been established, and the relevant information of the key will be stored in the TCM, the most important is the handle of the key and the attributes of the key (such as type ), introduce the following abstract data types and global variables.
[KeyHandle,KeyType][KeyHandle, KeyType]
maxcount:N;maxcount: N;
KeyType:=TCM_STORAGE|TCM_SIGN|TCM_BIND;KeyType: =TCM_STORAGE|TCM_SIGN|TCM_BIND;
其中KeyHandle是TCM内部密钥的句柄类型;KeyType是密钥的类型,有三种不同的密钥类型。Among them, KeyHandle is the handle type of the TCM internal key; KeyType is the type of the key, and there are three different key types.
从操作上看,主要有创建密钥,销毁密钥,使用密钥等操作。密码子系统抽象状态以及系统初始化定义的描述如图2所示,其中函数keyHasType将密钥句柄映射成不同的密钥类型,初始时TCM内部有存储根密钥SRK。密钥生成,载入,载出操作模式如图3所示。From the operation point of view, there are mainly operations such as creating keys, destroying keys, and using keys. The description of the abstract state of the cryptographic subsystem and the definition of system initialization is shown in Figure 2, where the function keyHasType maps key handles to different key types. Initially, there is a storage root key SRK inside the TCM. Key generation, loading, and loading out operation modes are shown in Figure 3.
图4给出了TCM的封装操作以及解封操作的操作模式,其他关于TCM密钥的操作如解密,签名操作可用类似的形式给出。Figure 4 shows the TCM encapsulation operation and the operation mode of the decapsulation operation. Other operations related to the TCM key such as decryption and signature operations can be given in a similar form.
下面通过状态划分和迁移提取给出对应的扩展有限状态机(EFSM)图。密码子系统内的状态根据Z规格说明的抽象状态进行划分。The corresponding extended finite state machine (EFSM) diagram is given below through state division and transition extraction. The states within the cryptosystem are partitioned according to the abstract states described by the Z-spec.
1、密码子系统内状态的划分1. The division of states in the cryptosystem
在图2,图3给出的Z语言规格说明中,只有一个集合变量keys,并且存在一个约束函数keyHasType。In the Z language specification shown in Figure 2 and Figure 3, there is only one set variable keys, and there is a constraint function keyHasType.
(1)第一步:给出初始状态(1) The first step: give the initial state
(2)第二步:状态的细分(集合变量)(2) The second step: subdivision of state (collection variables)
Partition(SInitial,keys,keyHasType)={SSign,SStorage,SBind}Partition(S Initial , keys, keyHasType) = {S Sign , S Storage , S Bind }
其中Ssign内的所有元素密钥句柄都为签名密钥,其他的定义类似。All element key handles in S sign are signature keys, and other definitions are similar.
(3)第三步:状态的组合(3) The third step: Combination of states
状态组合数
因此最后给出的状态为:So the final state given is:
s1={SSign},s2={SStorage},s3={SBind},s4={SSign,SStorage},s5={SStorage,SBind},s 1 ={S Sign }, s 2 ={S Storage }, s 3 ={S Bind }, s 4 ={S Sign ,S Storage }, s 5 ={S Storage ,S Bind },
s6={SBind,SSign},s7={SBind,SSign,SStorage}s 6 ={S Bind , S Sign }, s 7 ={S Bind , S Sign , S Storage }
(4)第四步:状态的缩减(4) The fourth step: state reduction
如果加上约束条件
2、建立密码子系统内的命令依赖关系2. Establish command dependencies within the cryptosystem
命令依赖关系如图9所示,其中箭头指向标识依赖关系,如TCMSeal指向TCMlocalkey表示TCMSeal依赖TCMlocalkey。The command dependencies are shown in Figure 9, where the arrows point to identify the dependencies, for example, TCMSeal points to TCMlocalkey, indicating that TCMSeal depends on TCMlocalkey.
3、迁移的提取3. Migration extraction
图5给出了状态迁移的提取算法。Fig. 5 shows the extraction algorithm of state transition.
其中def(s)={key|key∈s},S为内部状态的集合,OP表示TCM操作的集合,在密码子系统中,where def(s)={key|key∈s}, S is the set of internal states, OP represents the set of TCM operations, in the cryptographic subsystem,
OP={TCMCreateKey,TCMLoadKey,TCMEvictKey,TCMSeal,OP={TCMCreateKey, TCMLoadKey, TCMEvictKey, TCMSeal,
TCMUnSeal,TCMSign,TCMVerify,TCMEncrypt,TCMDecrypt}TCMUnSeal, TCMSign, TCMVerify, TCMEncrypt, TCMDecrypt}
4、最后得到的EFSM图如图6所示:4. The final EFSM diagram is shown in Figure 6:
具体的状态含义以及状态迁移见表1,表2所示,表1,表2中只给出了其中的一条路径的迁移,其他路径的迁移是类似的。在迁移的标记(s-x,P/op,y->s′)中,s表示当前状态,x′表示迁移后的状态,x表示输入,P表示转移的条件,op表示转移中的操作,y表示输出。其中涉及到的符号有,输入变量集合:xtag,xordinal,xKeyHandle,xkeyType;输出变量集合:ytag,yretValue,yordinal,ykeyHandle,ykeyType。输入命令有:TCM_CWK(产生密钥),TCM_EK,TCM_LK,TCM_UB,TCM_Seal,TCM_UnSeal,TCM_Sign,符号ytag(value)表示对变量ytag赋值value。环境变量和全局变量集合:keys(TCM中的句柄集合)等。See Table 1 and Table 2 for specific state meanings and state transitions. Tables 1 and 2 only show the migration of one of the paths, and the migration of other paths is similar. In the migration mark (sx, P/op, y->s'), s represents the current state, x' represents the state after migration, x represents the input, P represents the condition of the transfer, op represents the operation in the transfer, y Indicates the output. The symbols involved are: input variable set: x tag , x ordinal , x KeyHandle , x keyType ; output variable set: y tag , y retValue , y ordinal , y keyHandle , y keyType . The input commands include: TCM_CWK (generating a key), TCM_EK, TCM_LK, TCM_UB, TCM_Seal, TCM_UnSeal, TCM_Sign, and the symbol y tag (value) means assigning a value to the variable y tag . Environment variable and global variable collection: keys (handle collection in TCM), etc.
表1EFSM状态描述Table 1 EFSM status description
表2状态转换表Table 2 State Transition Table
最后通过EFSM图生成对应的测试用例,测试用例的生成遵循C.Bourhfir提出的生成方法[参考:Automatic executable test case generation for EFSM specified protocols,C.Bourhfir,R.Dssouli,E.Aboulhamid,and N.Rico,IWTCS’97,pp.75-90,1997]。Finally, the corresponding test case is generated through the EFSM diagram, and the generation of the test case follows the generation method proposed by C.Bourhfir [Reference: Automatic executable test case generation for EFSM specified protocols, C.Bourhfir, R.Dssouli, E.Aboulhamid, and N. Rico, IWTCS '97, pp.75-90, 1997].
测试系统的软件实现结构如图7所示,系统通过TDDL模块与可信密码模块进行交互,其中测试系统、数据库、以及可信密码模块可以分布于不同的网络,通过网络通信协议进行通信。The software implementation structure of the test system is shown in Figure 7. The system interacts with the trusted cryptographic module through the TDDL module. The test system, database, and trusted cryptographic module can be distributed in different networks and communicate through network communication protocols.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810104596A CN100583057C (en) | 2008-04-22 | 2008-04-22 | Credible password module test case creation method and its test system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810104596A CN100583057C (en) | 2008-04-22 | 2008-04-22 | Credible password module test case creation method and its test system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101266571A true CN101266571A (en) | 2008-09-17 |
CN100583057C CN100583057C (en) | 2010-01-20 |
Family
ID=39988997
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200810104596A Active CN100583057C (en) | 2008-04-22 | 2008-04-22 | Credible password module test case creation method and its test system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100583057C (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833606A (en) * | 2010-03-30 | 2010-09-15 | 连志斌 | A kind of design and verification method for integrated circuit |
CN101915894A (en) * | 2010-07-22 | 2010-12-15 | 北京交通大学 | Method for testing real-time finite state machines in digital logic devices |
CN102195773A (en) * | 2010-03-03 | 2011-09-21 | 中国人民解放军信息工程大学 | Method and system for analyzing block cipher algorithm |
CN102368226A (en) * | 2011-10-10 | 2012-03-07 | 南京大学 | Method for automatically generating test cases based on analysis on feasible paths of EFSM (extended finite state machine) |
CN102385551A (en) * | 2010-08-31 | 2012-03-21 | 西门子公司 | Method, device and system for screening test cases |
CN102404167A (en) * | 2011-11-03 | 2012-04-04 | 清华大学 | Protocol test generation method of parallel extended finite state machine based on variable dependence |
CN103095462A (en) * | 2013-01-24 | 2013-05-08 | 中国科学院软件研究所 | Data broadcasting distribution protection method based on proxy re-encryption and security chips |
CN105022937A (en) * | 2014-04-28 | 2015-11-04 | 恩智浦有限公司 | Interface compatible approach for gluing white-box implementation to surrounding program |
CN105184115A (en) * | 2014-04-28 | 2015-12-23 | 恩智浦有限公司 | Method For Including An Implicit Integrity Or Authenticity Check Into A White-box Implementation |
US10412054B2 (en) | 2014-06-24 | 2019-09-10 | Nxp B.V. | Method for introducing dependence of white-box implementation on a set of strings |
CN111061625A (en) * | 2019-11-18 | 2020-04-24 | 中国建设银行股份有限公司 | Automatic testing method and device applied to out-of-order password keyboard |
CN113158178A (en) * | 2021-04-06 | 2021-07-23 | 支付宝(杭州)信息技术有限公司 | Trusted execution environment construction method, device and equipment |
CN113204486A (en) * | 2021-05-20 | 2021-08-03 | 山东英信计算机技术有限公司 | TCM module function stability testing method, device and system |
CN113535594A (en) * | 2021-09-17 | 2021-10-22 | 广州裕睿信息科技有限公司 | Method, device, equipment and storage medium for generating service scene test case |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1752945A (en) * | 2005-11-02 | 2006-03-29 | 中国科学院软件研究所 | Method for Generating Test Cases of Security Database Management System |
CN2914500Y (en) * | 2006-02-24 | 2007-06-20 | 上海方正信息安全技术有限公司 | Portable and reliable platform module |
CN100451986C (en) * | 2006-12-29 | 2009-01-14 | 深圳市明微电子有限公司 | Automatic verification method of network chip |
-
2008
- 2008-04-22 CN CN200810104596A patent/CN100583057C/en active Active
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102195773A (en) * | 2010-03-03 | 2011-09-21 | 中国人民解放军信息工程大学 | Method and system for analyzing block cipher algorithm |
CN101833606A (en) * | 2010-03-30 | 2010-09-15 | 连志斌 | A kind of design and verification method for integrated circuit |
CN101915894A (en) * | 2010-07-22 | 2010-12-15 | 北京交通大学 | Method for testing real-time finite state machines in digital logic devices |
CN101915894B (en) * | 2010-07-22 | 2012-05-30 | 北京交大资产经营有限公司 | Method for testing real-time finite state machines in digital logic devices |
CN102385551A (en) * | 2010-08-31 | 2012-03-21 | 西门子公司 | Method, device and system for screening test cases |
CN102368226A (en) * | 2011-10-10 | 2012-03-07 | 南京大学 | Method for automatically generating test cases based on analysis on feasible paths of EFSM (extended finite state machine) |
CN102368226B (en) * | 2011-10-10 | 2014-02-26 | 南京大学 | An Automatic Test Case Generation Method Based on Feasible Path Analysis of Extended Finite State Machine |
CN102404167A (en) * | 2011-11-03 | 2012-04-04 | 清华大学 | Protocol test generation method of parallel extended finite state machine based on variable dependence |
CN103095462A (en) * | 2013-01-24 | 2013-05-08 | 中国科学院软件研究所 | Data broadcasting distribution protection method based on proxy re-encryption and security chips |
CN103095462B (en) * | 2013-01-24 | 2015-10-28 | 中国科学院软件研究所 | Based on the data broadcast distribution guard method acting on behalf of re-encryption and safety chip |
CN105022937A (en) * | 2014-04-28 | 2015-11-04 | 恩智浦有限公司 | Interface compatible approach for gluing white-box implementation to surrounding program |
CN105184115A (en) * | 2014-04-28 | 2015-12-23 | 恩智浦有限公司 | Method For Including An Implicit Integrity Or Authenticity Check Into A White-box Implementation |
CN105022937B (en) * | 2014-04-28 | 2018-08-17 | 恩智浦有限公司 | For white box to be realized to the interface compatibility method for being tightly attached to program around |
CN105184115B (en) * | 2014-04-28 | 2018-12-11 | 恩智浦有限公司 | For including to the method in white box realization by implicit integrality or credibility check |
US10412054B2 (en) | 2014-06-24 | 2019-09-10 | Nxp B.V. | Method for introducing dependence of white-box implementation on a set of strings |
CN111061625A (en) * | 2019-11-18 | 2020-04-24 | 中国建设银行股份有限公司 | Automatic testing method and device applied to out-of-order password keyboard |
CN113158178A (en) * | 2021-04-06 | 2021-07-23 | 支付宝(杭州)信息技术有限公司 | Trusted execution environment construction method, device and equipment |
WO2022213968A1 (en) * | 2021-04-06 | 2022-10-13 | 支付宝(杭州)信息技术有限公司 | Method, apparatus and device for constructing trusted execution environment |
CN113204486A (en) * | 2021-05-20 | 2021-08-03 | 山东英信计算机技术有限公司 | TCM module function stability testing method, device and system |
CN113535594A (en) * | 2021-09-17 | 2021-10-22 | 广州裕睿信息科技有限公司 | Method, device, equipment and storage medium for generating service scene test case |
Also Published As
Publication number | Publication date |
---|---|
CN100583057C (en) | 2010-01-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100583057C (en) | Credible password module test case creation method and its test system | |
Barthe et al. | maskverif: Automated verification of higher-order masking in presence of physical defaults | |
Zhang et al. | vRAM: Faster verifiable RAM with program-independent preprocessing | |
Dal Lago et al. | Linear dependent types and relative completeness | |
CN104391934B (en) | Data verification method and device | |
Ruohonen et al. | A large-scale security-oriented static analysis of python packages in pypi | |
Delaune et al. | Formal analysis of protocols based on TPM state registers | |
CN109150833A (en) | A kind of Secure Protocol Formal Verification Method based on model inspection | |
Barthe et al. | Beyond provable security verifiable IND-CCA security of OAEP | |
CN107111713A (en) | The automatic checking of software systems | |
Backes et al. | CoSP: A general framework for computational soundness proofs | |
CN112070608A (en) | Information processing method, information processing apparatus, information processing medium, and electronic device | |
Hess et al. | Formalizing and proving a typing result for security protocols in Isabelle/HOL | |
Meier et al. | Efficient construction of machine-checked symbolic protocol security proofs | |
CN114238956A (en) | Hardware Trojan horse search detection method based on automatic attribute extraction and formal verification | |
CN104133948B (en) | A kind of simulation model generation method, system and simulation model | |
Sowka et al. | A review on automatic generation of attack trees and its application to automotive cybersecurity | |
CN104598381A (en) | Positioning method for failure test instance in metamorphic testing | |
CN108647533A (en) | Security assertions automatic generation method for detecting hardware Trojan horse | |
Backes et al. | Computational soundness results for ProVerif: bridging the gap from trace properties to uniformity | |
CN114328525A (en) | Data processing method and device | |
Ziauddin et al. | Formal analysis of ISO/IEC 9798-2 authentication standard using AVISPA | |
Jayasena et al. | HIVE: Scalable hardware-firmware co-verification using scenario-based decomposition and automated hint extraction | |
Küsters et al. | Computational soundness for key exchange protocols with symmetric encryption | |
CN109740214B (en) | Method and device for constructing flip counting model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
ASS | Succession or assignment of patent right |
Owner name: SINO ZHENGYANG INFORMATION SECURITY TECHNOLOGY CO. Free format text: FORMER OWNER: CAS SOFTWARE INSTITUTE Effective date: 20100108 |
|
C41 | Transfer of patent application or patent right or utility model | ||
TR01 | Transfer of patent right |
Effective date of registration: 20100108 Address after: Beijing City, Haidian District Zhongguancun street, No. 19 gate tower B 16 layer Patentee after: Zhongke Zhengyang Information Security Technology Co., Ltd. Address before: No. four, 4 South Street, Haidian District, Beijing, Zhongguancun Patentee before: Institute of Software, Chinese Academy of Sciences |
|
C56 | Change in the name or address of the patentee |
Owner name: NERCIS Free format text: FORMER NAME: ZHONGKE ZHENGYANG INFORMATION SECURITY TECHNOLOGY CO., LTD. |
|
CP01 | Change in the name or title of a patent holder |
Address after: 100080 Beijing City, Haidian District Zhongguancun street, No. 19 gate tower B 16 layer Patentee after: Zhongke Information Security Common Technology National Engineering Research Center Co., Ltd. Address before: 100080 Beijing City, Haidian District Zhongguancun street, No. 19 gate tower B 16 layer Patentee before: Zhongke Zhengyang Information Security Technology Co., Ltd. |