Background technology
(BANK Card) is more and more universal as the means of payment for bank card, common bank card paying system comprises point of sales terminal (Point Of Sale, POS), POS receives single system (POSP), code keypad (PIN PAD) and hardware encipher machine (Hardware and Security Module, HSM).Wherein POS terminal can be accepted bank card information, has communication function, and the instruction of accepting teller completes financial transaction information and the equipment of exchange for information about; POS receives single system POS terminal is managed concentratedly, comprises parameter downloads, and key is downloaded, and accepts, processes or forward the transaction request of POS terminal, and to POS terminal loopback transaction results information, is the system of centralized management and trading processing; Code keypad (PIN PAD) is that the relevant key of various financial transactions is carried out to safe storage protection, and the safety means that PIN are encrypted to protection; Hardware encipher machine (HSM) is to the peripheral hardware equipment that is encrypted of transmission data, for correctness and the storage key of encryption and decryption, checking message and the document source of PIN.Personal identification code (Personal Identification Number, PIN), personal identification number, is the data message of identifying holder's identity legitimacy in on-line transaction, in cyber-net system, any link does not allow to occur in mode expressly; Terminal master key (Terminal Master Key, TMK), during POS terminal works, the master key that working key is encrypted, encrypting storing is in system database; POS terminal is widely used in bank card and pays occasion, such as manufacturer's shopping, hotel's lodging etc., is a kind of indispensable modernization means of payment, has incorporated the various occasions of people's life.Bank card; debit card particularly; generally all by holder, be provided with PIN; in carrying out payment process; POS terminal is except above sending the data such as magnetic track information of bank card; also want holder to input the checking holder's of PINGong issuing bank identity legitimacy, guarantee bank card safety of payment, protection holder's property safety.In order to prevent that PIN from revealing or being cracked; requirement is from terminal to issuing bank in whole information interactive process; whole process is carried out safety encipher protection to PIN; do not allow any link in computer network system; PIN occurs in mode expressly, so the POS terminal of the PIN of acceptance input at present all requires to be equipped with key management system.
The key code system of POS terminal is divided into secondary: terminal master key (TMK) and working key (WK).Wherein TMK, in WK renewal process, is encrypted protection to WK.Between every POS terminal and POS, share unique TMK, must have safeguard protection, assurance can only write device and is participated in calculating, and can not read; TMK is a very crucial root key, if TMK is intercepted, working key is just cracked than being easier to, by serious threat bank card safety of payment.So can secure download TMK to POS terminal, become the key of whole POS terminal security.Conclude existing TMK download scenarios below as follows:
1, the female POS scheme of key: user receives single system hardware encipher machine and the same traffic encryption key of the female POS input of key at POS.POS terminal is received single system initiating terminal master key download request by the female POS of key to POS, POS receives single system and drives hardware encipher machine to generate at random terminal master key, and by traffic encryption key encrypted transmission to the female POS of key, the female POS of key is with being transferred to POS terminal after traffic encryption key deciphering again, POS terminal obtains terminal master key expressly, be saved in POS terminal password keyboard, thereby realize POS terminal and POS, receive the synchronous of terminal master key between single system.
2, IC-card decrypt scheme: user receives single system hardware encipher machine and injects the same traffic encryption key in IC-card at POS.User inserts POS terminal by IC-card, POS terminal is received single system initiating terminal master key download request to POS, POS receives single system and drives hardware encipher machine to generate at random terminal master key, and by traffic encryption key encrypted transmission to POS terminal, traffic encryption key deciphering terminal master key ciphertext in IC-card for POS terminal, obtain terminal master key expressly, be saved in POS terminal password keyboard, thereby realize POS terminal and POS, receive the synchronous of terminal master key between single system.
Above-mentioned two schemes has following shortcoming: terminal master key expressly appears at outside safety means, and for taking precautions against Key Exposure risk, the safe machine room that the download of terminal master key must be controlled at administrative center carries out, by the artificial download terminal master key of concentrating.Thereby bring, " maintenance centre's machine room workload is large; After equipment dispatches from the factory, need to be transported to administrative center's safe machine room download key and just can be deployed to trade company, cost of transportation rises; In order to concentrate lower dress key, need a large amount of staff and operating time, maintenance cost is large, maintenance period is long " etc. problem.
Summary of the invention
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is to provide the acquisition method of a kind of transmission security key TK, comprises step:
S1, operating terminal read operation person block the operation certificate of storage, and verification operation certificate legitimacy;
S2, after the legitimate verification of operation certificate passes through, operating terminal obtains the transmission security key TK that POS terminal sends;
S3, operating terminal are used the private key of the operation certificate of operator's card to carry out signature operation to transmission security key TK, and the TK data after signature are sent to MTMS system, and the TK data after signature comprise transmission security key TK, operation certificate, signed data;
The legitimacy of S4, MTMS system verification operation certificate and signed data, if legal, is stored in database by the TK data after signature.
Another technical scheme of the present invention is for providing the acquisition system of a kind of transmission security key TK, comprise MTMS system, at least one operating terminal being connected with MTMS system communication and at least one the POS terminal being connected with operating terminal, described operating terminal comprises the first authentication module, acquisition module and the first sending module; Described MTMS system comprises the second authentication module and memory module;
The first authentication module blocks the operation certificate of storage for read operation person, and verification operation certificate legitimacy;
Acquisition module, for after confirming that when the first authentication module the legitimate verification of operation certificate passes through, obtains the transmission security key TK that POS terminal sends;
The first sending module is for using the private key of the operation certificate that operator blocks to carry out signature operation to transmission security key TK, and the TK data after signature are sent to MTMS system, and the TK data after signature comprise transmission security key TK, operation certificate, signed data;
The second authentication module is for verifying operation certificate that MTMS system receives and the legitimacy of signed data;
Memory module, for after confirming that when the second authentication module the legitimate verification of operation certificate and signed data passes through, is stored in database by the TK data after signature.
Beneficial effect of the present invention: in method and system of the present invention, when the secret key TK data operable terminal of transmission gathers, operating terminal is used operator's private key sign and enclose operation certificate transmitting secret key TK data, together uploads onto the server.When server receives TK data, the legitimacy of the legitimacy of meeting certifying signature and operation certificate, if the TK data that illegal direct rejection gathers.The present invention can guarantee the integrality of the TK data of collection, and when corresponding POS terminal remote is downloaded, main secret key goes wrong and corresponding TK data go wrong, and can find by the signing certificate of TK data concrete operating personnel.
Embodiment
By describing technology contents of the present invention, structural feature in detail, being realized object and effect, below in conjunction with execution mode and coordinate accompanying drawing to be explained in detail.
For solving the technical problem existing in background technology, the present invention adopts a kind of new master key download scenarios, by POS terminal, produce at random TK(Transmission Key, transmission security key), TK after producing is stored in the code keypad of POS terminal, and TK is sent to KMS(Key Management System by transmission means required under various application scenarioss, key management system, for office terminal master key TMK).
When POS terminal to apply download terminal master key TMK, KMS system is used TK to encrypt terminal master key TMK, and the terminal master key ciphertext after encrypting is sent to POS terminal, POS terminal is decrypted master key ciphertext with TK after receiving, obtain terminal master key TMK, and terminal master key TMK is kept in code keypad.
So, by TK, encrypt terminal master key TMK, make TMK can carry out remote transmission, facilitate the secure download of TMK.
Under some scene, adopt operating terminal to gather the TK that POS terminal produces, and be responsible for TK to be transferred to MTMS system (Material Tracking Management System by operating terminal, Tracing Material system, mainly in plant produced, use), by MTMS systematic unity management TK, and TK is sent to corresponding KMS system, described course of conveying YouCA center (Certificate Authority, certificate granting center, adopt Public Key Infrastructure public key infrastructure technology, network ID authentication service is provided specially, be responsible for signing and issuing and managing digital certificate, and third party's trust authority with authoritative and fairness) differentiate operating terminal, the identity of MTMS system and KMS system.Adopt operating terminal to gather TK and can facilitate the acquisition operations (can realize a key collection etc.) of TK and the rights management that TK gathers; Employing MTMS system can be conveniently to TK unified management, and during convenient after-sales service later, data search and the download of POS terminal, can realize by manufacture order bulk transfer TK by MTMS system, facilitates the transfer management of TK, prevents that TK from misinformating to wrong object; Introduce CA center and can prevent that pseudo-terminal and pseudo-KMS system from stealing TK.
Above-mentionedly by POS terminal, gather and to be sent to bank's end after transmission security key TK TMK is encrypted, then by the method that POS terminal remote is downloaded the TMK after TK encrypts, can guarantee the transmission security of TMK.When operating terminal gathers the TK of POS terminal generation, owing to having a lot of operating personnel, there are authority use operating terminal collection TK data, afterwards for convenient management management and control, need to inquire concrete TK is by which operating personnel's control operation terminal to be gathered, and need to guarantee to gather TK data integrity, therefore this scheme is proposed for head it off.
Below just the present invention is overcome to the problems referred to above technical scheme be elaborated.
Referring to Fig. 1, is the flowchart of the acquisition method of a kind of transmission security key TK of the present invention, and the method comprising the steps of:
S1, operating terminal read operation person block the operation certificate of storage, and verification operation certificate legitimacy;
S2, after the legitimate verification of operation certificate passes through, operating terminal obtains the transmission security key TK that POS terminal sends;
S3, operating terminal are used the private key of the operation certificate of operator's card to carry out signature operation to transmission security key TK, and the TK data after signature are sent to MTMS system, and the TK data after signature comprise transmission security key TK, operation certificate, signed data;
The legitimacy of S4, MTMS system verification operation certificate and signed data, if legal, is stored in database by the TK data after signature.
In the present embodiment, after described step S4, also comprise transmission security key forwarding step, specifically comprise:
When receiving TK, obtain when request, MTMS system reads the TK data after the signature of storage, and the legitimacy of certifying signature data;
After the legitimate verification of signed data passes through, MTMS system turns encrypted transmission cipher key T K and the transmission security key TK that turns encryption is sent to KMS system.
In the present embodiment, the signature operation in described step S3 specifically comprises step:
Operating terminal calculates cryptographic Hash Hash1 to transmission security key TK and signature time T ime_sign;
Use operation certificate corresponding private key WCRT_prk to encrypt generating ciphertext C_sign to cryptographic Hash Hash1, this ciphertext is signed data C_sign.
In the present embodiment, described step S4 specifically comprises:
MTMS system receives after the TK data after signature, the legitimacy of verification operation certificate;
Verify legal after, from operation certificate, extract PKI WCRT_pu, the WCRT_pu that uses public-key is decrypted signed data C_sign, obtains expressly Hash2;
Transmission security key TK and signature time T ime_sign are calculated to Hash, generate cryptographic Hash Hash3;
Whether Hash2 is consistent with Hash3 in contrast, if consistent decision data is not distorted, if inconsistent, decision data is distorted.
Referring to Fig. 2, is the structured flowchart of the acquisition system of a kind of transmission security key TK of the present invention.The acquisition method of above-mentioned a kind of transmission security key TK is applied in this system.
The acquisition system 1 of described transmission security key TK comprisesMTMS system 20, at least oneoperating terminal 10 communicating to connect withMTMS system 20 and at least one thePOS terminal 30 being connected with operating terminal, and describedoperating terminal 10 comprises the first authentication module 11,acquisition module 12 and thefirst sending module 13; Described MTMS system comprises thesecond authentication module 21 andmemory module 22;
The first authentication module 11 blocks the operation certificate of storage for read operation person, and verification operation certificate legitimacy;
Acquisition module 12, for after confirming that when the first authentication module the legitimate verification of operation certificate passes through, obtains the transmission security key TK that POS terminal sends;
Thefirst sending module 13 carries out signature operation for the private key of the operation certificate that uses operator and block to transmission security key TK, and the TK data after signature are sent to MTMS system, and the TK data after signature comprise transmission security key TK, operation certificate, signed data;
Thesecond authentication module 21 is for the operation certificate verifying MTMS system and receive and the legitimacy of signed data;
Memory module 22, for after confirming that when the second authentication module the legitimate verification of operation certificate and signed data passes through, is stored in database by the TK data after signature.
In the present embodiment, describedMTMS system 20 also comprises the 3rd authentication module and the second sending module;
The 3rd authentication module is for reading the TK data after the signature that described database stores, and the legitimacy of certifying signature data;
The second sending module, for after the 3rd authentication module determines that the legitimate verification of described signed data passes through, turns encrypted transmission cipher key T K and the transmission security key TK that turns encryption is sent to KMS system.
In the present embodiment, described thefirst sending module 13 specifically comprises the first computing module, encrypting module;
The first computing module is for calculating cryptographic Hash Hash1 to transmission security key TK and signature time T ime_sign;
Encrypting module is used for using operation certificate corresponding private key WCRT_prk to encrypt generating ciphertext C_sign to cryptographic Hash Hash1, and this ciphertext is signed data C_sign.
In the present embodiment, described the 3rd authentication module specifically comprises the 4th authentication module, deciphering module, the second computing module, judge module;
The 4th authentication module is used for after the TK data after receiving signature, the legitimacy of verification operation certificate;
Deciphering module, for after the 4th authentication module checking is legal, extracts PKI WCRT_pu from operation certificate, and the WCRT_pu that uses public-key is decrypted signed data C_sign, obtains expressly Hash2;
The second computing module, for transmission security key TK and signature time T ime_sign are calculated to Hash, generates cryptographic Hash Hash3;
Whether judge module is used for contrasting Hash2 consistent with Hash3, if consistent decision data is not distorted, if inconsistent, decision data is distorted.
Beneficial effect of the present invention: transmission security key TK of the present invention is random generation, transmitting procedure is also sealed, TMK expressly there will not be outside safety storage apparatus, in transmitting procedure, be all to utilize PKI to be encrypted, TMK ciphertext just can be untied in the encryption equipment of TMS, has very high fail safe.
When the secret key TK data operable terminal of transmission gathers, operating terminal is used operator's private key sign and enclose operation certificate transmitting secret key TK data, together uploads onto the server.When server receives TK data, the legitimacy of the legitimacy of meeting certifying signature and operation certificate, if the TK data that illegal direct rejection gathers.The present invention can guarantee the integrality of the TK data of collection, and when corresponding POS terminal remote is downloaded, main secret key goes wrong and corresponding TK data go wrong, and can find by the signing certificate of TK data concrete operating personnel.
The foregoing is only embodiments of the invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes specification of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.