Terminal key generation and distribution method based on device unique feature identifier

Through the terminal key generation and distribution method based on the device's unique feature identification, the problem of key leakage and computing overhead in traditional technology is solved, and the secure communication of terminal devices is realized, ensuring the security of keys and the confidentiality of communication data is ensured. .

CN119094116APending Publication Date: 2024-12-06ELECTRIC POWER RES INST OF GUANGXI POWER GRID CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411044123.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In traditional terminal key generation and distribution technology, pre-shared keys are easily leaked, the asymmetric key exchange protocol has high computing overhead, and it is difficult to ensure the security of communication data.

Method used

Using the terminal key generation and distribution method based on the device's unique feature identification, encrypted storage and anti-cloning by obtaining the device identification, selecting the encryption algorithm to generate the terminal key, and ensuring secure transmission and verification through the key distribution policy, using multi-path redundancy The distribution mechanism and key verification mechanism ensure the security of the key.

Benefits of technology

It greatly reduces the risk of key leakage, avoids frequent key calculation processes, ensures the confidentiality and security of communication data, and provides a more reliable guarantee for the secure communication of terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094116A_ABST
    Figure CN119094116A_ABST
Patent Text Reader

Abstract

The invention discloses a terminal key generation and distribution method based on an equipment unique feature identifier, which relates to the technical field of key generation and distribution, and comprises the following steps: acquiring an equipment identifier, performing encryption storage, and preventing cloning repetition; an encryption algorithm is selected and operated, and a terminal key is generated; distributing the terminal key to a target communication facility, and ensuring secure transmission; and the two communication parties use the generated terminal key to carry out encryption and decryption operations, and the validity and security of the key are verified through a key verification mechanism. According to the invention, the unique feature identifier of the equipment is used as the basis for key generation, so that the risk of key leakage can be greatly reduced, and a frequent key calculation process is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of key generation and distribution, in particular to a terminal key generation and distribution method based on a unique feature identifier of a device. Background Art

[0002] With the development and widespread application of information technology, protecting data security has become an important issue. In the field of information security, terminal key generation and distribution is a key technology used to ensure the security of data transmission encryption and decryption between communicating parties.

[0003] Terminal key generation and distribution technology is the key to protecting the security of communication data. Traditional methods usually use pre-shared keys or asymmetric key exchange protocols to achieve key generation and distribution, but these methods have some problems: First, pre-shared keys are easy to leak, which threatens data security. Second, asymmetric key exchange protocols need to be calculated before each communication, which introduces additional computing overhead. In order to solve these problems, terminal key generation and distribution technology based on the unique feature identifier of the device came into being. Summary of the invention

[0004] In view of the problems existing in the above-mentioned traditional terminal secret generation and distribution technology, the present invention is proposed.

[0005] Therefore, the problem to be solved by the present invention is how to provide a terminal key generation and distribution method based on a unique feature identifier of a device.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In the first aspect, an embodiment of the present invention provides a terminal key generation and distribution method based on a unique characteristic identifier of a device, which includes obtaining a device identifier, encrypting and storing it, and preventing cloning and duplication; selecting and running an encryption algorithm to generate a terminal key; distributing the terminal key to a target communication facility and ensuring secure transmission; the communicating parties use the generated terminal key to perform encryption and decryption operations, and verify the validity and security of the key through a key verification mechanism.

[0008] As a preferred solution of the terminal key generation and distribution method based on the unique characteristic identification of the device described in the present invention, the steps to prevent cloning and duplication are as follows: the data to be stored is divided into fragments, each fragment contains part of the data, the unique identification characteristic value of the device is obtained from the operating system or trusted hardware, and the unique identification is bound to each data fragment; each data fragment bound to the unique identification is homomorphically encrypted; the encrypted ciphertext data fragments are dispersedly stored in different nodes.

[0009] As a preferred solution of the terminal key generation and distribution method based on the unique device feature identifier of the present invention, wherein: the step of selecting and running an encryption algorithm to generate a terminal key includes the following steps: generating a corresponding terminal key according to the requirements of the AES algorithm, and the process is as follows:

[0010]

