Key encryption and decryption management method and system

Generate and encrypt the working key of embedded devices through the key manager, solve the problem of root key protection for embedded devices, ensure the security and stability of the device, and improve the convenience of the application layer. The method is simple and secure high.

CN119070975APending Publication Date: 2024-12-03JIANGSU CHUANGTONG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310642524.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-01
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The root key protection of embedded devices is difficult to achieve, affecting the security and stability of the device, and the prior art is difficult to effectively solve this problem.

Method used

Check the root key of the embedded device through the key manager. If it exists, a work key will be generated. If it does not exist, a random key file will be generated randomly, and a working key will be generated based on the device's inherent properties and root key or random key file will be generated. The key and encrypt it. The application layer can call the key manager to obtain the work key or its ciphertext to avoid obtaining the root key information.

Benefits of technology

It realizes effective protection of embedded device root keys, ensures the security and stability of the device's working, and improves the convenience of the application layer. It also has simple methods, high security, and is easy to operate and manage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119070975A_ABST
    Figure CN119070975A_ABST
Patent Text Reader

Abstract

The invention discloses a secret key encryption and decryption management method and system, the system comprises a secret key manager, an embedded device and an application layer, the secret key encryption and decryption management method provided by the system comprises the following steps: S1, checking a root secret key of the embedded device through the secret key manager, and if the root secret key exists, entering S2; if the root key does not exist, the key manager randomly generates a plurality of random key files and then enters S2; s2, the key manager generates a working key corresponding to the embedded device according to the inherent attribute of the embedded device and a root key or a plurality of random key files; the key manager also encrypts the working key to generate a ciphertext and a key of the working key; and S3, accessing and calling the working key information in the key manager through the application layer to obtain the working key or the ciphertext and the key of the working key. According to the management method and system, the root key of the embedded equipment can be protected, and the working safety and stability of the embedded equipment are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of embedded device security technology, and in particular to a key encryption and decryption management method and system. Background Art

[0002] Embedded devices are mainly composed of embedded processors, related supporting hardware and embedded software systems. They are devices that integrate hardware and software and can work independently.

[0003] As the security of information systems has been widely valued, the security requirements of embedded devices are also gradually increasing. It is well known that whether an embedded device can run in a secure environment depends on the degree of protection of its root key, rather than the protection of its hardware and software itself (protecting the hardware and software means adding security design to the hardware and software, which is difficult to achieve).

[0004] Therefore, the secure management of the root key of the embedded device is the key to the secure operation of the embedded device. In view of this, the present invention is proposed. Summary of the invention

[0005] In order to overcome the above-mentioned defects, the present invention provides a key encryption and decryption management method and system. On the one hand, the management method and system not only protect the root key of the embedded device, ensure the working security and stability of the embedded device, but also improve the convenience of the application layer work; on the other hand, the management method and system are simple, reasonable, and novel, easy to operate, highly secure, easy to assemble and maintain, and are conducive to popularization and application.

[0006] The technical solution adopted by the present invention to solve the technical problem is: a key encryption and decryption management method, comprising the following steps:

[0007] S1: Check the root key of the embedded device through the key manager,

[0008] If the root key of the embedded device exists, enter S2;

[0009] If the root key of the embedded device does not exist, the key manager first randomly generates a plurality of random key files and then enters S2;

[0010] S2: the key manager generates a working key corresponding to the embedded device according to the inherent properties of the embedded device and the root key, or the key manager generates a working key corresponding to the embedded device according to the inherent properties of the embedded device and a plurality of the random key files;

[0011] At the same time, the key manager also encrypts the working key to generate a ciphertext and a key of the working key;

[0012] S3: Accessing and calling the working key information in the key manager through the application layer to obtain the working key or the ciphertext and key of the working key.

[0013] As a further improvement of the present invention, in the above S1, the key manager generates multiple random key files through a random number algorithm, and the key manager also sets file permissions for the multiple random key files.

[0014] As a further improvement of the present invention, in the above S2, the key manager obtains the unique working key by performing specific permutations and combinations on the inherent attributes of the embedded device and the root key;

