Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Please refer to Fig. 1, is the schematic flow sheet of first embodiment of a kind of gate inhibition's authentication method provided by the invention, and said authentication method comprises:
Step S11, whether the sub-key that card reader is judged its private cipher key and the said card reader appointment of gate inhibition Ka Nei authentication success; Wherein, said gate inhibition's card internal memory contains at least two sub-keys that have common female key;
Wherein, at least two sub-keys that have common female key of the private cipher key of card reader and gate inhibition's card storage all are to be write in advance by the key management system under it.
Particularly, a card reader is provided and managed to the key management system of each nuclear power plant area (claiming tier-2 department again) of the same nuclear power subordinate of enterprise respectively.The private cipher key of the card reader storage of each nuclear power plant area has a common female key.Usually, each key management system is identification number of private cipher key definition of the card reader of its management, with the authentication of convenience with the sub-key of gate inhibition's card.
Wherein, the initialization of gate inhibition's card then can be carried out by the unified key management system of the department's (claiming the one-level part again) that manages each nuclear power plant area.Behind gate inhibition's card initialization; The key management system of each nuclear power plant area all can write sub-key to this gate inhibition Ka Nei; The identification number of each its sub-key that writes of key management system definition; The identification number coupling (identical or corresponding) of the private cipher key in this identification number and its card reader of managing is used to distinguish the sub-key that each nuclear power on-site meets authorising conditional (condition of promptly opening the door).Wherein, each key management system all can be to the reason that this gate inhibition Ka Nei writes sub-key: the initialization of gate inhibition's card is to be carried out by the unified key management system of each key management system of management.
In this step, because gate inhibition's card internal memory contains at least two sub-keys that have common female key, therefore, before card reader and said gate inhibition sticked into capable key authentication, card reader also need be specified the sub-key of the gate inhibition's card that carries out authentication with it.Because the different sub key of gate inhibition's card storage makes a distinction with identification number, therefore, card reader can be specified the sub-key of the gate inhibition's card that carries out authentication with it through the mode of appointment with the identification number of the identification number coupling of the private cipher key of its storage.
In this step, if the sub-key authentication success that card reader is judged its private cipher key and its appointment of gate inhibition Ka Nei then flow process get into step S12, as if authentification failure, then withdraw from identifying procedure.
Step S12, said card reader is obtained its data message of asking said gate inhibition's card to return.
Step S13, said card reader sends to gate inhibition's control terminal with the said data message that obtains, and receives the checking message of successful that said gate inhibition's control terminal verifies that said data message returns after correct.
Card reader is given gate inhibition's control terminal with the data information transfer of the gate inhibition's card that obtains, and gate inhibition's control terminal then returns the checking message of successful to card reader, and opens the door when this data message that obtains of checking is legal.
In the present embodiment, because gate inhibition's card stores a plurality of sub-keys that have common female key, therefore, this gate inhibition's card can carry out authentication with the card reader of a plurality of key management system management, thereby has realized the mutual authentication of gate inhibition's card and a plurality of card reader.If gate inhibition's card is distinguished authentication successs with a plurality of card reader respectively, then these a plurality of card reader all can be obtained the data message of this gate inhibition's card, and give gate inhibition's control terminal with this data information transfer.Gate inhibition's control terminal, then opens the door when legal at this data message that obtains of checking, and is like this then realized that the nuclear power personnel of use gate inhibition card are capable at the all-purpose card of each nuclear power plant area of the same nuclear power subordinate of enterprise.
Please refer to Fig. 2, is the schematic flow sheet of the embodiment of step S12 among the present invention embodiment shown in Figure 1,
Said method comprises:
Step S23, said card reader is sent random information and is given said gate inhibition's card; Said random information comprises ciphertext part and plaintext part, and said ciphertext is partly encrypted with said transmission security key, is used to the data message of indicating the said gate inhibition's card of said card reader request to return; Said plaintext partly is used to the sub-key of specifying said gate inhibition Ka Nei and said card reader to carry out authentication;
Wherein, the private cipher key of card reader specifically comprises transmission security key and root key, and this transmission security key and root key all are to be write by the key management system under the card reader.Wherein, the data message that returns of the said gate inhibition's card of said card reader request specifically can be the sequence number that is used to identify said gate inhibition's card.
Step S24, said card reader receives said gate inhibition and is stuck in the data message that returns after the said random information of deciphering;
Wherein, the gate inhibition is stuck in return data information and gives before the card reader, also needs to carry out:
The random information that the said card reader of said gate inhibition's card receiver is sent; And obtain the plaintext part in the random information; And according to the expressly indication of part; Judge that in a plurality of sub-keys of its stored, which sub-key is the sub-key that carries out authentication with it of card reader appointment, and obtain the sub-key of this appointment.Wherein, the sub-key of gate inhibition's card stored comprises sub-transmission security key and sub-root key.
Can the sub-transmission security key that said gate inhibition's card is used the card reader appointment goes to decipher the ciphertext part in the said random information, and judge and decipher said ciphertext part; If can decipher said ciphertext part, then, return the data message that the card reader request is returned according to the indication of the part of the ciphertext after decryption processing.Wherein, when returning this data message, need to use the sub-root key of said card reader appointment to encrypt.Wherein, this data message can be the sequence number that is used for unique identification gate inhibition card.
Step S25, said card reader judges that can said root key decipher the data message that said gate inhibition's card returns;
In this step, can decipher said data message if judge said root key, then flow process gets into step S26, if can not decipher, then withdraws from identifying procedure.
Step S26, if can decipher said data message, then said card reader is confirmed authentication success.
Further, before execution in step S23, also comprise:
Step S21, said card reader judges whether to sense said gate inhibition's card;
In this step, card reader is outwards sent electromagnetic wave with certain frequency period property ground, when gate inhibition's card gets into the electromagnetic scope of card reader transmission; Then said gate inhibition's card is sensed in the card reader judgement; And get into step S22, whether if fail to sense gate inhibition's card, then continuing induction has gate inhibition's card.
Step S22, said card reader is obtained random information from its inside, and uses said transmission security key to encrypt the ciphertext part in the said random information.
In the present embodiment, card reader is obtained random information when sensing gate inhibition's card, and uses transmission security key to encrypt the ciphertext part in the random information, and receives the data message that gate inhibition's card returns, thereby has realized the appointment and the authentication of the sub-key of gate inhibition's card.
Please refer to Fig. 3, is the schematic flow sheet of embodiment of the private cipher key generation method of a kind of card reader provided by the invention, and said method comprises:
Step S31, the one-level encryption equipment generates at least two different root keys, and with the root key corresponding stored that generates at least two different secondary encryption equipments;
In concrete the realization, the one-level encryption equipment generates at least two different root keys, comprising:
The one-level encryption equipment receives the key seed of at least two user's inputs;
Wherein, the key seed of at least two user's inputs can be identical, also can be different.The one-level encryption equipment need receive the reason that at least two users import key seed: the security of the female key that guarantees to generate.All users that the one-level encryption equipment has only acquisition to hold key seed import after the key seed, could produce identical female key.
The one-level encryption equipment according to female key schedule, generates female key according to the said key seed that receives;
Wherein, described female key schedule comprises the enciphering and deciphering algorithm that gate control system is required.The enciphering and deciphering algorithm of the key seed that receives according to gate control system calculated, can generate female key of specified type T, version V and index I.
The one-level encryption equipment receives at least two different service dispersion factors of user's input, according to female key decentralized algorithm, said female key is dispersed at least two different root keys.
Wherein, described female key decentralized algorithm comprises the key decentralized algorithm in gate inhibition field.Professional dispersion factor in this step is called the key dispersion factor again.The one-level encryption equipment has common female key according at least two different root keys that the key decentralized algorithm generates.And, then become the root key of each nuclear power plant area by each root key that female key branch sheds.Usually, female key that the one-level encryption equipment generates is by the primary department management of nuclear power enterprise, and the distribution of each root key that one-level encryption equipment branch sheds is also managed by the primary department of nuclear power enterprise with monitoring.
Wherein, the one-level encryption equipment with the purpose that said at least two different root keys deposit in the secondary encryption equipment is: guarantee the security of the sub-key of generation.
In concrete the realization, the one-level encryption equipment can be derived the root key of specified type T, version V and index I under the protection of specifying the protection key, and it is deposited in the secondary encryption equipment, for example, deposits among the different USB-Key.Each nuclear power plant area (tier-2 department) has the USB-Key of unique this root key of storage, and so, primary department has then been accomplished the distribution of root key.There is unique key management system of managing its root key independently in each nuclear power plant area, and the key management system of each nuclear power plant area can not produce and influences each other.Can understand like this, the quantity of the key management system of secondary part and the quantity of secondary encryption equipment are one to one, and a nuclear power plant area correspondence has a key management system and a secondary encryption equipment that obtains from primary department.
Step S32, said at least two different secondary encryption equipments according to the root key of its storage and the base condition code of its corresponding key management system input, according to the private cipher key generating algorithm of storing separately, generate corresponding private cipher key respectively.
Because each root key that the one-level encryption equipment will be dispersed into is stored to the secondary encryption equipment, and this secondary encryption equipment is disperseed each nuclear power plant area to the same nuclear power subordinate of enterprise.And; There are independently a key management system and a secondary encryption equipment that obtains from primary department in each nuclear power plant area; Therefore; The base condition code that the secondary encryption equipment that each nuclear power plant area is had then can be imported according to root key and its corresponding key management system of its storage respectively, according to the private cipher key generating algorithm of its storage, the private cipher key of the card reader that corresponding generation is corresponding.Wherein, the base condition code of key management system input is used for the unique nuclear power plant area under the same nuclear power of the unique identification enterprise.Because the root key of the secondary encryption equipment that different IPs power plant district is had storage is different; And the base condition code of the key management system that the secondary encryption equipment receives input is different; The private cipher key generating algorithm of its storage also might be different, and the so last private cipher key that generates is different certainly.It is understandable that because the root key of each nuclear power plant area has a common female key, the private cipher key that the secondary encryption equipment of so last each nuclear power plant area generates also has common female key.
After the secondary encryption equipment generated private cipher key, the key management system that this secondary encryption equipment is corresponding was also derived the private cipher key of generation, and it is write in the card reader.
Particularly, the process that writes in the card reader of key management system private cipher key that the secondary encryption equipment is generated comprises:
(1) obtains transmission security key and root key from the secondary encryption equipment, be stored in respectively in two different cards, these two cards are called transmission security key card and root key card respectively at this.
Particularly, the generative process of transmission security key card is:
Key management system is through calling the key derivation service interface of secondary encryption equipment (like USB-Key); And after USB-Key send to specify the message of type T, version V and index I of transmission security key of card reader, can receive the transmission security key that USB-Key returns.Key management system can write this transmission security key that gets access in the card, thereby form the transmission security key card after USB-Key gets access to transmission security key.
The generative process of root key card is:
Key management system is through calling the key derivation service interface of USB-Key, and after USB-Key sends the message of type T, version V and index I of the transmission security key of specifying card reader, can receive the transmission security key that USB-Key returns.Key management system can write this transmission security key that gets access in the card after USB-Key gets access to transmission security key.After the transmission security key that key management system sends is received in this clamping, under the protection of its initial master control key, the storage transmission key, and return transmission security key storage message of successful and give card sending system.
Key management system receives after the transmission security key storage message of successful that this card returns; Through calling the key derivation service interface of USB-Key; And after USB-Key send to specify the message of type T, version V and index I of root key of card reader, can receive the root key that USB-Key returns.Key management system can write this card with this root key that gets access to, thereby form the root key card after USB-Key gets access to root key.
(2) the card reader private cipher key writes
Write the transmission security key of card reader, particularly, the transmission security key of storing in the transmission security key card is write among the SAM of card reader.
Write the root key of card reader, particularly, under the protection of this transmission security key that writes, the root key of storing in the root key card is write among its SAM of card reader, thereby accomplished writing of card reader private cipher key.
Please refer to Fig. 4, is the schematic flow sheet of embodiment of the sub-key generation method of a kind of gate inhibition's card provided by the invention, and said method comprises:
Step S41, the one-level encryption equipment generates at least two different root keys, and with the root key corresponding stored that generates at least two different secondary encryption equipments;
Step S42, said at least two different secondary encryption equipments according to the base condition code of card sending system input and the root key of its storage, according to the private cipher key generating algorithm of storing separately, generate corresponding private cipher key respectively;
In the present embodiment, the operation of step S41-S42 is identical with the operation of step S31-S32 among the embodiment shown in Figure 3, repeats no more at this.
Step S43, said at least two different secondary encryption equipments according to the customer identification number of its corresponding key management system input, according to the sub-key decentralized algorithm of storing separately, are dispersed into the private cipher key of its storage the sub-key of correspondence respectively.
Wherein, the secondary encryption equipment receives the different customer identification number of its corresponding key management system input, and the sub-key of so corresponding generation also is different.After the secondary encryption equipment generated sub-key, key management system also write the sub-key that generates in the subscriber card.
Particularly; Key management system calls the key derivation service interface of secondary encryption equipment (like USB-Key); And after USB-Key send to specify the message of type T, version V and index I of master control key of gate inhibition's card, can receive the master control key that USB-Key returns.Key management system can write this master control key that gets access in gate inhibition's card after USB-Key gets access to master control key.
Further, key management system writes the message of successful family receiving the master control key that gate inhibition's card returns, and under the protection of the master control key of said write, writes the sub-key of gate inhibition's card, specifically comprises:
Key management system is through calling the key derivation service interface of USB-Key, and after USB-Key sends the message of type T, version V and index I of the transmission security key of specifying gate inhibition's card, can receive the transmission security key that USB-Key returns.Key management system can write gate inhibition's card with this transmission security key that gets access to after USB-Key gets access to transmission security key.
Key management system receives transmission security key and writes after the message of successful, also obtains root key from USB-Key.Particularly; Card sending system is through calling the key distribution services interface of USB-Key; And after USB-Key send to specify the type T, version V, index I of the transmission security key of gate inhibition's card (specifying the sequence number of gate inhibition's card), can receive the root key that USB-Key returns.Key management system can write gate inhibition's card with this root key that gets access to after USB-Key gets access to root key.
Need to prove that arbitrary key management system of each nuclear power plant area all can be according to above-mentioned described method, the sub-key that its secondary encryption equipment that has is generated writes gate inhibition's card.
Above-mentioned authentication method to a kind of gate inhibition's card provided by the invention has carried out description detailed, below, in conjunction with Fig. 5-7, the system that adopts above-mentioned authentication method to carry out the authentication of gate inhibition's card is described in detail.
As shown in Figure 5, be the structural representation of first embodiment of a kind of gate inhibition's Verification System disclosed by the invention, said Verification System comprises: card reader 51, gate inhibition's card 52 and gate inhibition's control terminal 53;
Wherein, said card reader 51, whether the sub-key that is used to judge its private cipher key and the said card reader appointment of said gate inhibition Ka Nei authentication success; And when authentication success, obtain the data message that it asks said gate inhibition's card to return; Wherein, said gate inhibition's card internal memory contains at least two sub-keys that have common female key;
Wherein, at least two sub-keys that have common female key of the private cipher key of card reader and gate inhibition's card storage all are to be write in advance by the key management system under it.
Particularly, a card reader is provided and managed to the key management system of each nuclear power plant area (claiming tier-2 department again) of the same nuclear power subordinate of enterprise respectively.The private cipher key of the card reader storage of each nuclear power plant area has a common female key.Usually, each key management system is identification number of private cipher key definition of the card reader of its management, with the authentication of convenience with the sub-key of gate inhibition's card.
Wherein, the initialization of gate inhibition's card then can be carried out by the unified key management system of the department's (claiming the one-level part again) that manages each nuclear power plant area.Behind gate inhibition's card initialization; The key management system of each nuclear power plant area all can write sub-key to this gate inhibition Ka Nei; The identification number of each its sub-key that writes of key management system definition; The identification number coupling (identical or corresponding) of the private cipher key in this identification number and its card reader of managing is used to distinguish the sub-key that each nuclear power on-site meets authorising conditional (condition of promptly opening the door).Wherein, each key management system all can be to the reason that this gate inhibition Ka Nei writes sub-key: the initialization of gate inhibition's card is to be carried out by the unified key management system of each key management system of management.
Wherein, because gate inhibition's card internal memory contains at least two sub-keys that have common female key, therefore, before card reader and said gate inhibition sticked into capable key authentication, card reader also need be specified the sub-key of the gate inhibition's card that carries out authentication with it.Because the different sub key of gate inhibition's card storage makes a distinction with identification number, therefore, card reader can be specified the sub-key of the gate inhibition's card that carries out authentication with it through the mode of appointment with the identification number of the identification number coupling of the private cipher key of its storage.
Said gate inhibition's card 52 is used to return the data message that said card reader 51 requests return and gives said card reader 51;
Said gate inhibition's control terminal 53 is used to receive the said data message that obtains that said card reader 51 is sent, and after the said data message of checking is correct, returns the checking message of successful and give said card reader.
Card reader 52 is given gate inhibition's control terminal 53 with the data information transfer of the gate inhibition's card that obtains, and gate inhibition's control terminal 53 then returns the checking message of successful to card reader 51, and opens the door when this data message that obtains of checking is legal.Wherein, whether legal method is a technology well-known to those skilled in the art to the data message that gate inhibition's card returns, and is not described in detail at this.
In the present embodiment, because gate inhibition's card stores a plurality of sub-keys that have common female key, therefore, this gate inhibition's card can carry out authentication respectively with the card reader of a plurality of key management system management, thereby has realized the mutual authentication of gate inhibition's card and a plurality of card reader.If gate inhibition's card respectively with a plurality of card reader authentication successs, then this a plurality of card reader all can be obtained the data message of this gate inhibition's card, and with this data information transfer to gate inhibition's control terminal.Gate inhibition's control terminal then opens the door when this data message that obtains of checking is legal.Like this then realized using the nuclear power personnel of this gate inhibition's card capable at the all-purpose card of each nuclear power plant area of the same nuclear power subordinate of enterprise.
Please refer to Fig. 6, is the structural representation of the embodiment of a kind of card reader provided by the invention, and said card reader comprises:
First transceiver module 61 is used to send random information and gives said gate inhibition's card 51; Said random information comprises ciphertext part and plaintext part, and said ciphertext is partly encrypted with said transmission security key, is used to the data message of indicating said card reader request gate inhibition card to return; Said plaintext partly is used to the sub-key of specifying said gate inhibition Ka Nei and said card reader to carry out authentication;
Wherein, the private cipher key of said card reader comprises transmission security key and root key.
Said first transceiver module 61 also is used to receive said gate inhibition and is stuck in the data message that returns after the said random information of deciphering;
First judge module 62 is used to judge that can said root key decipher the data message that said first transceiver module 61 receives;
Confirm module 63, be used in the judged result of said first judge module 62 confirming said card reader authentication success when being.
Further, said card reader also comprises:
Induction module 64 is used for induction and whether has said gate inhibition's card;
Card reader is outwards sent electromagnetic wave with certain frequency period property ground; When gate inhibition's card 51 gets into the electromagnetic scope of card reader transmission; Then induction module 64 can be sensed said gate inhibition's card, and whether if induction module 64 fails to sense gate inhibition's card, then continuing induction has gate inhibition's card.
Obtain encrypting module 65, be used in the judged result of said induction module 64 obtaining random information from its inside, and using said transmission security key to encrypt the ciphertext part in the said random information when being;
Said first transceiver module 61 is used for the said random information that obtains after encrypting module 65 is encrypted is sent to gate inhibition's card.
In the present embodiment; Obtain encrypting module when induction module is sensed gate inhibition's card, obtain random information, and use transceiver module to send random information to gate inhibition's card; And receive the data message that gate inhibition's card returns, thereby the appointment and the authentication of the sub-key of gate inhibition's card have been realized.
Please refer to Fig. 7, is the structural representation of a kind of gate inhibition's card provided by the invention, and said gate inhibition's card comprises:
Second transceiver module 71 is used to receive the random information that said card reader is sent;
Wherein, the sub-key of gate inhibition's card comprises: sub-transmission security key and sub-root key.
Acquisition module 72, the random information that is used for receiving according to said second transceiver module 71 is the indication of part expressly, obtains the sub-transmission security key and the sub-root key of said card reader appointment;
Second judge module 73 judges that can the sub-transmission security key of the said card reader appointment that said acquisition module 72 gets access to decipher the ciphertext part of said random information;
Said second transceiver module 71 also is used in the judged result of said second judge module 73 according to the indication of the part of the ciphertext after the deciphering, returning the data message that said card reader request is returned when being; Said data message uses the sub-root key of said appointment to encrypt.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method; Be to instruct relevant hardware to accomplish through computer program; Described program can be stored in the computer read/write memory medium; This program can comprise the flow process like the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Above disclosedly be merely preferred embodiment of the present invention; Certainly can not limit the present invention's interest field with this; One of ordinary skill in the art will appreciate that all or part of flow process that realizes the foregoing description; And, still belong to the scope that invention is contained according to the equivalent variations that claim of the present invention is done.