The card reader of energy customizing flag information
Technical field
The present invention relates to the application of IC cards field, particularly a kind of card reader of energy customizing flag information.
Background technology
Along with popularizing of smart card, the electronic product of its application has also obtained extensive attention.Wherein card reader is modal a kind of.Card reader is applicable to that electronic fare payment system, authentication etc. need be to the fields of smart card information reading writing working, USB interface by hardware inside connects main frame, connect smart card by the interface that meets 7816 agreements, realizing the communication between main frame and the smart card, is the desirable electronic product of authentication, ecommerce, Home Banking, information security, visit and identity control and other Secure Application.
The existing customer propose to buy can customizing flag information card reader, but on the market card reader can not satisfy this requirement at present.Customizing flag information and is to be write direct in the storer of electronic equipment by production firm or client normally in other electronic equipment, and Ding Zhi flag information security is not high like this.
The production technology of storer can be divided into two classes: volatibility and non-volatile.The data that volatile memory is stored after outage can be lost, and nonvolatile memory has the characteristic that can not lose the data of being preserved after the power down, as FLASH, EEPROM, FRAM etc.
When data are encrypted, adopt two class algorithms usually: one-way algorithm and two-way algorithm.
One-way algorithm also claims HASH (Hash) algorithm, is meant under the situation of known operations result and algorithm also the algorithm that can not backwards calculation goes out raw information.One-way algorithm commonly used has MD5, SHA-1, RIPEMD series etc.Hash function has a kind of like this function: it produces the output of regular length to the input information (being commonly called as seed) of different length.The output of this regular length is called former input information " hash " or " Message digest (eap-message digest) ".The hash function H of a safety must have following attribute:
1) H can be applied on the data not of uniform size;
2) H can generate fixed-size output;
3) for any given input information x, the calculating of H (x) is simple relatively, fast;
4) for any given code h, the x that find to satisfy H (x)=h is infeasible on calculating;
5) for any given input information x, find to satisfy H (x)=H (y) and with the unequal y of x on calculating, be infeasible.
Two-way algorithm is meant the algorithm that can encrypt, decipher, promptly can become ciphertext to plain text encryption, also can derive algorithm expressly from ciphertext.The two-way algorithm that has adopts the unsymmetrical key system, and this is meant that encryption key and decruption key are the cryptographic algorithm of two different keys.Exist relation of interdependence between these two keys: promptly the information of utilizing wherein any one secret key encryption to obtain can only be decrypted with another key.
Summary of the invention
In order to satisfy the demand of client's reading card device energy customizing flag information, the invention provides a kind of card reader of energy customizing flag information, comprise control module, usb interface module and 7816 interface modules, described control module links to each other with 7816 interface modules with described usb interface module respectively, also comprise AIM, flag information control module and memory module
Described AIM is used to receive the order that writes flag information of client's input or read the order of flag information and be transferred to described flag information control module, also is used for the flag information that described flag information control module is read is sent to the client;
Described flag information control module, be used for depositing the flag information of customization in described memory module according to the order that writes flag information of client input, also be used for reading flag information and being transferred to described AIM from described memory module according to the order of reading flag information of client's input, an its signal I/O end links to each other with the signal I/O end of described AIM, and another signal I/O end links to each other with the signal I/O end of described memory module;
Described memory module is used to store the flag information of the customization of being sent by described flag information control module.
Described memory module is newly-increased in a described card reader nonvolatile memory or divides a part of memory block of coming out from the original nonvolatile memory of described card reader.
Described flag information control module is an independently newly-increased module, or increases new function realization with software on the basis of described control module.
The present invention also provides a kind of card reader of energy customizing flag information, comprise control module, usb interface module and 7816 interface modules, described control module links to each other with 7816 interface modules with described usb interface module respectively, also comprise AIM, flag information control module, algoritic module and memory module
Described AIM is used to receive the order that writes seed data of client's input or read the order of flag information and be transferred to described flag information control module, also is used for the flag information that described flag information control module is read is sent to the client;
Described flag information control module, be used for the seed data that the client imports being transmitted to described algoritic module and depositing the flag information that described algoritic module calculates in described memory module according to the order that writes seed data of client's input, also be used for reading flag information and being transferred to described AIM from described memory module according to the order of reading flag information of client's input, an its signal I/O end links to each other with the signal I/O end of described AIM, another signal I/O end links to each other with the signal I/O end of described algoritic module, also has a signal I/O end to link to each other with the signal I/O end of described memory module;
Described algoritic module is used to receive the seed data of client's input that described flag information control module transmits and utilizes algorithm that described seed data is calculated flag information, also is used for described flag information is returned to described flag information control module;
Described memory module is used to store the flag information of being sent by described flag information control module that calculates through described algoritic module.
The algorithm that described algoritic module adopts is an one-way algorithm.
Described memory module is newly-increased in a described card reader nonvolatile memory or divides a part of memory block of coming out from the original nonvolatile memory of described card reader.
Described flag information control module is an independently newly-increased module, or increases new function realization with software on the basis of described control module.
The present invention also provides a kind of card reader of energy customizing flag information, comprise control module, usb interface module and 7816 interface modules, described control module links to each other with 7816 interface modules with described usb interface module respectively, also comprise AIM, flag information control module, algoritic module and memory module
Described AIM is used to receive the order that writes seed data of client's input or read the order of flag information and be transferred to described flag information control module, also is used for the flag information that described flag information control module is read is sent to the client;
Described flag information control module, be used for the seed data that the client imports being transmitted to described algoritic module according to the order that writes seed data of client's input, also be used for reading flag information and being transferred to described AIM from described memory module according to the order of reading flag information of client's input, an its signal I/O end links to each other with the signal I/O end of described AIM, a signal output part links to each other with the signal input part of described algoritic module, and a signal input part links to each other with the signal output part of described memory module;
Described algoritic module, be used to receive the seed data of client's input that described flag information control module transmits and utilize algorithm that described data are calculated flag information, also be used for depositing described flag information in described memory module, its signal input part links to each other with a signal output part of described flag information control module, and signal output part links to each other with the signal input part of described memory module;
Described memory module is used to store the flag information of being sent by described algoritic module that calculates through described algoritic module.
The algorithm that described algoritic module adopts is an one-way algorithm.
Described memory module is newly-increased in a described card reader nonvolatile memory or divides a part of memory block of coming out from the original nonvolatile memory of described card reader.
Described flag information control module is an independently newly-increased module, or increases new function realization with software on the basis of described control module.
The invention has the beneficial effects as follows: make card reader have the function of customizing flag information, and improved the security of customizing flag information.
Description of drawings
Fig. 1 is the structural representation of the card reader of the embodiment of the invention one energy customizing flag information;
Fig. 2 is the structural representation of the card reader of the embodiment of the invention two energy customizing flag informations;
Fig. 3 is the structural representation of the card reader of the embodiment of the invention three energy customizing flag informations.
Embodiment
The invention will be further described below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Embodiment one
Referring to Fig. 1, the invention provides a kind of card reader of energy customizing flag information, except that comprising existing control module 101, usb interface module 102 and 7816 interface modules 103, also comprise three newly-increased modules, flag information control module 104, AIM 105 and memory module 106;
Control module 101 links to each other with 7816 interface modules 103 with usb interface module 102 respectively, it can receive the order of the read/write smart card information that main frame sends and the smart card information that reads is returned to main frame by usb interface module 102, by 7816 interface modules 103 it can read in the smart card information or to the smart card writing information;
Usb interface module 102 links to each other with control module 101 with main frame respectively, makes card reader and main frame carry out communication by usb protocol;
7816 interface modules 103 link to each other with control module 101 with smart card respectively, make card reader and smart card carry out communication by 7816 agreements;
A signal I/O end of flag information control module 104 links to each other with the signal I/O end of AIM 105, another signal I/O end links to each other with the signal I/O end of memory module 106, it can receive the order that writes flag information of client's input by AIM 105, and deposit the flag information that the client writes in memory module 106, can also receive order of reading flag information that the client sends and the flag information that will from memory module 106, read and be transferred to the client by AIM 105; Flag information control module 104 can be an independently newly-increased module, also can be to increase new function with software to realize on the basis of control module 101.
AIM 105, be used to receive the client by the order that writes flag information of application software input or the order of reading flag information, and be transferred to flag information control module 104, and output identification information gives the client, and its signal I/O end links to each other with a signal I/O end of flag information control module 104.
Memory module 106, the flag information that is used for the customization that storage mark information Control module 104 sends, it can be newly-increased in a card reader nonvolatile memory, also can be to divide a part of memory block of coming out from the original nonvolatile memory of card reader, its signal I/O end links to each other with another signal I/O end of flag information control module 104.
Utilize the process of the card reader customizing flag information in the present embodiment as follows:
At first the client starts card reader, write the order of flag information then to the card reader input by application software, the AIM 105 of card reader receives the flag information that after this order the client is write and is transferred to flag information control module 104, flag information control module 104 deposits this flag information in memory module 106, thus the customization of complement mark information.The flag information of customization is the sign of card reader, can read by reading device or program that production firm provides.
Embodiment two
In order to improve the security of customization flag information, can also increase an algoritic module 206 in the card reader of the energy customizing flag information in embodiment one, referring to Fig. 2, algoritic module 206 is used to receive the seed data of client's input of being transmitted by flag information control module 204, also be used to utilize algorithm computation seed data generation flag information and return to flag information control module 204, described algorithm can be an one-way algorithm, also can be two-way algorithm, the signal I/O end of algoritic module 206 links to each other with a signal I/O end of flag information control module 204;
What flag information control module 204 that different with embodiment one in addition is received is the seed data that the client passes through AIM 205 inputs, flag information control module 204 does not directly write seed data in the memory module 207, but earlier seed data is transmitted to algoritic module 206, by just in memory module 207, writing flag information after this seed datas generation flag information of algoritic module 206 calculating and the Returning mark information Control module 204, three signal I/O ends of flag information control module 204 respectively with the signal I/O end of AIM 205, the signal I/O end of algoritic module 206 and the signal I/O end of memory module 207 link to each other, all the other contents are all identical with embodiment one, do not repeat them here.
Utilize the process of the card reader customizing flag information in the present embodiment as follows:
At first the client starts card reader, import seed data by application software to card reader then, the AIM 205 of card reader is transferred to flag information control module 204 with seed data, flag information control module 204 is transmitted this seed data and is given algoritic module 206, algoritic module 206 returns to flag information control module 204 after utilizing algorithm that seed data is calculated flag information, by flag information control module 204 flag information is stored in the memory module 207, thus the customization of complement mark information.The flag information of customization is the sign of card reader, can read by reading device or program that production firm provides.
Embodiment three
Referring to Fig. 3, different with embodiment two is that algoritic module 306 does not return to flag information control module 304 after the seed data that utilizes algorithm computation client input generates flag information, but directly flag information is deposited in memory module 307, a signal input part of algoritic module 306 links to each other with a signal output part of flag information control module 304, another signal output part links to each other with a signal input part of memory module 307, other guide is all identical with embodiment two, just repeats no more at this.
Utilize the process of the card reader customizing flag information in the present embodiment as follows:
At first the client starts card reader, import seed data by application software to card reader then, the AIM 305 of card reader is transferred to flag information control module 304 with seed data, flag information control module 304 is transmitted this seed data and is given algoritic module 306, algoritic module 306 is stored in it in memory module 307 after utilizing algorithm that seed data is calculated flag information, thus the customization of complement mark information.The flag information of customization is the sign of card reader, can read by reading device or program that production firm provides.
Above-described embodiment, the present invention embodiment a kind of more preferably just, the common variation that those skilled in the art carries out in the technical solution of the present invention scope and replacing all should be included in protection scope of the present invention.