[0011] Among them, AES() represents that the AES algorithm encrypts the input to generate a key; HMAC() represents that the HMAC algorithm is used to perform a hash operation on the input to generate a hash value; P is the unique feature identifier of the device; S is the random seed or salt value in the key generation process; determine the security level requirements of the application scenario, and dynamically set the key length according to the security level; for the generated key, perform further preprocessing, including intercepting a specified length part as the terminal key according to actual needs, or converting it into a hexadecimal string.

[0012] As a preferred solution of the terminal key generation and distribution method based on the unique device feature identifier of the present invention, wherein: the step of distributing the terminal key to the target communication facility includes the following steps: obtaining the information of the target device to determine the device to which the terminal key is distributed; formulating a key distribution strategy before distributing the terminal key; encrypting the generated terminal key using the key distribution strategy, and distributing the encrypted terminal key to the target device through network transmission; after receiving the encrypted terminal key, the target device decrypts the terminal key according to the key distribution strategy and saves the terminal key to the corresponding directory or memory on the device.

[0013] As a preferred solution of the terminal key generation and distribution method based on the unique device feature identifier of the present invention, wherein: the key distribution strategy includes: determining the object and scope of key distribution, the time and frequency of key distribution, the method and channel, and the format and storage method of the key; designing a multi-path redundant distribution mechanism to ensure normal operation even when some distribution paths fail, including: planning multiple different data distribution paths; slicing the original data to obtain N data segments, encoding them using recovery coding technology to generate M (M > N) coded segments; distributing the M coded segments in parallel through the planned multiple data distribution paths, adopting a weighted load balancing strategy to reasonably allocate the load of each path; the receiving end receives P (N ≤ P ≤ M) coded segments through different paths. If P ≥ N, the original data is reconstructed from the received P segments using the recovery coding algorithm; if P < N, wait until enough segments are supplemented and then reconstruct; monitor each distribution path in real time. If it is found that the performance of a certain path deteriorates or is interrupted, immediately switch to the backup path.

[0014] As a preferred solution of the terminal key generation and distribution method based on the unique characteristic identifier of the device described in the present invention, the terminal key distribution target communication facility also includes: the distributed nodes participating in the key verification in the system apply for digital certificates from the trusted certificate authority CA; each node uses the digital certificate to exchange digital certificates with each other through the SSL / TLS secure channel, verifies the legitimacy and signature of the other party's digital certificate, and saves the other party's public key to establish a two-way authentication and trust relationship between the nodes; the terminal key K is sliced ​​into A pieces according to the selected (A, B) threshold, the terminal key slices are encrypted using the established node public key, and the encrypted terminal key slices are distributed to the corresponding A nodes; when the key needs to be verified, the initiator sends a verification request to all nodes, each node uses its own saved terminal key slice to perform partial operations on the verification request, and sends the partial verification results back to the initiator node; the initiator node collects at least B parts of partial verification results, uses the threshold key reconstruction algorithm to reconstruct the complete terminal key K, and completes the key verification process with the reconstructed K.

[0015] As a preferred solution of the terminal key generation and distribution method based on the unique feature identification of the device described in the present invention, the key distribution process also includes: the key distribution process uses an encrypted channel to avoid key leakage; identity authentication should be performed during the key transmission process, only known devices are allowed to receive keys, and the keys are changed regularly to avoid long-term exploitation of keys for attacks after leakage.

[0016] On the second aspect, in order to further solve the problems existing in traditional terminal key generation and distribution technologies, the present invention provides a terminal key generation and distribution system based on the unique characteristic identification of the device, which includes: a device identification acquisition module, used to obtain the device identification and ensure uniqueness; an encryption storage module, used to encrypt and store the device identification to prevent cloning and reuse; an encryption algorithm selection module, used to select a suitable encryption algorithm and generate a terminal key; a key distribution module, used to distribute the generated terminal key to the target communication facility and ensure secure transmission; a key verification module, used for the communicating parties to use the generated terminal key for encryption and decryption operations, and verify the validity and security of the key.

[0017] In a third aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the terminal key generation and distribution method based on the unique feature identifier of the device as described in the first aspect of the present invention.

[0018] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the terminal key generation and distribution method based on the unique feature identifier of the device as described in the first aspect of the present invention.

