Key diffusion method and key diffusion device
A key and initial key technology, applied in the field of keys, can solve the problems of reducing the reliability of the divergence key, long divergence time, and selection, etc., and achieve the effect of saving divergence time and improving reliability.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0022] figure 1 It is an implementation flowchart of the key divergence method provided by the embodiment of the present invention, and is described in detail as follows:
[0023] In step S101, obtain the preset count value, terminal serial number and pre-configured basic divergent key, and generate an initial key;
[0024] Wherein, the basic divergent key is preconfigured, and the basic divergent key is stored in a preset area.
[0025] The preset count value can be the system default, or can be set by yourself, and there is no limitation here.
[0026] Wherein, when an event of sending a message is detected, step S101 is executed.
[0027] In step S102, the count value of current counter is converted into the count value of shift counter;
[0028] In step S103, the count value bit of the shift counter is obtained as the number of 1, and the number of bits is 1 as the number of times of divergence, according to the preset order, the count value of the shift counter, the te...
Embodiment 2
[0031] figure 2 It is an implementation flowchart of step S101 of the key distribution method provided by the embodiment of the present invention, and is described in detail as follows:
[0032] In step S201, combine the preset count value and terminal serial number to generate initial mixed data;
[0033] In step S202, the hash value of the initial mixed data and the hash value of the pre-configured basic divergent key are obtained by using a hash function;
[0034] Among them, the hash value of the initial mixed data and the hash value of the pre-configured basic divergent key can be obtained by using the SHA hash function, or the hash value of the initial mixed data and the pre-configured key can be obtained by using the MD5 hash function. The hash value of the base diverged key.
[0035] In step S203, an exclusive OR operation is performed using the hash value of the mixed data and the hash value of the pre-configured basic divergent key to generate an initial key.
[...
Embodiment 3
[0038] image 3 It is an implementation flowchart of step S102 of the key divergence method provided by the embodiment of the present invention, and is described in detail as follows:
[0039] In step S301, obtain the number of bits of the current counter that are 1, and obtain the number of bits of the current counter that are 0;
[0040] In step S302, it is judged whether the number of the bit position of the current counter is 1 is less than the preset threshold value, and whether the number of the bit position of the current counter is 0 is less than the preset threshold value;
[0041] In step S303, if so, the count value of the current counter is converted into the count value of the shift counter; if not, the count value of the current counter is divided into a high count value and a low count value according to the number of digits of the count value of the current counter , to shift the high count value, add 1 or 0 to the low count value, and convert the count value ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 