Summary of the invention
In order to solve the above-mentioned technical problem that exists in the background technology, the invention provides a kind of key person's password that can prevent and reveal, promoted the key management method and the system of the reliability of key management.
Technical solution of the present invention is: the invention provides a kind of key management method, its special character is: said method comprising the steps of:
1) adopts block encryption algorithm to carry out information integrity check code MIC computing some key person's passwords, obtain the MIC check value;
2) the resulting MIC check value of step 1) is finished cipher key management operation as the foundation that each key person's identity is differentiated.
Above-mentioned cipher key management operation comprises that carrying out key generates with renewal operation, key person's password renewal operation, key recovery operation, cipher key backup is operated and the cipher key destruction operation.
Above-mentioned some key persons carry out the cipher key management operation or the optional cipher key management operation of key person of all key person's participations.
When above-mentioned some key persons carried out the cipher key management operation of all key person's participations, described some key persons are on the scene and Attended Operation simultaneously, and at this moment, the specific implementation of described step 1) is:
1.1.1) key person's password choosing arbitrarily in some key person's passwords makes up Key;
1.1.2) utilize except that step 1.1.1) and all key person's passwords structure data;
1.1.3) adopt block encryption algorithm to utilize step 1.1.1) constructed Key is to step 1.1.2) constructed data carry out the MIC computing, obtain the MIC operation result, described MIC operation result is the MIC check value.
Above-mentioned key management method be all key persons participate in cipher key management operation the time, described step 2) specific implementation be:
2.1.1) key person's password choosing in some key person's passwords makes up Key ', wherein, making up selected key person of Key ' and step 1.1.1) the selected key person of the middle Key of structure is same key person, and the building mode of Key ' is consistent with the building mode of Key;
2.1.2) utilize except that step 2.1.1) and all key person's passwords structure data;
2.1.3) adopt block encryption algorithm to utilize step 2.1.1) constructed Key ' is to step 2.1.2) constructed data carry out the MIC computing, obtain the MIC operation result, described MIC operation result is a MIC ' check value, wherein building mode and the input order and step 1.1.3 of input data in the computing MIC ' process) building mode and the input order of importing data in the computing MIC process be consistent;
2.1.4) with step 2.1.3) resulting MIC ' check value and step 1.1.3) resulting MIC check value compares, if compare successfully, then allows key person to implement cipher key management operation; If comparison is unsuccessful, then withdraw from cipher key management operation.
When above-mentioned some key persons carried out the optional cipher key management operation of key person, described some key persons' number was M, and it is N that the key person of the optional cipher key management operation of described key person participates in quantity, described M>N 〉=2; At this moment, the specific implementation of described step 1) is:
1.2.1) to M position key person according to 1,2,3......M-1, M nature preface is numbered;
1.2.2) in the key person of M position, choose N position key person arbitrarily and constitute a combination, co-exist in C
M NIndividual combination in combination in any, is chosen the minimum key person's password structure Key of numbering among the key person of N position;
1.2.3) utilize except that step 1.2.2) and all the other N-1 position key person's passwords structure data;
1.2.4) adopt block encryption algorithm to utilize step 1.2.2) constructed Key is to step 1.2.3) constructed data carry out the MIC computing, obtain the MIC operation result, described MIC operation result is the MIC check value;
1.2.5) choose and choose N position key person among the key person of M position arbitrarily and constitute described C
M NStep 1.2.2 is adopted in next combination in the individual combination)~step 1.2.4) in same compute mode N position key person's password in this combination is carried out the MIC computing, obtain the MIC operation result;
1.2.6) repeating step 1.2.5), until covering described C
M NThe MIC operation result of individual combination.
When above-mentioned some key persons carried out the optional cipher key management operation of key person, when described cipher key management operation was the cipher key backup operation, M position key person is Attended Operation simultaneously, this moment described step 2) specific implementation be:
2.2.1.1) choose first and make up to N position key person, make up Key ' with first key person's password;
2.2.1.2) utilize except that step 2.2.1.1) and all the other N-1 position key person's passwords structure data;
2.2.1.3) adopt block encryption algorithm to utilize step 2.2.1.1) constructed Key ' is to step 2.2.1.2) constructed data carry out MIC ' computing; Wherein, the building mode of described Key ' and step 1.2.2) in the building mode of Key consistent; Building mode and the input order and step 1.2.4 of input data in the computing MIC ' process) import data in the computing MIC process building mode and input order consistent;
2.2.1.4) with MIC ' operation result and step 1.2.4) and in resulting each MIC compare one by one, if compare successfully, carry out next group combination MIC ' computing and with each MIC of storage operation of comparing one by one, otherwise withdraw from cipher key management operation; Wherein, described next group combination building mode is removed from current combination for numbering minimum key person, maximum key person in the current combination is numbered corresponding next one numbering key person is added to current combination, comprise numbering M key person be combined as last need MIC ' computing and with compare the one by one combination of operation of each MIC of storage.Wherein, the described next one is numbered in the described current combination maximum key person numbering and increases progressively and add 1.
When above-mentioned some key persons carried out the optional cipher key management operation of key person, described cipher key management operation was key person's password when upgrading operation, and M position key person is Attended Operation simultaneously, this moment described step 2) specific implementation be:
2.2.2.1) choose first and make up to N position key person, make up Key ' with first key person's password;
2.2.2.2) utilize except that step 2.2.2.1) and all the other N-1 position key person's passwords structure data;
2.2.2.3) adopt block encryption algorithm to utilize step 2.2.2.1) constructed Key ' is to step 2.2.2.2) constructed data carry out MIC ' computing; Wherein, the building mode of described Key ' and step 1.2.2) in the building mode of Key consistent; Building mode and the input order and step 1.2.4 of input data in the computing MIC ' process) import data in the computing MIC process building mode and input order consistent;
2.2.2.4) with MIC ' operation result and step 1.2.4) and in resulting each MIC compare one by one, if compare successfully, carry out next group combination MIC ' computing and with each MIC of storage operation of comparing one by one, otherwise withdraw from cipher key management operation; Wherein, described next group combination building mode is removed from current combination for numbering minimum key person, maximum key person in the current combination is numbered corresponding next one numbering key person is added to current combination, comprise numbering M key person be combined as last need MIC ' computing and with compare the one by one combination of operation of each MIC of storage.Wherein, the described next one is numbered in the described current combination maximum key person numbering and increases progressively and add 1.
When above-mentioned some key persons carry out the optional cipher key management operation of key person, described cipher key management operation is that key generates and renewal operation, key recovery operation or cipher key destruction operation, at this moment, choose N position key person among the key person of M position arbitrarily and operate described step 2) specific implementation be:
2.2.3.1) utilize key person's password of numbering minimum among the key person of N position to make up Key ';
2.2.3.2) utilize except that step 2.2.3.1) and all the other N-1 position key person's passwords structure data;
2.2.3.3) adopt block encryption algorithm to utilize step 2.2.3.1) constructed Key ' is to step 2.2.3.2) constructed data carry out MIC ' computing to key person's password, obtain MIC ' operation result; Wherein, the building mode of described Key ' and step 1.2.2) in the building mode of Key consistent; Building mode and the input order and step 1.2.4 of input data in the computing MIC ' process) import data in the computing MIC process building mode and input order consistent;
2.2.3.4) with this MIC ' and step 1.2.4) and in resulting each MIC compare one by one, if exist a MIC identical, then compare successfully with MIC ', then allow to implement key generate upgrade operation, key recovery is operated or cipher key destruction is operated; Otherwise withdraw from cipher key management operation.
A kind of key management system, its special character is: described key management system comprises key person's password input module of being used to obtain some key person's passwords, be used for adopting block encryption algorithms to carry out the MIC computing of information integrity check code some key person's passwords and with this as key person's password verification module that each key person's identity is differentiated and be used for cipher key management operation enforcement module that cipher key management operation is issued; Described cipher key management operation is that key generates with renewal operation, key person's password renewal operation, key recovery operation, cipher key backup is operated and the cipher key destruction operation.
Advantage of the present invention is:
The invention provides a kind of key management method and system, this method has been carried out method innovation in key person's password check part, makes the key management reliability be improved, and its advantage is as follows:
1, key person's password is not directly compared, but the MIC value of key person's password is compared, need not storage key person's password like this, but the MIC value of storage key person's password, because the MIC computing is irreversible, even the MIC value is acquired, also can't obtain key person's password expressly by backstepping by the MIC value, therefore reduced the risk that key person's password leaks;
2, adopt this method some key person's password information hash can be unified to judge together, reduced key person's password verification complexity;
3, because MIC need be stored in the equipment, be used for the later stage relatively, and the MIC value is the data of one section regular length, the length because of key person's password does not change, the increase because of key person's quantity does not change, store M IC value length is fixed like this, reduces the requirement to device memory, and is also relatively convenient simultaneously.
The present invention adopts block encryption algorithm to carry out information integrity check code (MIC) computing some key management person's passwords, then with the MIC check value as the foundation that each key management person's identity is differentiated, finishing the authority of cipher key management operation judges, the method has substituted the conventional method of expressly directly comparing with password, reduce the risk that password is revealed, promoted the reliability of key management.
Embodiment
Referring to Fig. 2, the invention provides a kind of key management method, its difference with the prior art is: the present invention adopts block encryption algorithm to carry out information integrity check code (MIC) computing some key person's passwords, then with the MIC check value as the foundation that each key person's identity is differentiated, finishing the authority of cipher key management operation judges, the method has substituted the conventional method of expressly directly comparing with password, has reduced the risk that password is revealed, and has promoted the reliability of key management.
Referring to Fig. 2, method and system provided by the present invention are specifically described:
As first kind of embodiment of the present invention, method provided by the present invention participates in cipher key management operation simultaneously by some (M position) key person fully, when promptly carrying out key generation and renewal, the renewal of key person's password, key recovery, cipher key backup and cipher key destruction operations, M position key person is on the scene and Attended Operation simultaneously, and its concrete grammar may further comprise the steps:
When key management system is created (key person's number is at least 2, M 〉=2):
(1) chooses key person's password arbitrarily and make up Key (key), other key person's passwords make up data, adopt block encryption algorithm to utilize described Key that described data are carried out the MIC computing, obtain MIC operation result (it is relevant with data input requirement with method that makes up described The data and selected block encryption algorithm key to make up described Key, and wherein selected block encryption algorithm can be known algorithm);
(2) MIC that calculates in the storing step (1);
When key management system uses:
(3) key person's password is carried out same operation with step (1), promptly choose key person's password and make up Key ' (key), other key person's passwords make up data, adopt block encryption algorithm to utilize described Key ' that described data are carried out MIC ' computing, obtain MIC ' operation result.Wherein, the key person that the key person who is used for making up Key ' and step (1) are used to make up Key is same key person, and Key ' is consistent with the building mode of Key; The building mode and the input order that are used for MIC ' computing input data are consistent with building mode and input order that step (1) is used for MIC computing input data; Then the MIC ' and the MIC of the middle storage of step (2) are compared;
(4) compare successfully, then allow to implement ensuing cipher key management operation (key generation and renewal, the renewal of key person's password, key recovery, cipher key backup and cipher key destruction), otherwise withdraw from.
As second kind of embodiment of the present invention, method provided by the present invention participates in the renewal of key person's password, cipher key backup operation simultaneously by M position key person fully, when promptly carrying out the renewal of key person's password, cipher key backup operations, M position key person is on the scene and Attended Operation simultaneously; Or, N position key person participates in the key generation simultaneously and renewal, key recovery, cipher key destruction are operated by choosing arbitrarily among the key person of M position, when promptly carrying out key generation and renewal, key recovery, cipher key destruction operation, have at least the N position must be simultaneously on the scene and N position Attended Operation wherein among the key person of M position, all the other M-N position key persons are Attended Operation not, its concrete grammar may further comprise the steps: when key management system is created (key person's number is at least 2, M>N 〉=2):
(1) M position key person according to 1,2,3......M-1, M nature preface is numbered, key management system is created each key person's numbering of back and is remained unchanged;
(2) in the key person of M position, choose N position key person arbitrarily and constitute a combination, co-exist in C
M NIndividual combination, in combination in any, choose the minimum key person's password structure Key of numbering among the key person of N position, all the other N-1 position key person's passwords make up data, adopt block encryption algorithm that key person's password is carried out the MIC computing, obtain the MIC operation result, the MIC operation result is stored (it is relevant with data input requirement with method that makes up described The data and selected block encryption algorithm key to make up described Key, and wherein selected block encryption algorithm can be known algorithm);
(3) choose and choose N position key person among the key person of M position arbitrarily and constitute described C
M NNext combination in the individual combination, same compute mode is carried out the MIC computing to N position key person's password in this combination in the employing step (2), obtains MIC operation result and storage;
(4) repeating step (3) is until covering described C
M NIndividual combination, and the corresponding MIC value of each combination of storage.
When key management system uses:
(5) when cipher key management operation be that key generates and upgrades, key recovery, during the cipher key destruction operation, choosing N position key person among the key person of M position arbitrarily operates, utilize the minimum key person's password structure Key ' of numbering among the key person of N position this moment, all the other N-1 position key person's passwords make up data, adopt block encryption algorithm that key person's password is carried out MIC ' computing, obtain MIC ' operation result, wherein, the building mode of Key ' is consistent with the building mode of Key in the step (2), and the building mode and the input order that are used for MIC ' computing input data are consistent with building mode and input order that step (2) is used for MIC computing input data; This MIC ' and each MIC of storage are compared one by one,, then compare successfully, then allow to implement ensuing key and generate renewal, key recovery, cipher key destruction operation, otherwise withdraw from if exist a MIC identical with MIC '.
When key person's password upgrades operation, M position key person needs Attended Operation simultaneously, at first choosing first this moment makes up to N position key person, make up Key ' with first key person's password then, all the other N-1 position key person's passwords make up data, adopt block encryption algorithm that key person's password is carried out MIC ' computing, obtain MIC ' operation result, wherein, the building mode of Key ' is consistent with the building mode of Key in the step (2), and the building mode and the input order that are used for MIC ' computing input data are consistent with building mode and input order that step (2) is used for MIC computing input data; Each MIC of MIC ' operation result and storage is compared one by one, if compare successfully, carry out next group combination MIC ' computing and with each MIC of storage operation of comparing one by one, otherwise withdraw from.Wherein next group combination building mode is removed from current combination for numbering minimum key person, maximum key person in the current combination is numbered corresponding next one numbering (increase progressively and add 1) key person be added to current combination.In each combination, all make up Key with lowest number key person password, all the other N-1 position key person's passwords make up data and carry out MIC ' computing, then each MIC with storage compares one by one, and the key person of maximum numbering participates in computing in the key person of M position, and comparison is finished.If all compare successfully, then carry out step (2), (3), (4) operation, be key person's new password and participate in key person's password of computing this moment.
When cipher key backup is operated, M position key person needs Attended Operation simultaneously, at first choosing first this moment makes up to N position key person, make up Key ' with first key person's password then, all the other N-1 position key person's passwords make up data, adopt block encryption algorithm that key person's password is carried out MIC ' computing, obtain MIC ' operation result, wherein, the building mode of Key ' is consistent with the building mode of Key in the step (2), and the building mode and the input order that are used for MIC ' computing input data are consistent with building mode and input order that step (2) is used for MIC computing input data; Each MIC of MIC ' operation result and storage is compared one by one, if compare successfully, carry out next group combination MIC ' computing and with each MIC of storage operation of comparing one by one, otherwise withdraw from.Wherein next group combination building mode is removed from current combination for numbering minimum key person, maximum key person in the current combination is numbered corresponding next one numbering (increase progressively and add 1) key person be added to current combination.In each combination, all make up Key with lowest number key person password, all the other N-1 position key person's passwords make up data and carry out MIC ' computing, then each MIC with storage compares one by one, and the key person of maximum numbering participates in computing in the key person of M position, and comparison is finished.If all compare successfully, then allow to implement ensuing cipher key backup operation.
In addition, the present invention is when providing a kind of key management method, a kind of key management system also is provided, this system comprises key person's password input module of being used to obtain some key person's passwords, be used for adopting block encryption algorithms to carry out the MIC computing of information integrity check code some key person's passwords and with this as key person's password verification module that each key person's identity is differentiated and be used for cipher key management operation enforcement module that cipher key management operation is issued; Described cipher key management operation is that key generates with renewal operation, key person's password renewal operation, key recovery operation, cipher key backup is operated and the cipher key destruction operation.