[0015] Alternatively, the key manager obtains the unique working key by performing specific permutations and combinations on the inherent properties of the embedded device and the plurality of random key files.

[0016] As a further improvement of the present invention, the inherent attributes of the embedded device include the MAC address, production time and device model of the device.

[0017] As a further improvement of the present invention, in the above S2, the key manager encrypts the working key by using an AES encryption and decryption algorithm.

[0018] As a further improvement of the present invention, a Linux file management system is also provided, and the Linux file management system performs authority management on the root key of the embedded device.

[0019] As a further improvement of the present invention, the key manager establishes interactive relationships with the embedded device, the application layer and the Linux file management system respectively through the TCP / IP protocol.

[0020] The present invention also provides a key encryption and decryption management system, comprising:

[0021] A key manager is configured to check the root key of the embedded device and to randomly generate a plurality of random key files according to the check result; the key manager can also generate a working key corresponding to the embedded device according to the inherent properties of the embedded device and the root key, or the key manager can generate a working key corresponding to the embedded device according to the inherent properties of the embedded device and a plurality of the random key files; and the key manager can also encrypt the working key to generate a ciphertext and a key of the working key; and,

[0022] The application layer is configured to access and call the working key information in the key manager to obtain the working key or the ciphertext and key of the working key.

[0023] As a further improvement of the present invention, a Linux file management system is provided, and the Linux file management system is used to perform authority management on the root key of the embedded device.

[0024] As a further improvement of the present invention, the key manager establishes interactive relationships with the embedded device, the application layer and the Linux file management system respectively through the TCP / IP protocol.

[0025] The beneficial effects of the present invention are: 1) The present invention generates the working key and its ciphertext and key corresponding to the embedded device through the key manager, and the application layer can call the working key information in the key manager according to its own needs to obtain the working key or the ciphertext and key of the working key; that is: when the application layer actually needs it, it only needs to obtain the working key information from the key manager, without having to obtain the actual root key information of the embedded device and the generation process information of the working key information, thereby achieving effective protection of the root key of the embedded device, ensuring the working security and stability of the embedded device, and improving the convenience of the application layer. 2) The working principle of the key encryption and decryption management method of the present invention is reasonable and novel, easy to operate, and highly secure, which is conducive to user operation and management. 3) The key encryption and decryption management system of the present invention has a simple and reasonable structure, is easy to assemble and maintain, and has a low equipment cost, which is conducive to popularization and application. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 This is a flow chart of the working principle of the key encryption and decryption management method of the present invention;

[0027] Figure 2 This is a structural block diagram of the key encryption and decryption management system of the present invention.

[0028] Combined with the attached drawings, the following description is given:

[0029] 1. Key manager; 2. Embedded devices; 3. Application layer; 4. Linux file management system. DETAILED DESCRIPTION

[0030] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0031] Embodiment 1:

[0032] Please refer to the attached Figure 1As shown, the present invention provides a key encryption and decryption management method, which mainly includes the following steps:

[0033] S1: Check the root key of embedded device 2 through key manager 1, if:

[0034] A) If the root key of the embedded device 2 exists, then enter S2;

[0035] B) The root key of the embedded device 2 does not exist, and the key manager 1 first randomly generates multiple random key files and then enters S2.

[0036] Among them, in this step S1, preferably, the key manager 1 generates multiple random key files through a random number algorithm (specifically, such as a DRBG random number generator), and at the same time, the key manager 1 also sets file permissions for the multiple random key files. Specifically, the file permissions of the random key files can be set to root 750 permissions, that is, only the root user can read and write, and other users only have read permissions, thereby enhancing the readability and security of the random key files. In addition, the key manager 1 will automatically perform a privilege escalation operation on itself each time it runs, so as to read and write the root key with root permissions.

[0037] In addition, the number of random key files randomly generated by the key manager 1 is set according to specific application requirements. For example, five random key files can be generated, but it is not limited to this number.