[0019] The beneficial effect of the present invention is that the present invention can greatly reduce the risk of key leakage and avoid frequent key calculation processes by using the unique characteristic identification of the device as the basis for key generation. Through reasonable key distribution and key verification mechanisms, the confidentiality and security of communication data can be ensured. The application of this technology will provide more reliable protection for the secure communication of terminal devices and is expected to be widely used and promoted in the field of information security. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0021] Figure 1 This is a flowchart of the terminal key generation and distribution method based on the unique feature identifier of the device in Example 1. DETAILED DESCRIPTION

[0022] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0023] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0025] Example 1

[0026] Reference Figure 1 , which is the first embodiment of the present invention, and provides a terminal key generation and distribution method based on a unique feature identifier of a device, comprising the following steps:

[0027] S1: Obtain the device identification, encrypt and store it, and prevent cloning and duplication.

[0028] The unique identification information of the device is obtained through the unique characteristic identifier inside the device, such as IMEI number, MAC address, etc.

[0029] In the process of implementing the terminal key generation and distribution technology based on the unique characteristic identification of the device, the acquisition of the unique characteristic identification of the device is a key step. Generally speaking, each device has a unique characteristic identification in hardware or software, such as MAC address, IMEI number, etc. The following takes the MAC address as an example to describe the specific implementation process of obtaining the unique characteristic identification of the device based on the MAC address.

[0030] S1.1: Obtain a MAC address.

[0031] On Linux systems, you can use the ifconfig or ipconfig command to obtain the MAC address of the device, or you can use code to call the system API function to obtain the MAC address.

[0032] S1.2: Process MAC address.

[0033] Specifically, after obtaining the MAC address, it needs to be processed so as to uniquely identify a device. The processing method may be to convert the MAC address into a string, or directly store it in hexadecimal.

[0034] The processed MAC address, like other forms of unique characteristic identifiers, can be used as the basis for key generation.

[0035] S1.3: Use unique feature identifiers.

[0036] For application scenarios with higher security requirements, it is recommended to encrypt the unique feature identifier together with other data to increase the difficulty of attacks such as dictionary attacks.

[0037] At the same time, in the process of obtaining a unique feature identifier, it is recommended to use the API provided by the operating system or use hardware support to avoid the occurrence of false data or tampered data.

[0038] Furthermore, in order to prevent the logo from being cloned and reused, an anti-reuse mechanism is designed, as follows:

[0039] The data to be stored is divided into fragments, each fragment contains part of the data, the unique identification characteristic value of the device is obtained from the operating system or trusted hardware, and the unique identification is bound to each data fragment; each data fragment bound to the unique identification is homomorphically encrypted; the encrypted ciphertext data fragments are dispersed and stored in different nodes.

[0040] In summary, obtaining the unique characteristic identifier of the device is a key step in the terminal key generation and distribution technology based on the unique characteristic identifier of the device. The specific implementation method needs to be adapted according to the device type and operating system platform. However, whether in Linux or Windows system, the method of obtaining the unique characteristic identifier is essentially to read the unique characteristic identifier of the device by calling the system API or hardware operation.

[0041] S2: Select and run the encryption algorithm to generate a key.

[0042] S2.1: Use the unique feature identifier of the device as input and generate the corresponding terminal key through the encryption algorithm.

[0043] For the key generation process, a sufficiently secure encryption algorithm should be selected. The present invention uses the AES (Advanced Standard) algorithm, which is widely used in modern cryptography, has been widely recognized worldwide, and is used in many encryption standards. According to the algorithm and conditions used for encryption, an appropriate encryption mode can be selected, such as ECB, CBC, etc.

[0044] S2.2: Use the unique feature identifier of the device as input, run the selected encryption algorithm, and generate the corresponding terminal key according to the requirements of the algorithm.

[0045] Specifically, the process of generating the corresponding terminal key according to the requirements of the AES algorithm is as follows:

[0046]

[0047] Among them, AES(x) means that the AES algorithm encrypts the input x to generate a key; HMAC(x,y) means using the HMAC algorithm to perform a hash operation on the input x and y to generate a hash value; P is the unique characteristic identifier of the device, such as the MAC address or IMEI number; S is the random seed or salt value in the key generation process, which is used to increase the randomness and security of the key.

