CN117391099A - Data downloading and checking method and system for smart card and storage medium - Google Patents

Data downloading and checking method and system for smart card and storage medium Download PDF

Info

Publication number
CN117391099A
CN117391099A CN202311695266.8A CN202311695266A CN117391099A CN 117391099 A CN117391099 A CN 117391099A CN 202311695266 A CN202311695266 A CN 202311695266A CN 117391099 A CN117391099 A CN 117391099A
Authority
CN
China
Prior art keywords
smart card
data
card
interface
verification
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.)
Pending
Application number
CN202311695266.8A
Other languages
Chinese (zh)
Inventor
王伟
朱智田
温海锋
叶伟照
郑心怡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xinghan Intelligent Technology Co ltd
Original Assignee
Xinghan Intelligent Technology Co ltd
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 Xinghan Intelligent Technology Co ltd filed Critical Xinghan Intelligent Technology Co ltd
Priority to CN202311695266.8A priority Critical patent/CN117391099A/en
Publication of CN117391099A publication Critical patent/CN117391099A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/0095Testing the sensing arrangement, e.g. testing if a magnetic card reader, bar code reader, RFID interrogator or smart card reader functions properly
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device
    • G06K17/0029Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device the arrangement being specially adapted for wireless interrogation of grouped or bundled articles tagged with wireless record carriers

Abstract

The application discloses a data downloading and checking method of a smart card, a system thereof and a storage medium. The method comprises the following steps: the control device sets the smart card to a personalized state; transmitting all personalization instructions of the first personalization script to the smart card; executing a personalized instruction by the intelligent card in a personalized state, and recording and storing address range information of each writing action into a temporary space in the card when the monitoring module monitors that the writing action is performed on the storage area; transmitting the address range information to the control device; the control equipment performs first verification processing according to all address range information stored in the data space to obtain a first verification value; returning an interface instruction comprising a first check value to the smart card; the smart card responds to the interface instruction to carry out second check processing on the data written into the storage area to obtain a second check value; determining that the verification passes under the condition that the first verification value and the second verification value are the same, and successfully writing the data; the verification efficiency and the verification coverage rate of the detection smart card are improved.

Description

