CN103294569B - cos version of the smart card and verification device verification method - Google Patents

cos version of the smart card and verification device verification method Download PDF

Info

Publication number
CN103294569B
CN103294569B CN201310152996.3A CN201310152996A CN103294569B CN 103294569 B CN103294569 B CN 103294569B CN 201310152996 A CN201310152996 A CN 201310152996A CN 103294569 B CN103294569 B CN 103294569B
Authority
CN
China
Prior art keywords
smart card
cos
data
version
check
Prior art date
Application number
CN201310152996.3A
Other languages
Chinese (zh)
Other versions
CN103294569A (en
Inventor
郑嵩
刘丁
Original Assignee
深圳市雄帝科技股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 深圳市雄帝科技股份有限公司 filed Critical 深圳市雄帝科技股份有限公司
Priority to CN201310152996.3A priority Critical patent/CN103294569B/en
Publication of CN103294569A publication Critical patent/CN103294569A/en
Application granted granted Critical
Publication of CN103294569B publication Critical patent/CN103294569B/en

Links

Abstract

本发明提供种智能卡的COS版本校验方法及校验装置,该智能卡的COS版本校验方法包括步骤:将智能卡的COS数据划分为至少两个数据块;使用智能卡内置的校验算法以及预设初始值确定每个数据块的校验码;以及根据数据块的校验码以及智能卡的COS数据的校验码,对智能卡的COS版本进行校验。 COS version checksum verification method and apparatus of the present invention provides a smart card types, COS version of the smart card verification method comprising the steps of: a smart card COS data into at least two data blocks; built-in smart card and the preset check algorithm the initial value determining checksum for each data block; COS and check code data in accordance with the checksum data block, and the smart card, the smart card version of COS be verified. 本发明还提供种智能卡的COS版本校验装置。 The present invention also provides a calibration apparatus species COS version smart card. 本发明的智能卡的COS版本校验方法及校验装置通过将智能卡的COS数据划分为多个数据块,通过对多个数据块的校验码以及COS数据的校验码的比较,实现对智能卡的COS版本进行有效的校验。 COS version checksum verification method and apparatus of the present invention, a smart card COS data by the smart card into a plurality of data blocks through a plurality of data blocks and comparing the checksum COS data check code to achieve the smart card the COS version valid checksum.

Description

智能卡的cos版本校验方法及校验装置 cos version of the smart card and verification device verification method

技术领域 FIELD

[0001] 本发明涉及版本校验领域,更具体地说,涉及一种智能卡的cos版本校验方法及校验装置。 [0001] The present invention relates to check the version, and more particularly, to a smart card and a cos version of the calibration device calibrating method.

背景技术 Background technique

[0002] 随着科技的发展,越来越多的人使用智能卡进行小额支付,如公交卡,购物卡等。 [0002] With the development of science and technology, more and more people are using smart cards for small payments, such as public transport cards, shopping cards. 智能卡,又叫CPU卡,智能卡中集成有中央处理器、可编程只读存储器、随机存储器以及固化在只读存储器中的COS (Chip Operating System,卡内操作系统或智能卡系统)。 Smart cards, also known as CPU cards, smart cards integrated in a central processor, a programmable read-only memory, random access memory and a curing COS (Chip Operating System, the card operating system or smart card system) in a read only memory. 该C0S具有以下功能:传输管理、文件管理、安全体系以及命令解释等。 The C0S has the following functions: transmission management, file management, security systems and command interpretation.

[0003] 智能卡中的数据分为外部读取部分以及内部处理部分,为了确保智能卡中的数据安全可靠,智能卡的cos数据被设置为内部处理部分的数据,正常情况下外部是无法读取到这部分的数据的。 Data [0003] the smart card into the external reading section and an inner processing section, to ensure that the data in the smart card secure, COS data smart card is provided for processing data portion is an internal, normally outside can not read this data portion.

[0004] 为了保证智能卡⑶S版本的一致性,智能卡会提供cos版本的校验功能(一般采用CRC码(循环冗余校验码,Cyclic Redundancy Check)进行校验),但是该校验算法也是无法读取到的,这样导致如有人通过同时篡改COS数据以及COS版本的校验算法,使得最终生成的C0S版本的CRC码和未篡改时的CRC码相同,这样用户就无法发现智能卡的C0S数据已经被人篡改。 [0004] In order to ensure consistency smart card ⑶S version of the smart card will provide cos version checking function (generally use the CRC code (cyclic redundancy check code, Cyclic Redundancy Check) checksum), but the check algorithm is not the read, so that if a person by simultaneously leading to data falsification and COS COS version check algorithm, such that the final version C0S generated CRC code and the CRC code when not tampered with the same, the user can not find the smart card has data C0S It is tampered with.

[0005] 故,有必要提供一种智能卡的C0S版本校验方法及校验装置,以解决现有技术所存在的问题。 [0005] Therefore, there is need to provide a smart card C0S version checksum verification method and apparatus to solve the problems of the prior art.

发明内容 SUMMARY

[0006] 本发明实施例的目的在于提供一种智能卡的cos版本校验方法,以解决现有的智能卡的C0S版本校验方法不能对智能卡的C0S数据进行有效校验的技术问题。 [0006] The object of embodiments of the present invention to provide a smart card cos version check method, C0S version check method to solve the existing smart card data can not C0S of smart card technology in question valid checksum.

[0007] 本发明实施例的目的在于提供一种智能卡的cos版本校验装置,以解决现有的智能卡的C0S版本校验装置不能对智能卡的C0S数据进行有效校验的技术问题。 Objective [0007] The embodiments of the present invention is to provide a cos version of the smart card verification means, in order to solve the technical problem C0S version checking apparatus of a conventional smart card data can not C0S effective smart card verification.

[0008] 为解决上述问题,本发明提供的技术方案如下: [0008] In order to solve the above problems, the present invention provides the following technical solution:

[0009] 提供一种智能卡的cos版本校验方法,其包括步骤: [0009] The smart card provides a cos version check method, comprising the steps of:

[0010] 将智能卡的C0S数据划分为至少两个数据块; [0010] The smart card C0S data into at least two data blocks;

[0011] 使用所述智能卡内置的校验算法以及预设初始值确定每个所述数据块的校验码; 以及 [0011] using the built-in smart card and the preset check algorithm determines an initial value of each of said data block check code; and

[0012] 根据所述数据块的校验码以及所述智能卡的cos数据的校验码,对所述智能卡的cos版本进行校验。 [0012] The checksum data cos checksum of the data block and the smart card, cos version of the smart card for verification.

[0013] 在本发明所述的智能卡的cos版本校验方法中,所述使用所述智能卡内置的校验算法以及预设初始值确定每个所述数据块的校验码的步骤包括: [0013] In the smart card cos version check method according to the present invention, the use of the built-in smart card and the preset check algorithm determines the initial value of the checksum for each data block comprises:

[0014] 使用所述智能卡内置的校验算法以及预设初始值确定第一个数据块的校验码;以及 [0014] using the built-in smart card and the preset check algorithm first determines an initial value of a data block check code; and

[0015] 使用所述智能卡内置的校验算法以及所述数据块的校验码确定下一个数据块的校验码,直至确定最后一个数据块的校验码; [0015] using the built-in smart card and a check code checking algorithm for the data block check code is determined next data block check code is determined until the last data block;

[0016] 所述根据所述数据块的校验码以及所述智能卡的cos数据的校验码,对所述智能卡的cos版本进行校验的步骤具体为: [0016] The parity check code according to the code of the data block and the smart card cos data, a step of cos version of the smart card verifies specifically:

[0017] 根据所述最后一个数据块的校验码以及所述智能卡的⑶S数据的校验码,对所述智能卡的cos版本进行校验。 [0017] The data checksum ⑶S a checksum of the last data block and the smart card, cos version of the smart card for verification.

[0018] 在本发明所述的智能卡的cos版本校验方法中,使用所述智能卡内置的校验算法以及所述预设初始值确定所述智能卡的cos数据的校验码。 [0018] In the smart card cos version check method according to the present invention, the built-in smart card and the preset check algorithm check code initial value determining the smart card cos data.

[0019] 在本发明所述的智能卡的cos版本校验方法中,所述根据所述最后一个数据块的校验码以及所述智能卡的cos数据的校验码,对所述智能卡的cos版本进行校验的步骤具体为: [0019] In the smart card cos version check method according to the present invention, according to the check code data cos a check code of the last data block and the smart card, cos version of the smart card verification step is specifically:

[0020] 如所述最后一个数据块的校验码与所述智能卡的cos数据的校验码相同,则确定所述智能卡的cos版本正常; [0020] The same check code of the last data block check code with the smart card cos data, it is determined that the smart card cos normal version;

[0021] 如所述最后一个数据块的校验码与所述智能卡的⑶s数据的校验码不同,则确定所述智能卡的cos版本异常。 [0021] As a last checksum ⑶s different data checksum data block with the smart card, the smart card is determined cos abnormal version.

[0022] 在本发明所述的智能卡的C0S版本校验方法中,所述将智能卡的C0S数据划分为至少两个数据块的步骤具体为: [0022] In C0S version check method of a smart card according to the present invention, the smart card will C0S data into at least two data blocks in step is specifically:

[0023] 根据所述智能卡中的应用,将智能卡的C0S数据划分为至少两个数据块。 [0023] The application of the smart card, the smart card C0S data into at least two data blocks.

[0024] 还提供一种智能卡的C0S版本校验装置,其包括: [0024] Also provided is a smart card C0S version checking device, comprising:

[0025] 划分模块,用于将智能卡的C0S数据划分为至少两个数据块; [0025] dividing module, configured to C0S smart card data into at least two data blocks;

[0026] 数据块校验码确定模块,用于使用所述智能卡内置的校验算法以及预设初始值确定每个所述数据块的校验码;以及 [0026] The block check code determination module configured to use the built-in smart card check algorithm and a preset initial value determining the checksum for each of said data block; and

[0027] 系统数据校验模块,用于根据所述数据块的校验码以及所述智能卡的C0S数据的校验码,对所述智能卡的cos版本进行校验。 [0027] System data check module configured to check code C0S data checksum of the data block and the smart card, cos version of the smart card for verification.

[0028] 在本发明所述的智能卡的C0S版本校验装置中,所述数据块校验码确定模块包括: [0028] In C0S version smart card verification apparatus according to the present invention, the data block check code determination module comprises:

[0029] 第一数据块校验码确定单元,用于使用所述智能卡内置的校验算法以及预设初始值确定第一个数据块的校验码;以及 [0029] The first data block check code determining means, for using a smart card to the built-in check algorithm and a preset initial value determining a first checksum data block; and

[0030] 第二数据块校验码确定单元,用于使用所述智能卡内置的校验算法以及所述数据块的校验码确定下一个数据块的校验码,直至确定最后一个数据块的校验码; [0030] The second determination unit data block check code, using the built-in smart card and a check code checking algorithm for the data block check code is determined next data block until the last data block is determined check code;

[0031] 所述系统数据校验模块包括: [0031] The system data check module comprises:

[0032] 校验单元,用于根据所述最后一个数据块的校验码以及所述智能卡的⑶S数据的校验码,对所述智能卡的cos版本进行校验。 [0032] checking unit, according to the data check code ⑶S checksum of the last data block and the smart card, cos version of the smart card for verification.

[0033] 在本发明所述的智能卡系统版本校验装置中,所述系统数据校验模块使用所述智能卡内置的校验算法以及所述预设初始值确定所述智能卡的cos数据的校验码。 [0033] In the version of the smart card system calibration device according to the present invention, the data check module system using the built-in smart card and the predetermined algorithm determining the check data of the smart card cos initial values ​​of the check code.

[0034]在本发明所述的智能卡系统版本校验装置中,所述校验单元具体用于: [0034] In the version of the smart card system calibration apparatus according to the present invention, the check unit is configured to:

[0035] 如所述最后一个数据块的校验码与所述智能卡的C0S数据的校验码相同,则确定所述智能卡的cos版本正常; [0035] The same check code of the last data block check code with the smart card C0S data, it is determined that the smart card cos normal version;

[0036] 如所述最后一个数据块的校验码与所述智能卡的C0S数据的校验码不同,则确定所述智能卡的cos版本异常。 [0036] As a last checksum C0S different data checksum data block with the smart card, the smart card is determined cos abnormal version.

[0037]在本发明所述的智能卡系统版本校验装置中,所述划分模块具体用于: [0037] In the version of the smart card system calibration apparatus according to the present invention, the dividing module is configured to:

[0038]根据所述智能卡中的应用,将智能卡的cos数据划分为至少两个数据块。 [0038] The application of the smart card, the smart card cos data into at least two data blocks.

[0039]相较于现有技术的智能卡的cos版本校验方法及校验装置,本发明的智能卡的cos 版本校验方法及校验装置通过将智能卡的cos数据划分为多个数据块,通过对多个数据块的校验码以及COS数据的校验码的比较,实现对智能卡的COS版本进行有效的校验。 [0039] cos version checksum verification method and apparatus over the prior art smart cards, cos version checksum verification method and apparatus of the present invention, the smart card by the smart card cos data into a plurality of data blocks, by comparison of the checksum and check code data of the plurality of data blocks of COS, COS achieve versions of smart card valid checksum. 解决了现有的智能卡的cos版本校验装置不能对智能卡的cos数据进行有效校验的技术问题。 To solve the existing version of the smart card cos cos can not verify device data of smart card technology issues effectively verified.

附图说明 BRIEF DESCRIPTION

[0040]下面将结合附图及实施例对本发明作进一步说明,附图中: [0040] The accompanying drawings and the following embodiments of the present invention is further illustrated drawings in which:

[0041]图1为本发明的智能卡的cos版本校验方法的第一优选实施例的流程图; Cos a flowchart of a first preferred embodiment of the method of checking the version of the smart card [0041] FIG. 1 embodiment of the present invention;

[0042]图2为本发明的智能卡的COS版本校验方法的第二优选实施例的流程图; COS flowchart of a second preferred embodiment of the method of checking a smart card version of [0042] FIG. 2 embodiment of the present invention;

[0043]图3为本发明的智能卡的COS版本校验装置的第一优选实施例的结构示意图; The structure of the first preferred embodiment of the calibration device COS version smart card [0043] FIG. 3 is a schematic view of the present disclosure;

[0044] 图4为本发明的智能卡的C0S版本校验装置的第二优选实施例的结构示意图。 Schematic structural diagram of a second preferred version of the calibration device C0S a smart card [0044] FIG. 4 of the present invention.

具体实施方式 Detailed ways

[0045] 下面结合图示,对本发明的优选实施例作详细介绍。 [0045] below with reference to the illustrated, preferred embodiments of the present invention will be described in detail.

[0046]请参照图1,图1为本发明的智能卡的C0S版本校验方法的第一优选实施例的流程图。 [0046] Referring to FIG 1, a flowchart of a first preferred embodiment of the version check method C0S FIG smart card 1 of the present invention. 本优选实施例的智能卡的cos版本校验方法包括: cos version of the smart card check method of the present embodiment preferably comprises:

[0047] 步骤S101,将智能卡的C0S数据划分为至少两个数据块; [0047] step S101, the data of the smart card C0S into at least two data blocks;

[0048]步骤S102,使用智能卡内置的校验算法以及预设初始值确定每个数据块的校验码; [0048] Step S102, the built-in smart card and the preset check algorithm determines the initial value of the checksum for each data block;

[0049]步骤S103,根据数据块的校验码以及智能卡的C0S数据的校验码,对智能卡的C0S 版本进行校验; [0049] Step S103, the data according to the check code C0S checksum data block and a smart card, the smart card version of C0S be verified;

[0050] 本优选实施例的智能卡的C0S版本校验方法结束于步骤S103。 [0050] C0S version checking method of a smart card according to the present preferred embodiment ends at step S103.

[0051 ]下面详细说明本优选实施例的智能卡的C0S版本校验方法的各步骤的具体流程。 [0051] The following detailed description of specific process steps for each version C0S smart card verification method according to the present preferred embodiment. [0052] 在步骤S101中,将智能卡的⑶S数据划分为至少两个数据块,以便后续对每个数据块分别进行校验码的计算。 [0052] In step S101, the ⑶S data into the smart card at least two data blocks, each data block for subsequent calculation of the checksum, respectively. 数据块划分的数量和位置可根据需要确定。 Dividing the data block number and the position may be determined as required. 这里优选根据智能卡中的应用,对智能卡的cos数据进行划分,即每个划分后的数据块包括至少一个完整的应用。 According to this preferred application of the smart card, the smart card data of cos divided, i.e., dividing each data block includes at least a complete application. 由于应用服务商一般只关心其开发的应用是否被篡改,因此按应用对cos数据进行划分,方便应用服务商对其开发的应用单独进行校验。 Since the application service providers generally only care about whether their application development has been tampered with, and therefore by application of cos data partitioning, application service providers to facilitate the application of its development should be verified independently.

[0053] 随后执行步骤S102。 [0053] Subsequently to step S102.

[0054] 在步骤S102中,使用智能卡内置的校验算法以及预设初始值确定步骤S101中生成的每个数据块的校验码,这里校验人员无法直接读取智能卡的内置校验算法,只能使用智能卡的内置校验算法以及预设初始值进行校验码的计算,如cos数据以及智能卡的内置校验算法被篡改,虽然智能卡的cos数据的校验码没有改变,但是数据块的校验码会发生变化,从而可以使用户获知其使用的智能卡的cos数据是否被篡改。 [0054] In step S102, the built-in smart card check algorithm and the preset initial value is determined for each data block check code generated in step S101, where the parity check algorithm built person can not read directly the smart card, only a built-in smart card check algorithm and the preset initial values ​​are calculated check code, such as built data cos checking algorithm and a smart card has been tampered with, although the check code of the smart card cos data is not changed, but the data block checksum will change, so the user can know whether the data cos using the smart card has been tampered with.

[0055] 随后执行步骤S103。 [0055] Subsequently to step S103.

[0056] 在步骤S103中,使用智能卡的内置校验算法以及预设初始值直接结算整个智能卡的C0S数据的校验码,然后将整个智能卡的C0S数据的校验码与步骤Sl〇2中确定的每个数据块的校验码进行对比,完成智能卡的cos版本的校验。 [0056] In step S103, the built-in smart card and a check code check algorithm preset initial value of the direct billing C0S the smart card data, and then determines in step C0S check code data in the smart card Sl〇2 checksum for each data block are compared, the version of the smart card cos complete verification.

[0057] 这样即完成了整个智能卡的C0S版本的校验过程。 [0057] This completes the C0S version of the smart card verification process.

[0058]本优选实施例的智能卡的C0S版本校验方法通过将智能卡的C0S数据划分为多个数据块,通过对多个数据块的校验码以及cos数据的校验码的比较,实现对智能卡的cos版本进行有效的校验。 [0058] C0S version check method according to a preferred embodiment of a smart card by C0S embodiment of the smart card data into a plurality of data blocks through a plurality of data blocks and comparing the checksum data cos check code, to achieve cos version of smart card valid checksum.

[0059] 请参照图2,图2为本发明的智能卡的C0S版本校验方法的第二优选实施例的流程图。 [0059] Referring to FIG 2, a flowchart of a second preferred embodiment C0S smart card version check method of the present invention FIG 2 embodiment. 本优选实施例的智能卡的cos版本校验方法包括: cos version of the smart card check method of the present embodiment preferably comprises:

[0060] 步骤S201,将智能卡的C0S数据划分为至少两个数据块; [0060] step S201, the data of the smart card C0S into at least two data blocks;

[0061]步骤S202,使用智能卡内置的校验算法以及预设初始值确定第一个数据块的校验码; [0061] Step S202, the built-in smart card check algorithm and the preset initial value determining a first checksum data block;

[0062] 步骤S203,使用智能卡内置的校验算法以及数据块的校验码确定下一个数据块的校验码,直至确定最后一个数据块的校验码; [0062] step S203, the built-in smart card and the data check code checking algorithm block check code is determined next data block check code is determined until the last data block;

[0063]步骤S204,根据最后一个数据块的校验码以及智能卡的C0S数据的校验码,对智能卡的cos版本进行校验; [0063] Step S204, the data according to the check code C0S check code of the last data block and the smart card, the smart card version of the cos for verification;

[0064] 本优选实施例的智能卡的C0S版本校验方法结束于步骤S204。 C0S version checking method of an embodiment of a smart card [0064] A preferred embodiment ends at step S204.

[0065]下面详细说明本优选实施例的智能卡的C0S版本校验方法的各步骤的具体流程。 [0065] The following detailed description of specific process steps for each version C0S smart card verification method according to the present preferred embodiment. [0066]在步骤S201中,将智能卡的C0S数据划分为至少两个数据块,以便后续对每个数据块分别进行校验码的计算。 [0066] In step S201, the C0S data into the smart card at least two data blocks, each data block for subsequent calculation of the checksum, respectively. 数据块划分的数量和位置可根据需要确定。 Dividing the data block number and the position may be determined as required. 这里优选根据智能卡中的应用,对智能卡的cos数据进行划分,即每个划分后的数据块包括至少一个完整的应用。 According to this preferred application of the smart card, the smart card data of cos divided, i.e., dividing each data block includes at least a complete application. 由于应用服务商一般只关心其开发的应用是否被篡改,因此按应用对cos数据进行划分,方便应用服务商对其开发的应用单独进行校验。 Since the application service providers generally only care about whether their application development has been tampered with, and therefore by application of cos data partitioning, application service providers to facilitate the application of its development should be verified independently.

[0067]随后执行步骤S202。 [0067] Subsequently to step S202.

[0068] 在步骤S202中,使用智能卡内置的校验算法以及预设初始值确定步骤S201中生成的第一个数据块的校验码,这里校验人员无法直接读取智能卡的内置校验算法,只能使用智能卡的内置校验算法以及预设初始值进行校验码的计算。 [0068] In step S202, the built-in smart card and the preset check algorithm first determines an initial value of a data block check code generated in the step S201, where the parity check algorithm built person can not read directly the smart card use only the built-in smart card and check algorithm preset initial values ​​are calculated checksum.

[0069]随后执行步骤S203。 [0069] Subsequently to step S203.

[0070]在步骤S203中,使用智能卡内置的校验算法以及数据块的校验码确定下一个数据块的校验码,具体为将步骤S2〇2中计算出来的第一个数据块的校验码作为第二个数据块的初始值,然后使用智能卡内置的校验算法以及第二个数据块的初始值确定第二个数据块的校验码;随后将第二个数据块的校验码作为第三个数据块的初始值,再使用智能卡内置的校验算法以及第三个数据块的初始值确定第三个数据块的校验码;依此类推,确定最后一个数据块的校验码。 [0070] In step S203, the built-in smart card and the data check code checking algorithm block check code is determined next data block, in particular for the correction of the first data block calculated in step S2〇2 a second check code as the initial value of the data block, then the initial value of the built-in smart card and the second check algorithm block check code to determine a second data block; then the second checksum data block code as the initial value of the third data block, then the initial value of the built-in smart card check algorithm, and a third data blocks determining a third checksum data blocks; and so on, a block of data to determine the final correction check code.

[0071] 随后执行步骤S204。 [0071] Subsequently to step S204.

[0072]在步骤S204中,使用智能卡的内置校验算法以及预设初始值直接结算整个智能卡的C0S数据的校验码,然后将整个智能卡的C0S数据的校验码与步骤S203中确定的最后一个数据块的校验码进行对比,如最后一个数据块的校验码与智能卡的C0S数据的校验码相同, 则确定智能卡的C0S版本正常;如最后一个数据块的校验码与智能卡的C0S数据的校验码不同,则确定智能卡的cos版本异常。 [0072] In step S204, check algorithm using the built-in smart card and the preset initial value of the direct billing data checksum C0S the smart card, and then determines in step C0S check code data of the smart card S203 last a data block check code comparison, the same as the last data checksum C0S checksum data block with a smart card, the smart card is determined C0S normal version; check code with the smart card as a last data block C0S different checksum data, it is determined that an abnormality cos version of the smart card.

[0073]这样即完成了整个智能卡的C0S版本的校验过程。 [0073] This completes the C0S version of the smart card verification process.

[0074] 本优选实施例的智能卡的COS版本校验方法通过将智能卡的COS数据划分为多个数据块,并通过多个数据块最终的校验码与cos数据的校验码进行比较,实现对智能卡的cos版本进行有效的校验。 [0074] COS version checking method of a smart card embodiment according to the present preferred embodiment of the COS data by the smart card into a plurality of data blocks, and a plurality of data blocks by comparing the final check code and check code data cos achieve cos version of smart cards for effective verification.

[0075] 本发明还提供一种智能卡的C0S版本校验装置。 [0075] The present invention also provides a smart card C0S version checking device. 请参照图3,图3为本发明的智能卡的cos版本校验装置的第一优选实施例的结构示意图。 Referring to FIG. 3, a schematic structural diagram of a first preferred version of the smart card of FIG cos 3 collation apparatus of the present invention embodiment. 本优选实施例的智能卡的cos版本校验装置30包括划分模块31、数据块校验码确定模块32以及系统数据校验模块33。 cos version of the smart card verification device 30 of the present embodiment comprises a preferred embodiment of the division module 31, a data block check code determination module 32 and the data check module 33 system. 其中划分模块31用于将智能卡的C0S数据划分为至少两个数据块;数据块校验码确定模块32用于使用智能卡内置的校验算法以及预设初始值确定每个数据块的校验码;系统数据校验模块33 用于根据数据块的校验码以及智能卡的C0S数据的校验码,对智能卡的C0S版本进行校验。 31 wherein the dividing module for dividing the data C0S smart card at least two data blocks; data block check code determination module 32 for using a built-in smart card and the preset check algorithm determines an initial value of check codes for each block ; system data check module 33 for check code according C0S data block, and check code data of the smart card, the smart card version of C0S be verified. [0076]本优选实施例的智能卡的C0S版本校验装置30使用时,首先划分模块31将智能卡的⑶S数据划分为至少两个数据块,随后数据块校验码确定模块32使用智能卡内置的校验算法以及预设初始值确定每个数据块的校验码;最后系统数据校验模块33根据数据块的校验码以及智能卡的C0S数据的校验码,对智能卡的C0S版本进行校验。 When C0S version check unit 30 the smart card embodiment of the [0076] present preferred embodiment is used, first division 31 ⑶S data smartcard division module to the at least two data blocks, then the data block check code is determined correction module 32 uses a smart card built posterior algorithm and the preset initial value determining a checksum for each data block; the final system data check module 33 C0S checksum data block, and check code data of the smart card, the smart card version of C0S be verified.

[0077]本优选实施例的智能卡的C0S版本校验装置30的具体使用过程与上述的智能卡的cos版本校验方法的第一优选实施例的描述相同或相似,具体请参见上述智能卡的cos版本校验方法的第一优选实施例中的相关描述。 [0077] The same or similar specific use C0S version checking device 30 a smart card according to this preferred embodiment of the first preferred above cos version of the verification method of a smart card embodiment, specifically refer to the smart card cos version Examples to the related description of the first preferred calibration method.

[0078] 本优选实施例的智能卡的C0S版本校验装置通过将智能卡的⑶S数据划分为多个数据块,通过对多个数据块的校验码以及cos数据的校验码的比较,实现对智能卡的cos版本进行有效的校验。 [0078] C0S version of the smart card verification apparatus of the present embodiment by the ⑶S preferred embodiment the smart card data into a plurality of data blocks through a plurality of data blocks and comparing the checksum data cos check code, to achieve cos version of smart card valid checksum.

[0079] 请参照图4,图4为本发明的智能卡的C0S版本校验装置的第二优选实施例的结构示意图。 [0079] Referring to FIG 4, a schematic structural diagram of a second preferred version of the smart card of FIG C0S 4 collation apparatus of the present invention embodiment. 本优选实施例的C0S版本校验装置40包括划分模块41、数据校验码确定模块42以及系统数据校验模块43。 C0S version checking device 40 of the preferred embodiment includes a dividing module 41, the data check module 42 and a system determination code data check module 43. 其中划分模块41用于将智能卡的C0S数据划分为至少两个数据块;数据块校验码确定模块42用于使用智能卡内置的校验算法以及预设初始值确定每个数据块的校验码;系统数据校验模块43用于根据数据块的校验码以及智能卡的C0S数据的校验码, 对智能卡的C0S版本进行校验。 41 wherein the dividing module for dividing the data C0S smart card at least two data blocks; data block check code determination module 42 for using a built-in smart card and the preset check algorithm determines an initial value of check codes for each block ; system data check module 43 according C0S checksum data block, and check code data of the smart card, the smart card version of C0S be verified.

[0080] 本优选实施例的数据块校验码确定模块42还包括第一数据块校验码确定单元421 以及第二数据码确定单元422;系统数据校验模块43包括校验单元431。 [0080] The block check code of the present embodiment preferably further comprises a first determining module 42 checksum data block determination unit 421 and second determining unit 422 data symbols; data check module 43 includes a system check unit 431. 第一数据块校验码确定单元421用于使用智能卡内置的校验算法以及预设初始值确定第一数据块的校验码; 第二数据块校验码确定单元422用于使用智能卡内置的校验算法以及数据块的校验码确定下一个数据块的校验码,直至确定最后一个数据块的校验码;校验单元431用于根据最后一个数据块的校验码以及智能卡的C0S数据的校验码,对智能卡的C0S版本进行校验。 The first data block check code determination unit 421 using the built-in smart card and the preset check algorithm determines an initial value of check codes of the first data block; a second data block check code determination unit 422 using the built-in smart card and the data check code checking algorithm block check code is determined next data block check code is determined until the last data block; C0S check unit 431 according to the last data block check code and a smart card checksum data, C0S version of the smart card for verification.

[0081]本优选实施例的智能卡的C0S版本校验装置40使用时,首先划分模块41将智能卡的C0S数据划分为至少两个数据块;随后数据块校验码确定模块42的第一数据块校验码确定单元421使用智能卡内置的校验算法以及预设初始值确定第一数据块的校验码;然后数据块校验码确定模块42的第二数据块校验码确定单元422使用智能卡内置的校验算法以及数据块的校验码确定下一个数据块的校验码,直至确定最后一个数据块的校验码;最后系统数据校验模块43的校验单元431根据最后一个数据块的校验码以及智能卡的C0S数据的校验码,对智能卡的C0S版本进行校验。 C0S version 40 using the smart card verification apparatus of embodiment [0081] of the present preferred embodiment, the module 41 is first divided data C0S smartcard into at least two data blocks; checksum data block then determines a first data block 42 of the module checksum determination unit 421 built-in smart card and the preset check algorithm determines an initial value of check codes of the first data block; and block check code determination module 42 of the second data block check code determining unit 422 using a smart card built-in check code checking algorithm and the data block check code is determined next data block check code is determined until the last data block; the final system data check module 431 of the check unit 43 in accordance with the last data block the check code and check code data C0S smart card, smart card version of C0S be verified.

[0082] 本优选实施例的智能卡的C0S版本校验装置40的具体使用过程与上述的智能卡的cos版本校验方法的第二优选实施例的描述相同或相似,具体请参见上述智能卡的cos版本校验方法的第二优选实施例中的相关描述。 The same or similar description of the second preferred cos version check method of particular use [0082] C0S version verification means smart card embodiment according to the present preferred embodiment 40 of the above-described smart card embodiments, details, see the smart card cos version related description of the second embodiment of the preferred embodiment of the method of verification.

[0083]本优选实施例的智能卡的cos版本校验装置通过将智能卡的cos数据划分为多个数据块,并通过多个数据块最终的校验码与⑶S数据的校验码进行比较,实现对智能卡的cos版本进行有效的校验。 [0083] cos version of the smart card verification apparatus of the present embodiment by the cos preferred embodiment the smart card data into a plurality of data blocks, and a plurality of data blocks by comparing the final check code and check code data ⑶S achieve cos version of smart cards for effective verification.

[0084]下面通过一具体实施例说明本发明的智能卡的cos版本校验方法及校验装置的具体工作原理。 [0084] The following examples illustrate particular by a specific working principle cos version checksum verification method and apparatus of the present invention is a smart card.

[0085] C0S数据的校验码的取得: [0085] C0S checksum data acquired:

[0086] 如智能卡的COS数据为0x6162,采用CRC-16/XM0DEM的校验码算法,预设初始值取0x0000,计算的COS数据(即COS版本)的校验码为0x74FF。 [0086] The smart card COS data is 0x6162, checksum algorithm using CRC-16 / XM0DEM, the preset initial value takes 0x0000, COS data (i.e. version COS) is calculated checksum 0x74FF.

[0087] 数据块的校验码的取得: [0087] acquired checksum data block:

[0088] 如智能卡的COS数据为0x6162,将该智能卡的COS数据分为0x61和0x62,首先采用CRC-ie/XMODEM的校验码算法,预设初始值取0x0000,计算的C0S数据(即C0S版本)的校验码为: [0088] The smart card COS data is 0x6162, COS data of the smart card into 0x61 and 0x62, first checksum algorithm using CRC-ie / XMODEM, the preset initial value takes 0x0000, C0S data (i.e. calculated C0S version) check code is:

[0089] (0x00«8) 'crc (0x6r0x00) =0x7C87〇 [0089] (0x00 «8) 'crc (0x6r0x00) = 0x7C87〇

[0090]然后依然采用CRC-16/XMODEM的校验码算法,预设初始值取0x7C87,计算的COS数据(即COS版本)的校验码为: [0090] and still using the checksum algorithm CRC-16 / XMODEM, the preset initial value takes 0x7C87, COS data (i.e. version COS) checksum is calculated:

[0091] (0x87«8rcrc (0x62~0x7c) =0x870(Tcrc (IE) =0x870(T0xF3FF = 0x74FF。 [0091] (0x87 «8rcrc (0x62 ~ 0x7c) = 0x870 (Tcrc (IE) = 0x870 (T0xF3FF = 0x74FF.

[0092]可见如智能卡的COS数据采用标准的CRC-16/XMODEM的校验码算法进行数据的校验时,C0S数据的校验码与最后一个数据块的校验码应该是相同的。 When the [0092] data such as COS visible smart card standard checksum algorithm is CRC-16 / XMODEM performed check data, check code with the check code of the last data block C0S data should be the same. 这是由于CRC-16/ XMODEM的校验码的生成是以数据的每个字节为单位进行计算的,因此C0S数据的校验码可以整体C0S数据来生成,也可以C0S数据包括的多个数据块来生成。 This is because each byte of data is generated check code CRC-16 / XMODEM is calculated as a unit, can thus check code data to generate integral C0S C0S data may comprise a plurality of data C0S data block is generated.

[0093] 如果修改了cos数据,但又要保持cos数据的校验码不变,必然要对cos数据的校验码算法进行改变,改变后的校验码算法则难以保持上述了校验码是以数据的每个字节为单位进行计算的特性。 [0093] If the modified data cos, but while keeping the same data cos checksum, checksum algorithm is bound to cos of the data changes, the checksum algorithm change is difficult to maintain the above-described check code each byte of data is performed in units of characteristic calculations. 因此如采用多个数据块来生成cos数据的校验码,会造成数据块最终的校验码与cos数据的校验码不一致,从而可校验出cos数据被篡改。 Therefore, as to generate the check code data using cos plurality of data blocks, the data block will result in a final check code with the check code cos inconsistent data, which can verify the cos data from being tampered.

[0094] 本发明的智能卡的C0S版本校验方法及校验装置通过将智能卡的C0S数据划分为多个数据块,通过对多个数据块的校验码以及cos数据的校验码的比较,实现对智能卡的cos版本进行有效的校验。 [0094] C0S version checksum verification method and apparatus of the present invention, the smart card by the smart card C0S data into a plurality of data blocks, by comparing the checksum of the plurality of data blocks and the checksum cos data, realize cos version of smart card valid checksum. 解决了现有的智能卡的cos版本校验装置不能对智能卡的cos数据进行有效校验的技术问题。 To solve the existing version of the smart card cos cos can not verify device data of smart card technology issues effectively verified.

[0095] 以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。 [0095] Other related art technologies described above are only embodiments of the present invention, not intended to limit the scope of the present invention, all utilize the present specification and drawings taken transform equivalent structures, or applied directly or indirectly shall fall within the scope of protection of the present invention.

Claims (8)

1. 一种智能卡的cos版本校验方法,其特征在于,包括步骤: 将智能卡的cos数据划分为至少两个数据块; 使用所述智能卡内置的校验算法以及预设初始值确定每个所述数据块的校验码;以及根据所述数据块的校验码以及所述智能卡的cos数据的校验码,对所述智能卡的cos版本进行校验; 其中所述使用所述智能卡内置的校验算法以及预设初始值确定每个所述数据块的校验码的步骤包括: 使用所述智能卡内置的校验算法以及预设初始值确定第一个数据块的校验码;以及使用所述智能卡内置的校验算法以及当前数据块的校验码确定下一个数据块的校验码,直至确定最后一个数据块的校验码; 所述根据所述数据块的校验码以及所述智能卡的cos数据的校验码,对所述智能卡的cos版本进行校验的步骤具体为: 根据所述最后一个数据块的校验码以及所述智能卡的cos cos version checking method for the smart card, characterized by comprising the steps of: dividing data cos smart card at least two data blocks; determined using each of the built-in smart card and the preset initial value of the checksum algorithm said checksum data block; cos data and check code according checksum of the data block and the smart card, cos version of the smart card for verification; wherein the using the built-in smart card verification algorithm and a preset initial value determining step for each of the data block check code comprises: using the built-in smart card and the preset check algorithm first determines an initial value of a data block check code; and using the built-in smart card and a check code check algorithm to determine the next current data block a block check code, a checksum until it is determined the last data block; according to the check code of the data block and the cos said check code data in the smart card, step cos version of the smart card verifies specifically: cos check code according to the last data block of the smart card and 据的校验码,对所述智能卡的cos版本进行校验。 According checksum, cos version of the smart card for verification.
2. 根据权利要求1所述的智能卡的COS版本校验方法,其特征在于,使用所述智能卡内置的校验算法以及所述预设初始值确定所述智能卡的cos数据的校验码。 The smart card COS version check method according to claim 1, characterized in that, using the built-in smart card and the preset check algorithm determines an initial value of the smart card cos checksum data.
3. 根据权利要求1所述的智能卡的COS版本校验方法,其特征在于,所述根据所述最后一个数据块的校验码以及所述智能卡的cos数据的校验码,对所述智能卡的cos版本进行校验的步骤具体为: 如所述最后一个数据块的校验码与所述智能卡的cos数据的校验码相同,则确定所述智能卡的cos版本正常; 如所述最后一个数据块的校验码与所述智能卡的cos数据的校验码不同,则确定所述智能卡的cos版本异常。 The smart card COS version check method according to claim 1, wherein said check code data in accordance with said cos last data block of the smart card and verification code on the smart card cos version check step is specifically: the same as the last cos checksum data block a check code with the smart card, the smart card is determined cos normal version; as the last cos different checksum data block and the check code data of the smart card, the smart card is determined cos abnormal version.
4. 根据权利要求1所述的智能卡的COS版本校验方法,其特征在于,所述将智能卡的COS 数据划分为至少两个数据块的步骤具体为: 根据所述智能卡中的应用,将智能卡的cos数据划分为至少两个数据块。 The smart card COS version check method according to claim 1, wherein said data dividing COS smart card at least two data blocks in step is specifically: The application of the smart card, the smart card cos-data into at least two data blocks.
5.—种智能卡的COS版本校验装置,其特征在于,包括: 划分模块,用于将智能卡的cos数据划分为至少两个数据块; 数据块校验码确定模块,用于使用所述智能卡内置的校验算法以及预设初始值确定每个所述数据块的校验码;以及系统数据校验模块,用于根据所述数据块的校验码以及所述智能卡的cos数据的校验码,对所述智能卡的cos版本进行校验; 其中所述数据块校验码确定模块包括: 第一数据块校验码确定单元,用于使用所述智能卡内置的校验算法以及预设初始值确定第一个数据块的校验码;以及第二数据块校验码确定单元,用于使用所述智能卡内置的校验算法以及当前数据块的校验码确定下一个数据块的校验码,直至确定最后一个数据块的校验码; 所述系统数据校验模块包括: 校验单元,用于根据所述最后一个数据块的校验码以及所述智能卡 5.- species COS smart card version checking device comprising: dividing means for dividing data cos smart card at least two data blocks; checksum data block determining means for using the smart card built-in check algorithm and the preset initial value is determined for each of the data block check code; and a system data check module for checking the check code data in accordance with cos data block of the smart card and code, cos version of the smart card for verification; wherein the data block check code determination module comprises: a first determination unit data block check code, using the built-in smart card and the predetermined initial check algorithm determining a checksum value of the first data block; and a second data block check code determining means for using the built-in smart card and a check code check algorithm to determine the current data block check the next data block code, until the last determined checksum data block; data verification module said system comprising: checking means for checking a code of the last data block in accordance with the smart card and cos数据的校验码,对所述智能卡的cos版本进行校验。 Cos checksum data, cos version of the smart card for verification.
6. 根据权利要求5所述的智能卡的COS版本校验装置,其特征在于,所述系统数据校验模块使用所述智能卡内置的校验算法以及所述预设初始值确定所述智能卡的C0S数据的校验码。 COS version checking apparatus according to claim 5, wherein the smart card, wherein the data check module system using the built-in smart card and the preset check algorithm determines an initial value of the smart card C0S checksum data.
7. 根据权利要求5所述的智能卡的⑶S版本校验装置,其特征在于,所述校验单元具体用于: 如所述最后一个数据块的校验码与所述智能卡的COS数据的校验码相同,则确定所述智能卡的COS版本正常; 如所述最后一个数据块的校验码与所述智能卡的COS数据的校验码不同,则确定所述智能卡的COS版本异常。 ⑶S version checking apparatus according to claim 5, wherein the smart card, wherein the check unit is configured to: if the last correction checksum data block with data of the smart card COS the same check code, it is determined that the version of the smart card COS normal; COS different check code data checksum as the last of the data block with the smart card, the smart card is determined COS abnormal version.
8. 根据权利要求5所述的智能卡的⑶S版本校验装置,其特征在于,所述划分模块具体用于: 根据所述智能卡中的应用,将智能卡的COS数据划分为至少两个数据块。 ⑶S version checking device according to claim 5, wherein the smart card, characterized in that, the dividing module is configured to: The application of the smart card, the smart card data of the COS divided into at least two data blocks.
CN201310152996.3A 2013-04-27 2013-04-27 cos version of the smart card and verification device verification method CN103294569B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310152996.3A CN103294569B (en) 2013-04-27 2013-04-27 cos version of the smart card and verification device verification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310152996.3A CN103294569B (en) 2013-04-27 2013-04-27 cos version of the smart card and verification device verification method

Publications (2)

Publication Number Publication Date
CN103294569A CN103294569A (en) 2013-09-11
CN103294569B true CN103294569B (en) 2018-11-06

Family

ID=49095494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310152996.3A CN103294569B (en) 2013-04-27 2013-04-27 cos version of the smart card and verification device verification method

Country Status (1)

Country Link
CN (1) CN103294569B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751279A (en) * 2009-12-29 2010-06-23 北京握奇数据系统有限公司 Chip and method for downloading on-chip operation system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7574016B2 (en) * 2003-06-26 2009-08-11 Fotonation Vision Limited Digital image processing using face detection information
CN102882651B (en) * 2012-09-27 2015-04-29 华为技术有限公司 Cyclic redundancy check method and cyclic redundancy check device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751279A (en) * 2009-12-29 2010-06-23 北京握奇数据系统有限公司 Chip and method for downloading on-chip operation system

Also Published As

Publication number Publication date
CN103294569A (en) 2013-09-11

Similar Documents

Publication Publication Date Title
US9832019B2 (en) Authentication in ubiquitous environment
JP5411122B2 (en) The information processing apparatus
US7587763B2 (en) Systems and methods for detecting a security breach in a computer system
KR101066779B1 (en) The secure boot of a computing device
KR100555003B1 (en) Memory card
US20030018892A1 (en) Computer with a modified north bridge, security engine and smart card having a secure boot capability and method for secure booting a computer
US7558966B2 (en) Notifying remote administrator of platform integrity determination
US20090164800A1 (en) Secure End-of-Life Handling of Electronic Devices
US9607168B2 (en) Obfuscating a transaction in a dispersed storage system
US20160085955A1 (en) Secure Storing and Offline Transferring of Digitally Transferable Assets
CN100489805C (en) Autonomous memory checker for runtime security assurance and method therefore
WO2007131061A2 (en) Rf presentation instrument with sensor control
EP2954615B1 (en) Integrated circuit identification and dependability verification using ring oscillator based physical unclonable function and age detection circuitry
KR20150040920A (en) Secure feature and key management in integrated circuits
JP6046248B2 (en) System for protecting the application on the secure element, manages, methods, and computer program products
WO1997037331A1 (en) Method of securely loading commands in a smart card
TW200723145A (en) Prescription authentication
MXPA04010805A (en) Medical treatment verification system and method.
US8099789B2 (en) Apparatus and method for enabling applications on a security processor
CN1430147A (en) Method and device for programming and checking EEPROM page
CN1799104A (en) Integrity control for data stored in a non-volatile memory
CN102333305B (en) Communication device, a communication method and a communication system
CN103729597B (en) The method of calibration system startup, the system startup calibration device and the terminal
EP1611510A2 (en) Controlled execution of a program used for a virtual machine on a portable data carrier
US20060047955A1 (en) Application code integrity check during virtual machine runtime

Legal Events

Date Code Title Description
C06 Publication
EXSB Decision made by sipo to initiate substantive examination
GR01