[0048] Specifically, determine the security level requirements for the application scenario, for example: low level: used for general data transmission, with general security requirements; medium level: used for privacy data transmission, requiring medium security strength; high level: used for confidential data transmission, requiring the highest security strength.

[0049] Dynamically set the key length based on the security level: in low-level scenarios, set the key length to 128 bits; in medium-level scenarios, set the key length to 192 bits; in high-level scenarios, set the key length to 256 bits or longer.

[0050] Get the unique device ID from the operating system or trusted hardware, and pass the device ID to the deterministic pseudo-random number generator CSPRNG; based on the CSPRNG and the selected encryption algorithm, generate a terminal key of the corresponding length. For example, if the AES algorithm is selected: AES-128 generates a 128-bit key, AES-192 generates a 192-bit key, and AES-256 generates a 256-bit key; the generated terminal key is used for subsequent data encryption operations.

[0051] The key generated by the encryption algorithm can be further preprocessed, for example, a portion of a specified length is intercepted as a terminal key according to actual needs, or it is converted into a hexadecimal string.

[0052] S3: Distribute the generated terminal key to the target communication facility and ensure secure transmission to avoid key leakage.

[0053] Key distribution is the process of distributing the generated terminal key to the target communication facility and ensuring the transmission security to avoid key leakage. Generally speaking, the key distribution process includes the following steps:

[0054] S3.1: First, it is necessary to obtain the target device information, including the device model, IP address, MAC address, etc., to determine to which device the terminal key is distributed.

[0055] S3.2: Before distributing keys to terminals, a key distribution strategy needs to be developed to determine how keys are distributed and how to ensure the security of the distribution.

[0056] First, determine the object and scope of key distribution, such as which terminals need to distribute keys and which users or devices can obtain terminal keys; determine the time and frequency of key distribution, such as whether it is a one-time distribution or regular key update; determine the method and channel of key distribution, such as distribution through network transmission, physical media or manual delivery; determine the format and storage method of the key, such as determining the encoding format and storage location of the key.

[0057] Specifically, a multi-path redundant distribution mechanism is designed to ensure that it can still work normally when some distribution paths fail.

[0058] Plan multiple different data distribution paths and ensure that these paths have good independence and redundancy. For example, different network operators, different network protocols, and different geographical locations can be selected as redundant paths.

[0059] The original data is fragmented into N data segments, and these N data segments are encoded using a recovery coding technique (such as erasure code) to generate M (M > N) coded segments. In this way, even if some of the coded segments are lost, the original data can be recovered using the remaining segments.

[0060] The M coded segments are distributed in parallel through multiple previously planned paths, and a weighted load balancing strategy is adopted to reasonably allocate the load of each path. The specific allocation is as follows:

[0061]

[0062] Among them, L(t) represents the total load, that is, the sum of the loads of all paths; t represents time; n represents the number of paths; Q i is the weight of path i; C i is the capacity of path i; α i is the attenuation coefficient of path i; f i represents the data distribution of path i; g i represents the load balancing degree of path i.

[0063] The receiving end will receive P (N ≤ P ≤ M) coded segments through different paths. As long as P ≥ N, the original data can be reconstructed from the received P segments using the recovery coding algorithm. If P < N, wait until enough segments are supplemented before reconstruction.

[0064] Monitor the connectivity, latency, packet loss rate, etc. of each distribution path in real time. Once it is found that the performance of a certain path deteriorates or is interrupted, immediately switch to the backup path.

[0065] It should be noted that through redundant paths and recovery coding technology, it is ensured that the system can still work normally when some paths fail, and the path diversity is good, which can cross different networks and regions, and has strong anti-risk ability.

[0066] S3.3: After selecting the key distribution strategy, use the terminal key generated by encrypting with this strategy. Generally, the encrypted key is distributed to the target device using network transmission.

[0067] In addition, to improve the transmission efficiency, the encrypted key can be distributed to multiple target devices at one time.

[0068] S3.4: After the target device receives the encrypted terminal key, decrypt the terminal key according to the key distribution strategy, and save the terminal key to the corresponding directory or memory on the device.

[0069] In the actual key distribution process, the following matters also need to be noted:

[0070] The terminal key distribution process should use an encrypted channel to prevent terminal key leakage, such as using secure communication protocols such as SSL or TLS to transmit keys;