Data downloading and checking method and system for smart card and storage medium
Technical Field
The application relates to the technical field of smart cards and computers, in particular to a data downloading and checking method of a smart card, a system thereof and a storage medium thereof.
Background
The intelligent card is a computer system for identity recognition, and is internally provided with a processor, a memory and an input/output interface. Which stores therein software of a specific function and personal information data of the user. The process of writing software and data to a card is known as card personalization. Card personalization typically involves the following two steps: pre-personalization and post-personalization. Wherein pre-personalization refers to the downloading of software code (code) and the downloading of fixed data (data); the information written at this stage is completely identical for all cards of the same batch. Fixed data may be understood as data resembling a file system. And then, the fixed data written in the first step is changed by personalization to realize personalized data writing of a user. Such as an ID, key, etc., the data written at this stage is different for different cards, e.g., the ID should remain unique for each card. The writing method of personalized data generally executes a script template prepared in advance to change the pre-personalized fixed data. The template contains some writing instructions, wherein the content to be written of the instructions is a variable. When each card is operated, the personalized data of the card is firstly filled into the template to form a complete script and execute the writing operation. For example, an instruction to write an ICCID is "00D600000A [ var.iccid ]", where "00D600000A" represents an update file operation and "[ var.iccid ]" is a variable representing an ICCID that is replaced with a specific ICCID value every time it is written. In the production and manufacturing process of a personalization factory, the production process of one batch often has thousands or even millions of cards, and pre-personalization or post-personalization writing failure or error occurs due to factors such as equipment stability. Any error in the card data may cause problems for the user in use. To prevent this type of problem, the cards are typically subjected to related testing after production is complete using specially designed test programs.
For the test procedure, the finished smart card is a black box, which needs to be tested in order to check if the personalization is correct. In the related art, the whole test is divided into three parts: checking whether the code is written correctly, checking whether the fixed data is written correctly, and checking whether the personalized data is written correctly. Since the code is generally located in a continuous space after it is downloaded to the card and its content should not change at all, it can be checked whether the writing is correct by calculating the check value. The problem is the inspection of fixed data and personalized data: because the position where the personalized data such as the ID, the secret key and the like are actually stored is a part of the fixed data, and the personalized data of each card is different, the whole card cannot be verified. At the same time, some personalization data is no longer allowed to be read after being written to the card, such as a key. The result is that the test program can only determine if the data is correct by designing a specific test procedure, by checking the runtime behaviour of the card. The testing process is time-consuming, and the initial state of the card is inevitably influenced, so that the comprehensive test cannot be performed and only sampling detection is performed; and the verification efficiency and the verification coverage rate are low.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein.
The embodiment of the application provides a data downloading and checking method of a smart card, a system thereof and a storage medium thereof, which can quickly check all data in the smart card after production is completed, thereby improving the checking efficiency and the checking coverage rate of the detected smart card.
In a first aspect, an embodiment of the present application provides a method for downloading and checking data of a smart card, where the method is applied to a system for downloading and checking data of a smart card, and the system includes: the intelligent card and the control equipment are electrically connected with the intelligent card through the interface module; the intelligent card comprises a monitoring module, a temporary space in the card and a storage area; the control device includes a data space;
the data downloading and checking method of the smart card comprises the following steps:
the control device sets the smart card to a personalized state; transmitting all personalization instructions of the first personalization script to the smart card;
in the personalized state, the intelligent card executes the personalized instruction, and when the monitoring module monitors that the storage area is subjected to writing action, address range information of each writing action is recorded and stored in a temporary space in the card; transmitting the address range information stored in the temporary space within the card to the control device;
the control equipment stores the address range information into the data space, and performs first verification processing according to all the address range information to obtain a first verification value; returning an interface instruction comprising the first check value to the smart card;
the intelligent card responds to the interface instruction and carries out second check processing on the data written into the storage area to obtain a second check value; and comparing the first check value with the second check value, and determining that the data is successfully written when the first check value and the second check value are the same.
According to some embodiments of the application, the interface module includes a second interface that sends the address range information stored in the temporary space within the card to the control device, including:
transmitting the address range information stored in the temporary space in the card to the control device through the second interface every time the execution of one personalized instruction is detected to be completed; clearing temporary space in the card to cache the address range information of the write action of the next personalized instruction;
or after detecting that all the personalized instructions are executed, sending the address range information stored in the temporary space in the card to the control equipment through the second interface.
According to some embodiments of the present application, the performing a first check process according to all the address range information to obtain a first check value includes:
generating a data copy which is completely consistent with the data in the intelligent card according to all the address range information;
and performing first check processing on the data copy to obtain a first check value.
According to some embodiments of the present application, the interface module further comprises a third interface;
the return of the interface instruction including the first check value to the smart card includes:
after the first check value is generated, generating the interface instruction according to the address range information stored in the data space and the first check value;
adding the interface instruction to the tail of the first personalized script to obtain a second personalized script;
and sending the second personalized script to the smart card through the third interface.
According to some embodiments of the present application, the smart card performs a second check process on the data written into the storage area to obtain a second check value in response to the interface instruction, including:
the smart card receives the second personalized script;
determining the data in the smart card according to the address range information in response to the interface instructions in the second personalized script;
and performing second check processing on the data in the smart card to obtain a second check value.
According to some embodiments of the present application, the interface module includes a first interface;
the control device sets the smart card to a personalized state, including:
the control device sends a first state setting command to the smart card through the first interface;
and setting a state identifier of the smart card to be a first mark through the first state setting command, wherein the first mark indicates that the smart card is in the personalized state.
According to some embodiments of the present application, the first and second verification processes employ the same verification algorithm.
According to some embodiments of the present application, after comparing the first check value and the second check value, the method further includes: and under the condition that the first check value and the second check value are different, determining that the check is not passed, and failing to write the data.
In a second aspect, the present application provides a data downloading and verification system for a smart card, including: the intelligent card and the control equipment are electrically connected with the intelligent card through the interface module; the intelligent card comprises a monitoring module, a temporary space in the card and a storage area; the control device includes a data space; the control device and the smart card cooperate to execute the data downloading and checking method of the smart card according to any one of the embodiments of the first aspect.
In a third aspect, the present application provides a storage medium, which is a computer readable storage medium storing computer executable instructions for implementing a method for downloading and verifying data of a smart card according to any one of the embodiments of the first aspect when being executed by a processor.
The embodiment of the application comprises the following steps: the data downloading and checking system of the smart card comprises the smart card and control equipment electrically connected with the smart card through an interface module; the intelligent card comprises a monitoring module, a temporary space in the card and a storage area; the control device includes a data space; in a data downloading and verifying system of a smart card, first, a control device sets the smart card to a personalized state; transmitting all personalization instructions of the first personalization script to the smart card; then, in the personalized state, the intelligent card executes a personalized instruction, and when the monitoring module monitors writing actions on the storage area, address range information of each writing action is recorded and stored in a temporary space in the card; transmitting address range information stored in the temporary space within the card to the control device; then, the control equipment stores the address range information into a data space, and performs first verification processing according to all the address range information to obtain a first verification value; returning an interface instruction comprising a first check value to the smart card; finally, the smart card responds to the interface instruction and carries out second check processing on the data written into the storage area to obtain a second check value; and comparing the first check value with the second check value, and determining that the check passes and the data is written successfully under the condition that the first check value and the second check value are the same. All data in the smart card after the production is completed can be rapidly checked through the mutual matching of the smart card and the control equipment, and the check efficiency and check coverage rate of the smart card are improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, wherein:
FIG. 1 is a schematic diagram of a data download and verification system for a smart card according to one embodiment of the present application;
FIG. 2 is a schematic diagram of a specific structure of a smart card and a control device according to an embodiment of the present application;
fig. 3 is a flow chart of a method for downloading and verifying data of a smart card according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples.
It should be noted that although a logical order is illustrated in the flowchart in the description of the present application, in some cases, the steps illustrated or described may be performed in an order different from that in the flowchart. In the description of the present application, a number means one or more, and a plurality means two or more. The description of "first" and "second" is used for the purpose of distinguishing between technical features only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the present application.
First, several terms referred to in the present application are explained:
the cyclic redundancy check (Cyclic redundancy check, CRC) is a hash function that generates a short fixed-bit check code based on data such as network packets or computer files, and is used to detect or check errors that may occur after data transmission or storage.
The secure hash algorithm (Secure Hash Algorithm, SHA) is a cryptographic hash function, and is a secure hash algorithm. It can calculate the algorithm of a character string with fixed length corresponding to a digital message. And if the input messages are different, the probability of correspondingly obtaining different character strings is high.
-application protocol data unit (ApplicationProtocolDataUnit, APDU). Protocol data units, PDUs, refer to data units transferred between peer layers. The PDU of the physical layer of the protocol data unit is a data bit, the PDU of the data link layer is a data frame, the PDU of the network layer is a data packet (packet), the PDU of the transport layer is a data segment (segment), and the other higher layer PDUs are data.
The application provides a data downloading and checking method of an intelligent card and a data downloading and checking system of the intelligent card. The data downloading and checking system of the smart card comprises the smart card and control equipment electrically connected with the smart card through an interface module; the intelligent card comprises a monitoring module, a temporary space in the card and a storage area; the control device includes a data space; in a data downloading and verifying system of a smart card, first, a control device sets the smart card to a personalized state; transmitting all personalization instructions of the first personalization script to the smart card; then, in the personalized state, the intelligent card executes a personalized instruction, and when the monitoring module monitors writing actions on the storage area, address range information of each writing action is recorded and stored in a temporary space in the card; transmitting address range information stored in the temporary space within the card to the control device; then, the control equipment stores the address range information into a data space, and performs first verification processing according to all the address range information to obtain a first verification value; returning an interface instruction comprising a first check value to the smart card; finally, the smart card responds to the interface instruction and carries out second check processing on the data written into the storage area to obtain a second check value; and comparing the first check value with the second check value, and determining that the check passes and the data is written successfully under the condition that the first check value and the second check value are the same. All data in the smart card after the production is completed can be rapidly checked through the mutual matching of the smart card and the control equipment, and the check efficiency and check coverage rate of the smart card are improved.
Embodiments of the present application are further described below with reference to the accompanying drawings.
In one aspect, as shown in fig. 1 and 2, the data downloading and verification system 100 of the smart card includes: a smart card 101, a control device 103 electrically connected to the smart card 101 through an interface module 102; the smart card 101 comprises a monitoring module M1, a temporary space S1 in the card and a storage area S3; the control device 103 comprises a data space S2. The interface module 102 includes a first interface P1, a second interface P2, and a third interface P3.
Specifically, the control device 103 is a card reader or a production device, and corresponding control software is configured in the control device 103. Therefore, the type of the control apparatus 103 is not particularly limited in this application.
Specifically, the first interface P1 is an operation interface, and the first interface P1 is configured to: a first state setting command issued by the control device 103 is input to the smart card 101.
Specifically, the second interface P2 is also an operation interface, and the second interface P2 is configured to: all address range information held in the temporary space S1 in the card of the smart card 101 is returned to the control device 103.
Specifically, the third interface P3 is a card interface, and the third interface P3 is configured to: the interface instruction including the first check value generated by the control device 103 is sent to the smart card 101.
In the smart card 101, the storage area S3 further includes a software code (code) area and a fixed data (data) area. A software code (code) area for storing fixed data due to storing the software code and a fixed data (data) area; the in-card temporary space S1 is used to store address range information for each write action; in the control device 103, the data space S2 is used for storing address range information stored in the temporary space S1 in the card, which is transmitted by the smart card 101, and R1, R2 to Rn shown in fig. 2 are all address range information; one of R1 is the address range information of one write operation.
Wherein the control device 103 is configured to: setting the smart card 101 to a personalized state; all personalization instructions of the first personalization script are sent to the smart card 101.
In the personalized state, the smart card 101 is used to: executing a personalized instruction, and recording and storing address range information of each writing action into a temporary space S1 in the card when the monitoring module M1 monitors the writing action of the storage area S3; the address range information held in the intra-card temporary space S1 is transmitted to the control device 103.
The control device 103 is also configured to: storing the address range information into a data space S2, and performing first verification processing according to all the address range information to obtain a first verification value; an interface instruction comprising the first check value is returned to the smart card 101.
The smart card 101 is also used to: responding to the interface instruction, and performing second check processing on the data written into the storage area S3 to obtain a second check value; and comparing the first check value with the second check value, and determining that the check passes and the data is written successfully under the condition that the first check value and the second check value are the same.
In summary, according to the data downloading and verification system 100 for a smart card provided in the embodiments of the present application, through the cooperation between the smart card 101 and the control device 103, all data in the smart card 101 after the production is completed can be quickly verified, so that the verification efficiency and the verification coverage rate of detecting the smart card 101 are improved.
It is to be understood that the number of smart cards 101 electrically connected to the control device 103 may be one or plural, and the number of smart cards 101 electrically connected to the control device 103 is not particularly limited in this application. After each card is done, the personalized flow can still check all data in the card, but not only the data of the fixed part. Meanwhile, as the check value is calculated relatively quickly, the test can be performed immediately after the production of each card is finished, and the test is not sampling test; the detection coverage of the data downloading and checking system 100 of the smart card provided by the embodiment of the application is 100%.
It will be appreciated by those skilled in the art that the system architecture shown in the figures is not limiting of the embodiments of the present application, and may include more or fewer components than shown, or certain components may be combined, or a different arrangement of components.
The system embodiments described above are merely illustrative, in that the units illustrated as separate components may or may not be physically separate, i.e., may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
It can be understood by those skilled in the art that the system architecture and the application scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and are not limited to the technical solution provided in the embodiments of the present application, and those skilled in the art can know that, with the evolution of the system architecture and the appearance of the new application scenario, the technical solution provided in the embodiments of the present application is equally applicable to similar technical problems.
It should be noted that, since the data downloading and checking system 100 of the smart card according to the embodiment of the present application can implement the following method for downloading and checking data of the smart card according to any embodiment, the data downloading and checking system 100 of the smart card according to the embodiment and the method for downloading and checking data of the smart card according to any embodiment have the same technical principle and the same technical effect, and are not described herein again for avoiding redundancy of content.
Based on the above system structure, various embodiments of the data downloading and verification method of the smart card of the present application are presented below.
On the other hand, as shown in fig. 3, the method for downloading and verifying data of the smart card can be applied to the system 100 for downloading and verifying data of the smart card shown in fig. 1, and the method for downloading and verifying data of the smart card can include, but is not limited to, steps S110 to S140.
Step S110: the control device sets the smart card to a personalized state; all personalization instructions of the first personalization script are sent to the smart card.
Step S120: in the personalized state, the intelligent card executes a personalized instruction, and when the monitoring module monitors writing actions on the storage area, address range information of each writing action is recorded and stored in a temporary space in the card; address range information stored in the temporary space within the card is transmitted to the control device.
Step S130: the control equipment stores the address range information into a data space, and performs first verification processing according to all the address range information to obtain a first verification value; and returning the interface instruction comprising the first check value to the smart card.
Step S140: the intelligent card responds to the interface instruction and carries out second check processing on the data written into the storage area to obtain a second check value; and comparing the first check value with the second check value, and determining that the check passes and the data is written successfully under the condition that the first check value and the second check value are the same.
In some embodiments, the first personalization script in step S110 includes all personalization instructions, wherein each personalization instruction includes post-personalization data.
According to some embodiments of the present application, after comparing the first check value and the second check value, in step S140, the smart card further includes: and under the condition that the first check value and the second check value are different, determining that the check is not passed and the data writing fails.
According to some embodiments of the present application, the first and second check processes employ the same check algorithm, which is a cyclic redundancy check or a secure hash algorithm. It should be noted that there are many algorithms for data verification, and CRC or SHA are just two of these.
In the data downloading and verifying system of the smart card, through steps S110 to S140, first, the control device sets the smart card to a personalized state; transmitting all personalization instructions of the first personalization script to the smart card; then, in the personalized state, the intelligent card executes a personalized instruction, and when the monitoring module monitors writing actions on the storage area, address range information of each writing action is recorded and stored in a temporary space in the card; transmitting address range information stored in the temporary space within the card to the control device; then, the control equipment stores the address range information into a data space, and performs first verification processing according to all the address range information to obtain a first verification value; returning an interface instruction comprising a first check value to the smart card; finally, the smart card responds to the interface instruction and carries out second check processing on the data written into the storage area to obtain a second check value; and comparing the first check value with the second check value, and determining that the check passes and the data is written successfully under the condition that the first check value and the second check value are the same. All data in the smart card after the production is completed can be rapidly checked through the mutual matching of the smart card and the control equipment, and the check efficiency and check coverage rate of the smart card are improved.
According to some embodiments of the present application, in conjunction with fig. 1, the interface module 102 includes a first interface P1; further description of the step "the control device sets the smart card to the personalized state" in step S110 in fig. 3 may include, but is not limited to, steps S111 to S112.
Step S111: the control device sends a first state setting command to the smart card through the first interface.
Step S112: the state identifier of the smart card is set to a first flag by a first state set command, wherein the first flag indicates that the smart card is in a personalized state.
According to some embodiments of the present application, the first state setting command in step S111 is an APDU command.
In some embodiments, the control device may further send a second status setting command to the smart card via the first interface, and set the status identifier of the smart card to a second flag via the second status setting command, wherein the second flag indicates that the smart card is in a normal state. In this normal state, the smart card is unable to execute the personalization instructions, performing the relevant personalization process.
Through steps S111 to S112, the embodiment of the application can relatively quickly adjust the state identifier and the working state of the smart card, and is beneficial to quickly entering detection and verification processing of the smart card.
Step S120 in fig. 3 is further described according to some embodiments of the present application, wherein the "sending address range information stored in the temporary space within the card to the control device" performed by the smart card includes, but is not limited to, the following steps. The smart card is also used to:
if the execution of one personalized instruction is detected to be completed, the address range information stored in the temporary space in the card is sent to the control equipment through the second interface; the temporary space within the card is emptied to buffer address range information for the write action of the next personalization instruction.
Or after detecting that all the personalized instructions are executed, sending the address range information stored in the temporary space in the card to the control equipment through the second interface.
It will be appreciated that in some embodiments, each personalized instruction may be executed by the smart card to generate corresponding address range information, and if each personalized instruction is executed, address range information of all writing actions of the instruction is immediately acquired, and the address range information is stored in the temporary space in the card; then, the address range information is transmitted to the control device through the second interface. After each acquisition, the temporary space in the card is emptied and can be reused. Therefore, a large temporary space in the card is not needed to cache address range information generated by a plurality of personalized instructions; the storage resource of the smart card can be effectively saved.
It will be appreciated that in other embodiments the smart card may also send address range information stored in the temporary space within the card to the control device via the second interface after detecting that all personalization instructions have been executed. Thus, although the memory resource of some smart cards is occupied, the data is not easy to lose, and the reliability is higher.
According to some embodiments of the present application, step S130 in fig. 3 is further described, where "performing the first check processing according to all address range information to obtain the first check value" performed by the control device includes, but is not limited to, steps S131 to S132.
Step S131: generating a data copy which is completely consistent with the data in the intelligent card according to all the address range information;
step S132: and performing first check processing on the data copy to obtain a first check value.
It should be noted that, the data in the smart card in step S131 includes: software code (code), fixed data (data), post personalization data.
After the control device saves the address range information to the data space through steps S131 to S132, reading data according to all the address range information in the data space, and generating a data copy completely consistent with the data in the smart card; and performing first verification processing on the data copy to obtain a first verification value of the whole intelligent card, and laying a data foundation for judging whether the data is successfully written in the intelligent card or not in the follow-up judgment.
According to some embodiments of the present application, in conjunction with fig. 1, the interface module 102 further includes a third interface P3; further describing step S130 in fig. 3, wherein the "return interface command including the first check value to the smart card" performed by the control device includes, but is not limited to, steps S133 to S135.
Step S133: after the first check value is generated, an interface instruction is generated according to address range information stored in the data space and the first check value.
Step S134: and adding the interface instruction to the end of the first personalized script to obtain a second personalized script.
Step S135: and sending the second personalized script to the smart card through the third interface.
It is understood that the interface instruction generated in step S133 includes address range information stored in the data space of the control device and the first check value generated by the control device. The interface instruction is used for instructing the smart card to perform second check processing and check value comparison processing.
It will be appreciated that the addition of the interface instruction to the end of the first personalization script, via step S134, is to ensure that the smart card is able to perform the second verification process after all personalization instructions have been executed.
It can be understood that the number of the smart cards electrically connected with the control device can be one or a plurality of smart cards, and by generating the interface command, after each smart card is personalized after being finished, all data in the card can be timely checked in response to the interface command, rather than only data of a fixed part can be checked. And because the calculation of the check value is relatively fast, the detection can be performed immediately after the production of each card is finished, instead of sampling detection, and the detection coverage in the smart card is 100%.
Through the steps S133 to S135, the smart card can be timely informed to carry out verification processing through the interface instruction, so that the detection efficiency and the production efficiency of manufacturers are improved.
Step S140 in fig. 3 is further described according to some embodiments of the present application, where "the smart card performs the second check processing on the data written in the storage area in response to the interface command to obtain the second check value" includes, but is not limited to, steps S141 to S143.
Step S141: the smart card receives a second personalized script.
Step S142: in response to the interface instructions in the second personalization script, data in the smart card is determined from the address range information.
Step S143: and performing second check processing on the data in the smart card to obtain a second check value.
It can be understood that the verification algorithm adopted by the second verification process performed by the smart card is consistent with the verification algorithm adopted by the first verification process performed by the control device, so that the first verification value and the second verification value can be compared later, and the writing condition of the data in the smart card can be determined.
Step S141 to step S143, the smart card responds to the interface instruction more quickly, carries out second check processing on the data in the smart card to obtain a second check value, and lays a data foundation for judging whether the data is successfully written in the smart card or not.
In summary, in the data downloading and checking system for the smart card provided by the embodiment of the present application, the smart card and the control device may cooperate with each other, and the data downloading and checking method for the smart card provided by the embodiment of the present application is executed, so that all data in the smart card after the production is completed can be checked rapidly, and the checking efficiency and the checking coverage rate of the detected smart card are improved.
In a third aspect, the present application provides a storage medium, which is a computer readable storage medium storing computer executable instructions for implementing a method for downloading and verifying data of a smart card as in any one of the embodiments of the first aspect, when the computer executable instructions are executed by a processor.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
While the preferred embodiments of the present application have been described in detail, the present application is not limited to the above embodiments, and various equivalent modifications and substitutions can be made by those skilled in the art without departing from the spirit of the present application, and these equivalent modifications and substitutions are intended to be included in the scope of the present application.