[0038] S2: The key manager 1 generates a working key corresponding to the embedded device 2 (the working key is in plain text) according to the inherent properties of the embedded device 2 and the root key, or the key manager 1 generates a working key corresponding to the embedded device 2 according to the inherent properties of the embedded device 2 and multiple random key files; at the same time, the key manager 1 also encrypts the working key to generate a ciphertext and key of the working key.

[0039] Among them, in this step S2, preferably, the key manager 1 obtains the unique working key by performing specific permutations and combinations on the inherent attributes of the embedded device 2 and the root key; or, the key manager 1 obtains the unique working key by performing specific permutations and combinations on the inherent attributes of the embedded device 2 and multiple random key files. Further explanation: ① The inherent attributes of the embedded device 2 include the MAC address, production time and device model of the device. However, it is not limited to the above three attributes, and other inherent attributes of the device can also be used as needed. ② The above permutations and combinations are set by the manufacturer. In short, the method of generating the working key of the present invention can greatly enhance the security of the working key and prevent the working key from being easily cracked.

[0040] In addition, in step S2, the key manager 1 encrypts the working key by using the AES encryption and decryption algorithm to further enhance the security of the working key. Furthermore, the AES encryption and decryption algorithm may preferably use the AES128 encryption and decryption algorithm (which belongs to the secure encryption and decryption algorithm in the Mbedtls secure encryption library).

[0041] S3: Access and call the working key information in the key manager 1 through the application layer 3 to obtain the working key or the ciphertext and key of the working key.

[0042] Wherein, in this step S3, the application layer 3 is various types of application APP software. The application layer 3 can call and obtain the working key or the ciphertext and key of the working key from the key manager 1 according to its own encryption and decryption requirements.

[0043] In addition, in the present embodiment 1, a Linux file management system 4 is also provided, and the Linux file management system 4 can manage the permissions of the root key of the embedded device 2, such as setting the permissions of the root key to root 750 permissions, so that only the root user can read and write, and other users only have read permissions. Thus, the readability and security of the root key are enhanced.

[0044] In addition, in the present embodiment 1, the key manager 1 establishes interactive relationships with the embedded device 2, the application layer 3 and the Linux file management system 4 respectively through the TCP / IP protocol.

[0045] In summary, the present invention generates the working key and its ciphertext and key corresponding to the embedded device through the key manager, and the application layer can call the working key information in the key manager according to its own needs to obtain the working key or the ciphertext and key of the working key; that is, when the application layer actually needs it, it only needs to obtain the working key information from the key manager, without having to obtain the actual root key information of the embedded device and the generation process information of the working key information, thereby achieving effective protection of the root key of the embedded device, ensuring the working security and stability of the embedded device, and improving the convenience of the application layer. In addition, the working principle of the key encryption and decryption management method of the present invention is reasonable and novel, easy to operate, and highly secure, which is conducive to user operation and management.

[0046] Embodiment 2:

[0047] Please see attached Figure 2 As shown, the present invention provides a key encryption and decryption management system, which mainly includes a key manager 1, an embedded device 2 and an application layer 3, wherein the key manager 1 is configured to check the root key of the embedded device 2, and can randomly generate multiple random key files according to the inspection result; at the same time, the key manager 1 can also generate a working key corresponding to the embedded device 2 according to the inherent properties of the embedded device 2 and the root key, or the key manager 1 can generate a working key corresponding to the embedded device 2 according to the inherent properties of the embedded device 2 and multiple random key files; and the key manager 1 can also encrypt the working key to generate a ciphertext and key of the working key; the application layer 3 is configured to be able to access and call the working key information in the key manager 1 to obtain the working key or the ciphertext and key of the working key.

[0048] In addition, in the present embodiment 2, preferably, a Linux file management system 4 is further provided, and the Linux file management system 4 is used to perform authority management on the root key of the embedded device 2.

[0049] Furthermore, the key manager 1 establishes interactive relationships with the embedded device 2, the application layer 3 and the Linux file management system 4 respectively through the TCP / IP protocol.

[0050] In summary, the key encryption and decryption management system of the present invention has a simple and reasonable structure, is easy to assemble and maintain, and has a low equipment cost, which is conducive to promotion and application.