[0071] The terminal key should be authenticated during transmission, and only known devices are allowed to receive the key. The terminal key should be changed regularly to prevent the terminal key from being used for attacks for a long time after being leaked.

[0072] Furthermore, the distributed nodes participating in key verification in the system apply for digital certificates from the trusted certificate authority CA. The digital certificate contains the node's public key, identity information, etc., and is signed by the CA with its own root private key; each node uses the certificate obtained from the CA to exchange certificates with each other through secure channels such as SSL / TLS, verify the legitimacy and signature of the other party's certificate, and save the other party's public key to establish a two-way authentication and trust relationship between nodes; the key K is sharded into A shards according to the selected (A, B) threshold, and the key shards are encrypted using the established node public key, and the encrypted key shards are distributed to the corresponding A nodes.

[0073] When the key needs to be verified, the initiator sends a verification request to all nodes. Each node uses its own stored key shard to perform partial operations on the verification request and sends the partial verification results back to the initiator node.

[0074] The initiator node collects at least B partial verification results, uses the threshold key reconstruction algorithm to reconstruct the complete key K, and uses the reconstructed K to complete the key verification process.

[0075] In summary, key distribution is one of the important links in terminal key generation and distribution technology. During the specific implementation process, issues such as obtaining target device information, formulating key distribution strategies, encrypting keys and sending them to target devices, and target devices receiving and decrypting keys should be considered. The entire process, including key distribution, should ensure transmission security and adopt corresponding strategies to prevent risks.

[0076] S4: The communicating parties use the generated terminal key to perform encryption and decryption operations, and verify the validity and security of the key through the key verification mechanism.

[0077] After the terminal key is generated and distributed, the two communicating parties use the generated key for encryption and decryption operations. During the entire process, key verification must be done to ensure the validity and security of the key. The implementation steps of the key verification mechanism are as follows:

[0078] S4.1: Before communication, key authentication information needs to be defined.

[0079] The key verification information not only includes the key itself, but also needs to include information such as the verification content, number of failures, and whether the verification is successful during the verification process.

[0080] S4.2: During the implementation process, appropriate cryptographic technology should be selected and a verification mechanism should be established based on the specific application scenario. For example, hash function keys or MAC (Message Authentication Code) technology can be used for verification.

[0081] S4.3: During the verification process, the key needs to be placed in the verification mechanism for operation. The verification scheme is judged based on the verification content and the verification result. The verification result may be a success or failure.

[0082] If successful, the key can be used to encrypt and decrypt data. If it fails, the key is regenerated and distributed or the key distribution policy item is modified for re-verification until the verification is successful.

[0083] S4.4: The key verification process must be logged with the help of relevant logging tools. Recording key verification logs can provide support for subsequent key management and troubleshooting.

[0084] In summary, key verification is an important security mechanism for both parties to use the generated terminal key for encryption and decryption. In the implementation process, it is necessary to define key verification information, select a key verification mechanism, verify the key, and record the key verification log. Only through the above verification and recording can the security and effectiveness of the key be guaranteed. At the same time, it is also necessary to pay attention to potential security risks and deal with key leakage in a timely manner.

[0085] This embodiment also provides a terminal key generation and distribution system based on the unique characteristic identification of the device, including: a device identification acquisition module, used to obtain the device identification and ensure uniqueness; an encryption storage module, used to encrypt and store the device identification and prevent cloning and reuse; an encryption algorithm selection module, used to select a suitable encryption algorithm and generate a terminal key; a key distribution module, used to distribute the generated terminal key to the target communication facility and ensure secure transmission; a key verification module, used by the communicating parties to use the generated terminal key for encryption and decryption operations, and verify the validity and security of the key.

[0086] This embodiment also provides a computer device, which is suitable for the case of a terminal key generation and distribution method based on a unique feature identifier of a device, comprising: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the terminal key generation and distribution method based on a unique feature identifier of a device as proposed in the above embodiment.

[0087] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0088] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the terminal key generation and distribution method based on the unique feature identifier of the device as proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, disk or optical disk.