Claims (10)

1. A method for downloading and verifying data of a smart card, the method being applied to a system for downloading and verifying data of a smart card, the system comprising: the intelligent card and the control equipment are electrically connected with the intelligent card through the interface module; the intelligent card comprises a monitoring module, a temporary space in the card and a storage area; the control device includes a data space;
the data downloading and checking method of the smart card comprises the following steps:
the control device sets the smart card to a personalized state; transmitting all personalization instructions of the first personalization script to the smart card;
in the personalized state, the intelligent card executes the personalized instruction, and when the monitoring module monitors that the storage area is subjected to writing action, address range information of each writing action is recorded and stored in a temporary space in the card; transmitting the address range information stored in the temporary space within the card to the control device;
the control equipment stores the address range information into the data space, and performs first verification processing according to all the address range information to obtain a first verification value; returning an interface instruction comprising the first check value to the smart card;
the intelligent card responds to the interface instruction and carries out second check processing on the data written into the storage area to obtain a second check value; and comparing the first check value with the second check value, and determining that the data is successfully written when the first check value and the second check value are the same.
2. The method for downloading and verifying data of a smart card according to claim 1, wherein the interface module includes a second interface, and the transmitting the address range information stored in the temporary space within the card to the control device includes:
transmitting the address range information stored in the temporary space in the card to the control device through the second interface every time the execution of one personalized instruction is detected to be completed; clearing temporary space in the card to cache the address range information of the write action of the next personalized instruction;
or after detecting that all the personalized instructions are executed, sending the address range information stored in the temporary space in the card to the control equipment through the second interface.
3. The method for downloading and verifying the data of the smart card as set forth in claim 1, wherein the performing the first verification process according to all the address range information to obtain the first verification value includes:
generating a data copy which is completely consistent with the data in the intelligent card according to all the address range information;
and performing first check processing on the data copy to obtain a first check value.
4. The method for downloading and verifying a smart card according to claim 1, wherein the interface module further comprises a third interface;
the return of the interface instruction including the first check value to the smart card includes:
after the first check value is generated, generating the interface instruction according to the address range information stored in the data space and the first check value;
adding the interface instruction to the tail of the first personalized script to obtain a second personalized script;
and sending the second personalized script to the smart card through the third interface.
5. The method for downloading and verifying data from a smart card according to claim 4, wherein the smart card performing a second verification process on the data written into the memory area in response to the interface command to obtain a second verification value, comprises:
the smart card receives the second personalized script;
determining the data in the smart card according to the address range information in response to the interface instructions in the second personalized script;
and performing second check processing on the data in the smart card to obtain a second check value.
6. The method for downloading and verifying a smart card according to claim 1, wherein the interface module comprises a first interface;
the control device sets the smart card to a personalized state, including:
the control device sends a first state setting command to the smart card through the first interface;
and setting a state identifier of the smart card to be a first mark through the first state setting command, wherein the first mark indicates that the smart card is in the personalized state.
7. The method for downloading and verifying data of a smart card as defined in claim 1, wherein the first verification process and the second verification process use the same verification algorithm.
8. The method for downloading and verifying the data of the smart card as defined in claim 1, wherein after comparing the first verification value and the second verification value, further comprising: and under the condition that the first check value and the second check value are different, determining that the check is not passed, and failing to write the data.
9. A data download and verification system for a smart card, comprising: the intelligent card and the control equipment are electrically connected with the intelligent card through the interface module; the intelligent card comprises a monitoring module, a temporary space in the card and a storage area; the control device includes a data space; the control device and the smart card cooperate to perform the data downloading and verification method of the smart card according to any one of claims 1 to 8.
10. A storage medium, characterized in that the storage medium is a computer-readable storage medium storing computer-executable instructions for implementing a data downloading and verification method of a smart card according to any one of claims 1 to 8 when being executed by a processor.
CN202311695266.8A 2023-12-12 2023-12-12 Data downloading and checking method and system for smart card and storage medium Pending CN117391099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311695266.8A CN117391099A (en) 2023-12-12 2023-12-12 Data downloading and checking method and system for smart card and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311695266.8A CN117391099A (en) 2023-12-12 2023-12-12 Data downloading and checking method and system for smart card and storage medium