[0051] In summary, the key encryption and decryption management method and system provided by the present invention can not only protect the root key of the embedded device, ensure the working security and stability of the embedded device, but also improve the convenience of the application layer. In addition, the key encryption and decryption management method and system are simple, reasonable, novel, easy to operate, highly secure, easy to assemble and maintain, and conducive to promotion and application.

[0052] Many specific details are described in the above description to facilitate a full understanding of the present invention. However, the above description is only a preferred embodiment of the present invention. The present invention can be implemented in many other ways different from those described herein, so the present invention is not limited to the specific implementation disclosed above. At the same time, any person familiar with the art can make many possible changes and modifications to the technical solution of the present invention using the methods and technical contents disclosed above without departing from the scope of the technical solution of the present invention, or modify it into an equivalent embodiment of equivalent changes. Any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of protection of the technical solution of the present invention.

Claims

1. A key encryption and decryption management method, characterized in that: The following steps are involved: S1: Check the root key of the embedded device (2) through the key manager (1), If the root key of the embedded device (2) exists, enter S2; If the root key of the embedded device (2) does not exist, the key manager (1) first randomly generates a plurality of random key files and then enters S2; S2: the key manager (1) generates a working key corresponding to the embedded device (2) according to the inherent properties of the embedded device (2) and the root key, or the key manager (1) generates a working key corresponding to the embedded device (2) according to the inherent properties of the embedded device (2) and a plurality of the random key files; At the same time, the key manager (1) also encrypts the working key to generate a ciphertext and a key of the working key; S3: Accessing and calling the working key information in the key manager (1) through the application layer (3) to obtain the working key or the ciphertext and key of the working key.

2. The key encryption and decryption management method according to claim 1, characterized in that: In the above S1, the key manager (1) generates a plurality of the random key files by using a random number algorithm, and the key manager (1) also sets file permissions for the plurality of the random key files.

3. The key encryption and decryption management method according to claim 1, characterized in that: In the above S2, the key manager (1) obtains the unique working key by performing specific permutations and combinations on the inherent attributes of the embedded device (2) and the root key; Alternatively, the key manager (1) obtains the unique working key by performing specific permutations and combinations on the inherent properties of the embedded device (2) and the plurality of random key files.

4. The key encryption and decryption management method according to claim 3, characterized in that: The inherent attributes of the embedded device (2) include the MAC address, production time and device model of the device.

5. The key encryption and decryption management method according to claim 1, characterized in that: In the above S2, the key manager (1) encrypts the working key using an AES encryption and decryption algorithm.

6. The key encryption and decryption management method according to claim 1, characterized in that: A Linux file management system (4) is also provided, and the Linux file management system (4) performs authority management on the root key of the embedded device (2).

7. The key encryption and decryption management method according to claim 6, characterized in that: The key manager (1) establishes interactive relationships with the embedded device (2), the application layer (3) and the Linux file management system (4) respectively through the TCP / IP protocol.

8. A key encryption and decryption management system, characterized in that: include: A key manager (1) is configured to check the root key of an embedded device (2) and to randomly generate a plurality of random key files according to the check result; at the same time, the key manager (1) can also generate a working key corresponding to the embedded device (2) according to the inherent properties of the embedded device (2) and the root key, or the key manager (1) can generate a working key corresponding to the embedded device (2) according to the inherent properties of the embedded device (2) and the plurality of random key files; and the key manager (1) can also encrypt the working key to generate a ciphertext and a key of the working key; as well as, The application layer (3) is configured to access and call the working key information in the key manager (1) to obtain the working key or the ciphertext and key of the working key.

9. The key encryption and decryption management system according to claim 8, characterized in that: A Linux file management system (4) is provided, and the Linux file management system (4) is used to perform authority management on the root key of the embedded device (2).

10. The key encryption and decryption management system according to claim 9, characterized in that: The key manager (1) establishes interactive relationships with the embedded device (2), the application layer (3) and the Linux file management system (4) respectively through the TCP / IP protocol.