[0089] In summary, the present invention can greatly reduce the risk of key leakage and avoid frequent key calculation processes by using the unique feature identifier of the device as the basis for key generation. Through reasonable key distribution and key verification mechanisms, the confidentiality and security of communication data can be ensured. The application of this technology will provide more reliable protection for the secure communication of terminal devices and is expected to be widely used and promoted in the field of information security.

[0090] Example 2

[0091] Referring to Table 1, which is the second embodiment of the present invention, in order to further verify the advancement of the present invention, experimental data of a terminal key generation and distribution method based on a unique feature identifier of a device is provided.

[0092] The purpose of this experiment is to verify the terminal key generation and distribution method based on device unique identification proposed in the invention content, and to evaluate its security performance and effectiveness.

[0093] The experiment selected 10 PCs and smartphones of different models as terminal devices, running Windows and Android operating systems respectively.

[0094] The experiment includes: installing the Python runtime environment and PyCrypto cryptography library on each device; writing the key generation script key_gen.py, which integrates AES algorithm, device MAC address reading, HMAC and other functions; writing the key distribution script key_dist.py, which provides multi-path redundant distribution function, and building an 8-node test cluster to simulate multi-path distribution scenarios.

[0095] The terminal device calls the operating system API to read the local MAC address, removes the separators from the MAC address, and obtains a string in a unified format.

[0096] Determine the key requirement level: low level 100 times, medium level 100 times, high level 100 times, call the key_gen.py script, pass in the device MAC address and security level as parameters, and the script will generate a key of the corresponding length according to the AES algorithm process of step S2.2 of the invention

[0097] Record all the keys to be distributed in the key_list.txt file, run the key_dist.py script, and pass in the cluster node information. The script divides key_list.txt into 8 paths according to the Erasure Code recovery threshold of (8,5), and distributes the 8-path key shards to the cluster nodes in parallel through 8 different routes.

[0098] Each terminal device collects key fragments of at least 5 paths. The terminal device calls the Erasure algorithm library to reconstruct the fragments and obtain the original key. The terminal uses the HMAC algorithm to verify the integrity of the key to ensure that the key is correct.

[0099] Among them, some verification data are recorded as follows:

[0100]

[0101] It can be seen from the above experimental data that, whether on a PC platform or a mobile platform, the terminal AES key adaptive generation and distribution method based on the device MAC address proposed in the invention can run efficiently and produce ideal experimental results.

[0102] Specifically, for the key generation process, the data shows that under different device types and operating system environments, keys of three different security levels can be generated normally, and the generation time is within 25 milliseconds. This time overhead is completely acceptable.

[0103] It is worth noting that for scenarios with higher security requirements, the algorithm will adaptively generate longer AES-256 keys to provide encryption protection of sufficient strength. The design advantage of this dynamic adjustment is very obvious.

[0104] From the data of multi-path distribution success rate, it can be seen that the multi-path redundant distribution mechanism implemented by Erasure Code technology can still complete the key distribution task with a high success rate (95%-99%) even when some paths fail, which greatly improves the system reliability.

[0105] And because the distribution paths are scattered across different regions and operators, they have good path redundancy and independence and are highly resistant to risks.

[0106] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should be included in the scope of the claims of the present invention.

Claims

1. A method for generating and distributing terminal keys based on a unique feature identifier of a device, characterized in that: Including: Obtain the device identifier, encrypt and store it, and prevent cloning and duplication; Select and run an encryption algorithm to generate a terminal key; Distribute the terminal key to the target communication facility and ensure secure transmission; Both communication parties use the generated terminal key for encryption and decryption operations, and verify the validity and security of the key through a key verification mechanism.

2. The terminal key generation and distribution method based on the device unique feature identifier according to claim 1 is characterized in that: The steps to prevent cloning and duplication are as follows: Fragment the data to be stored. Each fragment contains part of the data. Obtain the unique identifier feature value of the device from the operating system or trusted hardware, and bind the unique identifier to each data fragment; Perform homomorphic encryption on each data fragment bound with the unique identifier; Disperse and store the encrypted ciphertext data fragments on different nodes.

3. The terminal key generation and distribution method based on the unique feature identifier of the device according to claim 2, characterized in that: The step of selecting and running an encryption algorithm to generate a terminal key includes the following steps: Generate the corresponding terminal key according to the requirements of the AES algorithm. The process is as follows: Wherein, AES() represents that the AES algorithm encrypts the input to generate a key; HMAC() represents that the HMAC algorithm performs a hash operation on the input to generate a hash value; P is the unique feature identifier of the device; S is the random seed or salt value in the key generation process; Determine the security level requirements of the application scenario, and dynamically set the key length according to the security level; For the generated key, perform further preprocessing, including intercepting a specified length part as the terminal key according to actual needs, or converting it into a hexadecimal string.

4. The terminal key generation and distribution method based on the unique feature identifier of the device according to claim 3 is characterized in that: The step of distributing the terminal key to the target communication facility includes the following steps: Obtain the information of the target device and determine the device to which the terminal key is distributed; Before distributing the terminal key, formulate a key distribution strategy; Use the key distribution strategy to encrypt the generated terminal key, and use network transmission to distribute the encrypted terminal key to the target device; After receiving the encrypted terminal key, the target device decrypts the terminal key according to the key distribution strategy and saves the terminal key to the corresponding directory or memory on the device.

5. The terminal key generation and distribution method based on the unique feature identifier of the device according to claim 4 is characterized in that: The key distribution strategy includes: Determine the objects and scope of key distribution, the time and frequency of key distribution, the methods and channels, as well as the format and storage method of the key; Design a multi-path redundant distribution mechanism to ensure normal operation even when some distribution paths fail, including: Plan multiple different data distribution paths; Fragment the original data to obtain N data fragments, and use recovery coding technology for encoding to generate M (M > N) coded fragments; Distribute the M coded fragments in parallel through the planned multiple data distribution paths, and adopt a weighted load balancing strategy to reasonably allocate the load of each path; The receiving end receives P (N ≤ P ≤ M) coded fragments through different paths. If P ≥ N, use the recovery coding algorithm to reconstruct the original data from the received P fragments; if P < N, wait until enough fragments are supplemented and then reconstruct; Monitor each distribution path in real time. If it is found that the performance of a certain path deteriorates or is interrupted, immediately switch to the backup path.

6. The terminal key generation and distribution method based on the unique feature identifier of the device according to claim 5, characterized in that: Distributing the terminal key to the target communication facility also includes: Distributed nodes participating in key verification in the system apply for digital certificates from a trusted certificate authority CA; Each node uses the digital certificate to exchange digital certificates with each other through the SSL / TLS secure channel, verify the legitimacy and signature of the other party's digital certificate, and save the other party's public key to establish a two-way authentication and trust relationship between the nodes; The terminal key K is sharded into A shards according to the selected (A, B) threshold, the terminal key shards are encrypted using the established node public key, and the encrypted terminal key shards are distributed to the corresponding A nodes; When the key needs to be verified, the initiator sends the verification request to all nodes. Each node uses its own stored terminal key shard to perform partial operations on the verification request and sends the partial verification results back to the initiator node. The initiator node collects at least B partial verification results, uses the threshold key reconstruction algorithm to reconstruct the complete terminal key K, and uses the reconstructed K to complete the key verification process.

7. The method for generating and distributing terminal keys based on a unique feature identifier of a device according to claim 6, characterized in that: The key distribution process also includes: The key distribution process uses an encrypted channel to avoid key leakage; Identity authentication should be performed during key transmission, only known devices are allowed to receive keys, and keys should be changed regularly to prevent them from being exploited for attacks for a long time after being leaked.

8. A terminal key generation and distribution system based on a device unique feature identifier, based on the terminal key generation and distribution method based on a device unique feature identifier according to any one of claims 1 to 7, characterized in that: include: The device identification acquisition module is used to obtain the device identification and ensure its uniqueness; An encrypted storage module is used to encrypt and store the device identification and prevent cloning and reuse; An encryption algorithm selection module is used to select a suitable encryption algorithm and generate a terminal key; A key distribution module is used to distribute the generated terminal key to the target communication facility and ensure secure transmission; The key verification module is used by both communicating parties to perform encryption and decryption operations using the generated terminal key and to verify the validity and security of the key.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the terminal key generation and distribution method based on the unique feature identifier of the device are implemented as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the terminal key generation and distribution method based on the unique feature identifier of the device are implemented as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Data encryption method and device, equipment, storage medium and product

    CN120128393A