Publications (1)

Publication Number Publication Date
CN117391099A true CN117391099A (en) 2024-01-12

Family

ID=89468707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311695266.8A Pending CN117391099A (en) 2023-12-12 2023-12-12 Data downloading and checking method and system for smart card and storage medium

Country Status (1)

Country Link
CN (1) CN117391099A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1591864A2 (en) * 2004-04-29 2005-11-02 Giesecke & Devrient GmbH Method for protecting data on a data carrier against DFA - attacks
CN107864109A (en) * 2016-09-22 2018-03-30 上海复旦微电子集团股份有限公司 A kind of NFC applications of IC cards data migration method
CN112965853A (en) * 2021-02-26 2021-06-15 星汉智能科技股份有限公司 Data storage and verification method, device and medium of intelligent card
CN115562579A (en) * 2022-09-28 2023-01-03 广州思睿芯科半导体有限公司 Data storage method, chip and electronic equipment
CN115657976A (en) * 2022-11-04 2023-01-31 中国电信股份有限公司 Card writing method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1591864A2 (en) * 2004-04-29 2005-11-02 Giesecke & Devrient GmbH Method for protecting data on a data carrier against DFA - attacks
CN107864109A (en) * 2016-09-22 2018-03-30 上海复旦微电子集团股份有限公司 A kind of NFC applications of IC cards data migration method
CN112965853A (en) * 2021-02-26 2021-06-15 星汉智能科技股份有限公司 Data storage and verification method, device and medium of intelligent card
CN115562579A (en) * 2022-09-28 2023-01-03 广州思睿芯科半导体有限公司 Data storage method, chip and electronic equipment
CN115657976A (en) * 2022-11-04 2023-01-31 中国电信股份有限公司 Card writing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106843957B (en) System firmware upgrading method and device
CN109964215B (en) Flow control in remote direct memory access data communications with ring buffer mirroring
CN111880740A (en) Data processing method, device, computer system and readable storage medium
CN110457907B (en) Firmware program detection method and device
CN114722387A (en) Database abnormal tampering detection method, device, equipment and storage medium
US6539338B1 (en) Self-diagnostic testing of a network interface adapter
CN113312205B (en) Data verification method and device, storage medium and computer equipment
CN112395129A (en) Storage verification method and device, computing chip, computer equipment and storage medium
CN117391099A (en) Data downloading and checking method and system for smart card and storage medium
CN112925546B (en) Multistage verification method and system for preventing vehicle-mounted ECU from refreshing errors
CN116521405A (en) sd card state detection method, device, equipment and storage medium
CN113268206B (en) Network target range resource hot plug implementation method and system
CN112860283B (en) SP upgrade package self-identification upgrade method and device and computer equipment
CN110572371B (en) Identity uniqueness check control method based on HTML5 local storage mechanism
CN112463019A (en) Data reading method and device
CN111475400A (en) Verification method of service platform and related equipment
CN117271225B (en) FRU information backup method, FRU information backup device and FRU information backup server
CN117215995B (en) Remote direct memory access method, distributed storage system and electronic equipment
CN112751782B (en) Flow switching method, device, equipment and medium based on multi-activity data center
CN117331754B (en) Abnormality problem reduction method, abnormality problem reduction system, electronic device, and computer storage medium
CN114978891B (en) Processing method, device and storage medium for BIOS configuration of network device
US20230185560A1 (en) Information processing device, information processing system and non-transitory computer readable medium
CN113312634A (en) Trust chain transmission method and device, electronic equipment and storage medium
CN116820530A (en) Data transmission system based on IAP technology
CN111597063A (en) Method for testing reliability of software upgrading file of electric energy meter

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination