Method for quantum random number based key management and related apparatus
Patent Information
- Application Number
- CN202611355297.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-03
- Publication Date
- 2026-09-29
AI Technical Summary
这些方案中,伪随机数基于确定性算法生成输出序列,可通过算力推导实现预测,本身存在固有安全隐患;随着量子计算技术的发展,伪随机序列的破解难度大幅降低,其安全强度被进一步削弱,密钥体系的底层信任根面临量子计算攻击的风险,无法满足量子时代的高等级安全防护需求
可以看出,本申请中所描述的一种基于量子随机数的密钥管理方法及相关装置,通过QRNG模块生成第一量子随机数、第二量子随机数作为全链路密钥熵源,替代传统的伪随机数发生器,接着,依托第一量子随机数构建根密钥,并结合根密钥与第二量子随机数派生一次性使用的第一OTP密钥片段,同时融合设备端的目标基础信息协同生成设备专属密钥,分发完成后立即销毁第一OTP密钥片段,且在数据传输时基于设备专属密钥完成数据加密,实现了以量子真随机熵构建不可预测的底层信任根、分层传递密钥信任关系、设备身份与业务密钥强绑定的多重安全机制,从而,有效提高了密钥管理的安全性。
Smart Images

Figure CN122845309A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of key management technology, and in particular to a key management method and related apparatus based on quantum random numbers. Background Technology
[0002] In the field of data security, the security strength of random entropy sources is the core foundation for ensuring the unpredictability of keys and supporting the secure operation of the entire cryptographic system.
[0003] Currently, key management schemes commonly employ pseudo-random number generators as the core entropy source for key generation and derivation. Examples include deterministic pseudo-random bit generation schemes such as counter mode and hash message authentication code mode, widely used in multi-layered key architecture construction and secure data transmission. In these schemes, the pseudo-random numbers are generated based on deterministic algorithms, allowing for prediction through computational power, which inherently presents security vulnerabilities. With the development of quantum computing technology, the difficulty of cracking pseudo-random sequences has significantly decreased, further weakening their security strength. The underlying trust root of the key system faces the risk of quantum computing attacks, failing to meet the high-level security requirements of the quantum era.
[0004] Therefore, improving the security of key management has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a key management method and related apparatus based on quantum random numbers, which improves the security of key management.
[0006] In a first aspect, embodiments of this application provide a key management method based on quantum random numbers, applied to the server side of a key management system. The key management system further includes a device side, and the server side includes a QRNG module; the method includes: The QRNG module generates a first quantum random number and a second quantum random number. The root key is determined based on the first quantum random number; The first OTP key fragment is determined based on the root key and the second quantum random number; Obtain the target basic information corresponding to the device; Determine the device-specific key based on the target basic information and the first OTP key fragment; The first OTP key fragment is distributed to the device. After distribution, the first OTP key fragment is destroyed. The device is used to determine the device-specific key based on the first OTP key fragment and to implement the decryption function based on the device-specific key. When data is transmitted between the server and the device, the data is encrypted using the device's proprietary key to obtain encrypted data, and the encrypted data is then transmitted to the device.
[0007] Secondly, embodiments of this application provide a key management device based on quantum random numbers, applied to the server side of a key management system. The key management system further includes a device side, the server side including a QRNG module; the device includes a random number generation unit, a key determination unit, a key distribution unit, and an encryption unit; wherein: The random number generation unit is used to generate a first quantum random number and a second quantum random number through the QRNG module; The key determination unit is configured to: determine a root key based on the first quantum random number; determine a first OTP key fragment based on the root key and the second quantum random number; obtain target basic information corresponding to the device; and determine a device-specific key based on the target basic information and the first OTP key fragment. The key distribution unit is used to distribute the first OTP key fragment to the device, and destroy the first OTP key fragment after distribution; the device is used to determine the device-specific key based on the first OTP key fragment, and implement the decryption function based on the device-specific key. The encryption unit is used to encrypt data based on the device's proprietary key during data transmission between the server and the device to obtain encrypted data, and then transmit the encrypted data to the device.
[0008] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for performing the steps in the first aspect of embodiments of this application.
[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in the first aspect of embodiments of this application.
[0010] Fifthly, embodiments of this application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first aspect of embodiments of this application. The computer program product may be a software installation package.
[0011] Implementing this application will have the following beneficial effects: As can be seen, the quantum random number-based key management method and related apparatus described in this application generate a first quantum random number and a second quantum random number as the end-link key entropy source through a QRNG module, replacing the traditional pseudo-random number generator. Then, a root key is constructed based on the first quantum random number, and a one-time-use first OTP key fragment is derived by combining the root key and the second quantum random number. At the same time, the target basic information of the device is integrated to collaboratively generate a device-specific key. After distribution, the first OTP key fragment is destroyed immediately. During data transmission, data encryption is performed based on the device-specific key. This achieves multiple security mechanisms, including constructing an unpredictable underlying trust root with quantum true random entropy, hierarchical transmission of key trust relationships, and strong binding of device identity and business keys, thereby effectively improving the security of key management. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.
[0013] Figure 1 This is a schematic diagram of the structure of a key management system provided in an embodiment of this application; Figure 2 This is a flowchart of a key management method based on quantum random numbers provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a server provided in an embodiment of this application; Figure 4 This is a flowchart of a method for determining a first OTP key fragment provided in an embodiment of this application; Figure 5 This is a schematic diagram of another server structure provided in an embodiment of this application; Figure 6 This is a flowchart of the method for determining the device-specific key provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of a key management device based on quantum random numbers provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0015] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0016] It should be understood that the term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this document indicates that the preceding and following related objects are in an "or" relationship. In the embodiments of this application, "multiple" refers to two or more.
[0017] In the embodiments of this application, "at least one item" or its similar expression refers to any combination of these items, including any combination of a single item or a plurality of items. "One or more" means one or more, while "multiple" means two or more. For example, "at least one item" of a, b, or c can represent the following seven cases: a, b, c; a and b; a and c; b and c; a, b, and c. Each of a, b, and c can be an element or a set containing one or more elements.
[0018] In this application, the term "connection" refers to various connection methods, such as direct connection or indirect connection, to achieve communication between devices. This application does not impose any limitations on this.
[0019] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0020] The electronic devices described in this application embodiment may include smartphones (such as Android phones, iOS phones, Windows Phones, etc.), tablet computers, PDAs, laptops, video matrices, monitoring platforms, mobile internet devices (MIDs), or wearable devices, etc. The above are merely examples and not exhaustive, and include but are not limited to the above devices.
[0021] Of course, the aforementioned electronic device can also be a key management system, or a server for a key management system.
[0022] The following describes the relevant content, concepts, meanings, technical issues, technical solutions, and beneficial effects involved in the embodiments of this application.
[0023] First, let me explain some of the technical terms or phrases used in this application: QRNG module: The hardware functional module of Quantum Random Number Generator (QRNG) relies on microscopic quantum intrinsic unpredictable physical processes such as photon superposition and quantum tunneling to collect quantum entropy sources. It is equipped with entropy evaluation and random number post-processing units to output a truly random bit sequence, providing unconditional secure entropy input for cryptographic systems, which is different from software pseudo-random number generators.
[0024] Quantum random numbers are truly random bit sequences generated by the intrinsic randomness measured by quantum mechanical microparticles. Their randomness is an inherent physical property, and there is no deterministic generation logic. They cannot be predicted or reproduced by computing power. They do not have the seed dependency defect of pseudo-random sequences and can be used as cryptographic keys, salt values, and key derivation entropy sources, possessing the security foundation of information theory.
[0025] Root Key: The top-level master trust key in the key hierarchy system, serving as the trust anchor for the entire key system. It is generated by a high-security entropy source and embedded in trusted hardware such as eFuse and HSM. It does not directly encrypt business data but is only used for derivation operations of lower-level keys.
[0026] OTP Key Fragment: OTP stands for One-Time Pad, which is defined by cryptographic standards as a one-time key fragment that is used only once and destroyed immediately after use; it is generated by true random entropy and satisfies the premise of unconditional security.
[0027] Salt is a randomly generated string in cryptography. Its purpose is to prevent the same password from generating the same hash value by combining it with the user's password and then hashing it.
[0028] PQC-mTLS encrypted tunnel: It is a communication channel built by integrating post-quantum cryptography (PQC) algorithms into the bidirectional transport layer security (mTLS) protocol. It is designed to resist the threat of future quantum computers breaking current encryption standards and ensure the long-term confidentiality of inter-service communication and the security of identity authentication.
[0029] Please see Figure 1 , Figure 1 This is a schematic diagram of a key management system provided in an embodiment of this application; it can be seen that the key management system (hereinafter referred to as the system) may include: a server and a device; the server includes a QRNG module; wherein: On the server side, it controls the QRNG module to generate quantum random numbers and derives the root key, OTP key fragment, request key, etc., in sequence based on the generated quantum random numbers. In addition, it can select fiber optic / PQC-mTLS tunnel to send OTP key fragments according to the link status, destroy the OTP key fragments after receiving the device's acknowledgment, encrypt business data based on the device's exclusive key during communication, retain key distribution audit logs, and uniformly manage the key lifecycle of the device.
[0030] On the device side, it receives OTP key fragments from the server and derives the device-specific key by combining them with local information. When communicating with the server, it decrypts encrypted data sent by the server based on the device-specific key, or encrypts local business data based on the device-specific key and uploads it to the server.
[0031] Please see Figure 2 , Figure 2 This is a flowchart illustrating a key management method based on quantum random numbers provided in an embodiment of this application; the method is applied to the server side of a key management system, which also includes a device side; please refer to... Figure 3 , Figure 3 This is a schematic diagram of a server structure provided in an embodiment of this application; it can be seen that the server includes: a QRNG module; the method includes: S201. Generate a first quantum random number and a second quantum random number through the QRNG module.
[0032] In this embodiment of the application, the QRNG module can be activated to generate a first quantum random number and a second quantum random number based on the random effects of quantum physics; it should be explained that the first quantum random number and the second quantum random number are independent of each other.
[0033] S202. Determine the root key based on the first quantum random number.
[0034] In some embodiments, a quantum random number can be directly used as the root key.
[0035] In some embodiments, a first quantum random number is used as the base entropy source, and a salt value is constructed by combining it with a preset identifier. A fixed-length root key is then generated using a preset key derivation algorithm. Both the preset identifier and the preset key derivation algorithm can be preset or defaulted to in advance. For example, the preset identifier can include any of the following: a unique device identifier, the server's chip's inherent serial number, a custom version identifier, etc., without limitation. The preset key derivation algorithm can include any of the following: the HKDF-SHAKE128 algorithm, the HKDF-SHAKE256 algorithm, etc., without limitation.
[0036] It should be explained that the server may also include a one-time programmable memory (eFuse) to write the root key into the eFuse for permanent storage. The eFuse only supports a single burning operation. After burning, the root key stored in the internal storage cannot be erased or rewritten. The server is only allowed to read the root key in authorized scenarios, eliminating the risk of the root key being tampered with or illegally copied.
[0037] S203. Determine the first OTP key fragment based on the root key and the second quantum random number.
[0038] In some embodiments, please refer to Figure 4 , Figure 4 This is a flowchart of a method for determining a first OTP key segment according to an embodiment of this application. As can be seen, determining the first OTP key segment based on the root key and the second quantum random number includes the following steps: S11. Determine the purpose of the first key corresponding to the second quantum random number; S12. Determine the first concatenation constant corresponding to the purpose of the first key; S13. The first splicing constant and the second quantum random number are spliced together to obtain the first splicing data; S14. Determine the first salt value based on the first spliced data; S15. Determine the first OTP key fragment based on the first salt value and the second quantum random number.
[0039] In this embodiment, the purpose of the first key corresponding to the second quantum random number can be determined. Specifically, after the server completes the generation of the second quantum random number, it assigns a corresponding first key purpose identifier to the second quantum random number according to the currently triggered key distribution service scenario, and determines the purpose of the first key based on the first key purpose identifier. In this embodiment, the purpose of the first key is: to generate OTP key fragments. The first key purpose identifier is used to limit the scope of use of the second quantum random number, which can only be used for the derivation operation of the first OTP key fragment in this application and cannot be reused in other key operations across scenarios.
[0040] Next, the first concatenation constant corresponding to the purpose of the first key can be determined. Specifically, a pre-stored mapping relationship between the purpose of the key and the concatenation constant can be used to determine the first concatenation constant corresponding to the purpose of the first key. Then, the first concatenation constant and the second quantum random number are concatenated to obtain the first concatenation data. Specifically, the first concatenation constant and the second quantum random number can be concatenated bit by bit according to a preset byte alignment rule and concatenation order to form a continuous concatenation bit sequence, i.e., the first concatenation data. For example, the concatenation order of the first concatenation constant first and the second quantum random number last can be used. The concatenation order is agreed upon in advance by the server and the device and kept consistent to ensure that the derivation logic of both ends is consistent.
[0041] Then, the first salt value can be determined based on the first concatenated data. Specifically, the first concatenated data can be directly used as the first salt value, or the first concatenated data can be hashed and compressed to output a fixed-length regular bit sequence as the first salt value, so that the salt value format matches the input parameter requirements of the subsequent key derivation algorithm.
[0042] Finally, the first OTP key fragment can be determined based on the first salt value and the second quantum random number. Specifically, the root key is used as the input key material, the first salt value is used as the salt parameter, and the second quantum random number is used as the context information parameter. The preset key derivation algorithm is called to perform the derivation operation and output the first OTP key fragment of a specified bit length.
[0043] In some embodiments, a preset key derivation algorithm can be encapsulated as a standardized cryptographic operation function, with a predefined set of input parameters and output format specifications. The input parameter set may include input key material, salt value, context information, and target output length, while the output is a regular key sequence of a specified bit length. Both the server and the device execute key derivation operations by calling this function, ensuring complete consistency in the derivation logic at both ends.
[0044] In this way, by matching a dedicated key purpose and an independent concatenation constant to the second quantum random number, the two are concatenated to generate a scenario-specific salt value to derive OTP key fragments, thus achieving isolation of different business key parameters, resisting brute-force attacks and rainbow table attacks, thereby improving the security of key generation.
[0045] S204. Obtain the target basic information corresponding to the device.
[0046] In the embodiments of this application, please refer to Figure 5 , Figure 5 This is a schematic diagram of another server structure provided in an embodiment of this application. As can be seen, in addition to the QRNG module, the server also includes a storage module.
[0047] In a specific embodiment, after the device is powered on for the first time and the link connectivity verification is completed, it can report the target basic information stored locally to the server. The server receives and verifies the integrity and legality of the target basic information. If the verification is successful, it stores the information in the server's storage module for subsequent use in conjunction with the first OTP key fragment to derive a device-specific key. If the link is interrupted or the information verification fails, the server issues a retransmission command, and the device re-uploads the target basic information.
[0048] S205. Determine the device-specific key based on the target basic information and the first OTP key fragment.
[0049] In some embodiments, the target basic information includes: a unique device identifier and a version constant; please refer to [link / reference]. Figure 6 , Figure 6 This is a flowchart of a method for determining a device-specific key provided in an embodiment of this application. It shows that determining the device-specific key using basic information and the first OTP key fragment includes the following steps: S21. Determine the second salt value based on the device's unique identifier and the version constant; S22. The second salt value is processed using the first OTP key fragment to obtain the third salt value; S23. Construct key context information based on the target basic information; S24. Determine the device-specific key based on the key context information and the third salt value.
[0050] In this embodiment of the application, the version constant is a fixed bit sequence pre-configured by the system, used to mark the version number of the current key system, and different version constants are configured for different iterations.
[0051] In a specific embodiment, a second salt value can be determined based on the device unique identifier and the version constant. Specifically, the device unique identifier and the version constant can be concatenated bitwise from start to finish according to a preset concatenation order to form a continuous concatenated bit sequence, i.e., the second salt value. For example, the preset concatenation order can be: version constant first, device unique identifier last. Then, the second salt value is processed by the first OTP key fragment to obtain a third salt value. Specifically, the first OTP key fragment can be used as a hash perturbation parameter and input together with the second salt value into a first preset hash function for compression operation to obtain the third salt value. The first preset hash function can include any of the following: SHA-256 function, SHA-512 function, SHAKE128 function, SHAKE256 function, etc., without limitation.
[0052] Next, key context information can be constructed based on the target basic information. Specifically, in addition to the device unique identifier and version constant, the target basic information can also include a device classification field and a business scenario field. The device classification field and the business scenario field are concatenated into a fixed-length bit stream as the key context information. This key context information is used to mark the device and business scenario corresponding to the current key and limit the scope of key usage. Finally, the device-specific key can be determined based on the key context information and the third salt value.
[0053] Thus, by combining the device's unique identifier and version constant to generate a second salt value, and then processing the first OTP key fragment to obtain a third salt value, a device-specific key is derived by combining the key context. The derived parameters are distinguished from multiple dimensions, including the device's unique identifier, version constant, and quantum random entropy (i.e., the first OTP key fragment), so as to achieve mutual isolation between keys of different devices and different versions, effectively resisting key reuse and mass cracking attacks. At the same time, the use scenario of the key is limited by the context information, which improves the uniqueness and anti-attack capability of the device-specific key.
[0054] In some embodiments, determining the device-specific key based on the key context information and the third salt value includes: S31. Perform hash processing on the key context information to obtain a first hash value; S32. The first hash value and the third salt value are processed by a preset key derivation algorithm to obtain the device-specific key.
[0055] In this embodiment of the application, the key context information is hashed to obtain a first hash value. Specifically, the key context information can be input into a second preset hash function to output the first hash value. The second preset hash function can be preset in advance or be a default value.
[0056] It should be explained that the second preset hash function may be the same as or different from the first preset hash function.
[0057] The device-specific key is obtained by processing the first hash value and the third salt value through a preset key derivation algorithm. Specifically, the root key is used as the input key material, the third salt value is used as the salt parameter, and the first hash value is used as the context information parameter. The preset key derivation algorithm is called to perform the derivation operation and output a bit sequence of fixed bit length, which is the device-specific key.
[0058] In this way, by hashing and regularizing the key context to obtain a first hash value in a unified format, and then combining it with the third salt value to derive a device-specific key, it not only adapts to the input specifications of the key derivation algorithm, but also relies on multiple differentiated parameters to isolate the keys of each device, thereby improving the uniqueness of the key and its resistance to attacks.
[0059] S206. Distribute the first OTP key fragment to the device. After distribution, destroy the first OTP key fragment. The device is used to determine the device-specific key based on the first OTP key fragment and to implement the decryption function based on the device-specific key.
[0060] In this embodiment of the application, after the first OTP key fragment is generated, the first OTP key fragment is distributed to the device through the communication link between the server and the device. After the server confirms that the device has completely received the first OTP key fragment, it immediately clears the first OTP key fragment stored in memory to eliminate the risk of leakage caused by local key storage.
[0061] After receiving the first OTP key fragment, the device combines it with the locally stored target information and derives the corresponding device-specific key according to the same logic as the server. The device can use the device-specific key to decrypt the encrypted data sent by the server in order to carry out normal business interactions.
[0062] In some embodiments, distributing the first OTP key fragment to the device includes: S41. Determine the target communication link type between the server and the device; the target communication link type includes any of the following: fiber optic communication link, tunnel communication link; S42. Determine the target transmission parameters corresponding to the target communication link type; S43. Based on the target transmission parameters, the first OTP key fragment is transmitted to the device via the communication link.
[0063] In this embodiment, the link detection process is automatically executed after the system is powered on, prioritizing the detection of whether there is a valid optical signal in the received optical power of the SFP+ fiber optic transceiver: If a stable and valid optical signal is detected, the target communication link type is determined to be an optical fiber communication link; this link is the preferred transmission channel and is used to transmit the first OTP key fragment to the device in the manner of simulating quantum key distribution (QKD).
[0064] If no valid optical signal is detected, the process will proceed to perform a network tunnel connectivity test to verify whether the network path between the device and the server is reachable. If the network path is normal and the server can be accessed normally, the target communication link type is determined to be a tunnel communication link; this link is a backup transmission channel used to complete the key fragment distribution when the fiber optic communication link is unavailable. If the network path is abnormal and the server is unreachable, it means that the communication link is broken. At this time, the system enters the local caching mode and temporarily stores the first OTP key fragment in the server's storage module. The key fragment distribution process will be executed after the network path is restored.
[0065] Next, the target transmission parameters corresponding to the target communication link type can be determined. Specifically, a pre-stored mapping relationship between communication link types and transmission parameters can be used to determine the target transmission parameters corresponding to the target communication link type.
[0066] In some embodiments, if the target communication link type is an optical fiber communication link, the target transmission parameters may include GTX / SFP+ and optical fiber transmission protocol parameters, adapting to the quantum random number OTP high-speed optical fiber transmission specification; where GTX (Gigabit Transceiver X) represents the FPGA's built-in high-speed serial transceiver, dedicated to high-speed differential data transmission, which can provide a high-speed data path for SFP; SFP (Small Form-factor Pluggable) represents a small pluggable optical / electrical module. SFP+ is an enhanced version of SFP, supporting 10 Gigabit optical fiber transmission and realizing photoelectric signal conversion.
[0067] If the target communication link type is a tunnel communication link, the target transmission parameters can be PQC-mTLS encrypted tunnel configuration parameters, including post-quantum cryptographic suite parameters, two-way authentication parameters, tunnel transmission parameters, etc., which are not limited here.
[0068] Finally, the first OTP key fragment can be transmitted to the device via the communication link according to the target transmission parameters.
[0069] In this way, by distinguishing between two types of communication links, namely fiber optic and tunnel, and matching exclusive transmission parameters to issue the first OTP key fragment, the fiber optic link prioritizes the transmission of high-speed, low-security-loss QKD-like keys, while the tunnel link serves as a backup to ensure network transmission security through quantum encryption. The hierarchical link switching mechanism improves the reliability of key distribution and transmission security, adapting to different deployment environments.
[0070] In some embodiments, when the target communication link type includes an optical fiber communication link, transmitting the first OTP key fragment to the device via the communication link according to the target transmission parameters includes: Link parameter configuration: Based on the target transmission parameters, configure the GTX transmission rate, line coding, and clock recovery parameters, and initialize the SFP+ operating wavelength and transmit optical power threshold to complete the parameter adaptation and link establishment of the optical fiber physical link.
[0071] Key data encapsulation: The first OTP key fragment is encapsulated according to the preset fiber optic transmission frame format, and a frame synchronization header, frame sequence number, and CRC check field are added in sequence to form a standard transmission data frame, ensuring the data's identifiability and integrity verification capability during transmission.
[0072] Photoelectric conversion and direct transmission: The parallel key data is converted into a high-speed serial electrical signal by GTX and sent to SFP+ to complete the electro-optical conversion. The electrical signal is modulated into an optical signal and then transmitted point-to-point to the device through the optical fiber medium. After photoelectric conversion and GTX restoration by SFP+, the device obtains the first OTP key fragment.
[0073] In some embodiments, the tunnel communication link includes a PQC-mTLS encrypted tunnel; when the target communication link type includes the PQC-mTLS encrypted tunnel, transmitting the first OTP key fragment to the device via the communication link according to the target transmission parameters includes: S51. Determine the target packetization parameters corresponding to the PQC-mTLS encrypted tunnel; S52. Package the first OTP key fragment into a data packet according to the target packaging parameters; S53. According to the target transmission parameters, the data packet is loaded into the PQC-mTLS encrypted tunnel for tunnel encryption processing and then sent to the device.
[0074] In this embodiment of the application, the target packetization parameters corresponding to the PQC-mTLS encrypted tunnel can be determined. Specifically, the corresponding target packetization parameters can be obtained by calling the pre-stored packetization parameter mapping relationship in the system according to the transmission constraints of the PQC-mTLS encrypted tunnel. The target packetization parameters may include: data packet frame structure, maximum payload length, frame sequence number encoding rules, etc., which are not limited here.
[0075] Next, the first OTP key fragment is packaged into a data packet according to the target packaging parameters. Specifically, the first OTP key fragment undergoes length adaptation processing based on the maximum payload length in the target packaging parameters: if the total number of bytes in the first OTP key fragment does not exceed the maximum payload length, it is directly used as a single payload unit; if it exceeds the maximum payload length, the first OTP key fragment is divided into multiple sequentially arranged payload units according to the maximum payload length, ensuring that each payload unit meets the length constraint of tunnel transmission. Secondly, according to the frame sequence number encoding rules, a corresponding frame sequence number is assigned to each payload unit to identify the order and fragmentation position of each payload unit. Thirdly, based on the data packet frame structure, the frame synchronization identifier, frame sequence number, payload unit, and integrity check field are sequentially filled in, and the data packet is encapsulated.
[0076] Finally, based on the target transmission parameters, the data packet can be loaded into the PQC-mTLS encrypted tunnel for tunnel encryption processing and then sent to the device. Specifically, the target transmission parameters can be PQC-mTLS encrypted tunnel configuration parameters, including post-quantum cryptographic suite parameters, two-way authentication parameters, tunnel transmission parameters, etc. The data packet transmission process is as follows: Establishing an encrypted tunnel: The server and device perform a PQC-mTLS handshake process based on the post-quantum cryptographic suite parameters and two-way authentication parameters to complete two-way identity verification and post-quantum key negotiation, generate a session encryption key, and establish an end-to-end secure encrypted tunnel.
[0077] Perform tunnel encryption: Send the data packet into the TLS record layer of the tunnel, perform end-to-end encryption on the data packet based on the negotiated session key and encryption algorithm, and encapsulate it into a standard TLS transport message.
[0078] Network transmission and delivery: After completing message fragmentation and sequence numbering according to the tunnel transmission parameters, the encrypted message is sent to the device via the IP network; after the device completes tunnel decryption, message verification and reassembly, it parses to obtain the first OTP key fragment.
[0079] In this way, key fragments are encapsulated using standardized packaging parameters specific to the tunnel, and data packets are transmitted through PQC-mTLS encrypted tunnel. The standardized message structure ensures the integrity and verifiability of the transmission, and the ability to prevent eavesdropping and tampering of key transmission is enhanced by relying on post-quantum encryption and tunnel authentication.
[0080] S207. When the server and the device transmit data, the data is encrypted based on the device's exclusive key to obtain encrypted data, and the encrypted data is transmitted to the device.
[0081] In some embodiments, encrypting the data based on the device-specific key to obtain encrypted data includes: S61. Receive target data request information from the device; the target data request information includes: target request type and target request data information; S62. Generate a third quantum random number using the QRNG module; S63. Determine the target security level based on the target request type; S64. Determine a temporary request key based on the target security level, the third quantum random number, and the device-specific key; S65. Determine the target request data corresponding to the target request data information; S66. Encrypt the target request data using the device-specific key to obtain intermediate encrypted data; S67. Encrypt the intermediate encrypted data using the temporary request key to obtain the encrypted data.
[0082] In this embodiment, the server can receive target data request information sent by the device through an established communication link. Then, it can call the QRNG module to generate a third quantum random number with true randomness and unpredictability. Next, it can determine the target security level based on the target request type. For example, it can pre-store a mapping relationship between preset request types and security levels, and determine the target security level corresponding to the target request type based on this mapping relationship. Then, it can determine a temporary request key based on the target security level, the third quantum random number, and the device-specific key. Specifically, it determines the target key derivation algorithm corresponding to the target security level. For example, it can pre-store a mapping relationship between preset security levels and key derivation algorithms, and determine the target key derivation algorithm corresponding to the target security level based on this mapping relationship. Using the device-specific key as the master key and the third quantum random number as the derivation salt, it calls the target key derivation algorithm to perform derivation operations to obtain the temporary request key. This temporary request key is a one-time key, destroyed immediately after the current interaction, and not persistently stored. The target key derivation algorithm can include any of the following: HKDF algorithm, KMAC algorithm, PBKDF2 algorithm, etc., without limitation.
[0083] Next, the target request data corresponding to the target request data information can be determined. Specifically, the target request data information is used as an index to retrieve the corresponding plaintext data, i.e., the target request data, from the server's storage module. Then, the target request data can be encrypted using the device-specific key to obtain intermediate encrypted data. Specifically, a symmetric encryption algorithm can be used, with the device-specific key as the encryption key, to encrypt the target request data and obtain intermediate encrypted data. Finally, the intermediate encrypted data can be encrypted using a temporary request key to obtain encrypted data. Similarly, a symmetric encryption algorithm can be used, with the temporary request key as the encryption key, to encrypt the intermediate encrypted data and obtain encrypted data.
[0084] It should be explained that the server can also send the third quantum random number, the target security level, and the encrypted data together to the device. Since the device has already determined its own key, it can deduce the temporary request key based on the third quantum random number, the target security level, and the device's own key. Then, it first decrypts the encrypted data using the temporary request key to obtain the intermediate encrypted data. Finally, it decrypts the intermediate encrypted data using the device's own key to obtain the target request data.
[0085] In this way, by using the true random number (i.e. the third quantum random number) generated by QRNG as the source of derived entropy to ensure that the temporary key is unpredictable, and by matching the key specification of the corresponding security level with the request type, a two-layer encryption architecture is adopted, which uses the device-specific key for inner encryption and the temporary request key for outer encryption. This not only establishes a basic security boundary through the device-bound key, but also relies on the one-time temporary key to reduce the security impact of leakage in a single transmission, thus achieving high-security data encryption protection with hierarchical adaptation.
[0086] As can be seen, the quantum random number-based key management method described in this application generates a first quantum random number and a second quantum random number as the end-to-end key entropy source using a QRNG module, replacing the traditional pseudo-random number generator. Then, a root key is constructed based on the first quantum random number, and a one-time-use first OTP key fragment is derived by combining the root key and the second quantum random number. At the same time, the target basic information of the device is integrated to collaboratively generate a device-specific key. After distribution, the first OTP key fragment is destroyed immediately, and data encryption is performed based on the device-specific key during data transmission. This achieves multiple security mechanisms, including constructing an unpredictable underlying trust root with quantum true random entropy, hierarchical transmission of key trust relationships, and strong binding of device identity and business keys, thereby effectively improving the security of key management.
[0087] Please see Figure 7 , Figure 7 This is a schematic diagram of a quantum random number-based key management device provided in an embodiment of this application. It is applied to the server side of a key management system, which also includes a device side. The server side includes a QRNG module. The quantum random number-based key management device 700 includes a random number generation unit 701, a key determination unit 702, a key distribution unit 703, and an encryption unit 704. Wherein: The random number generation unit 701 is used to generate a first quantum random number and a second quantum random number through the QRNG module; The key determination unit 702 is configured to determine a root key based on the first quantum random number; determine a first OTP key fragment based on the root key and the second quantum random number; obtain target basic information corresponding to the device; and determine a device-specific key based on the target basic information and the first OTP key fragment. The key distribution unit 703 is used to distribute the first OTP key fragment to the device, and destroy the first OTP key fragment after distribution; the device is used to determine the device-specific key based on the first OTP key fragment, and implement the decryption function based on the device-specific key. The encryption unit 704 is used to encrypt data based on the device-specific key when the server and the device are transmitting data, to obtain encrypted data, and then transmit the encrypted data to the device.
[0088] It is understood that the functions of each unit module of the quantum random number-based key management device 700 provided in this embodiment can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above method embodiments, and will not be repeated here.
[0089] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include a processor, a memory, a communication interface, and one or more programs. The processor, memory, and communication interface can be interconnected via a bus. The one or more programs are stored in the memory and configured to be executed by the processor. In this embodiment, the one or more programs include instructions for executing other implementations described in the above method embodiments, which will not be repeated here.
[0090] The processor can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, cells, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The communication unit can be a communication interface, transceiver, transceiver circuit, etc., and the storage unit can be a memory.
[0091] The memory can be volatile or non-volatile, or a combination of both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0092] It is understood that electronic devices may include more or fewer structural elements than those shown in the above block diagram, such as power modules, physical buttons, Wi-Fi modules, speakers, Bluetooth modules, sensors, display modules, etc., without limitation.
[0093] This application also provides a computer-readable storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.
[0094] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include an electronic device.
[0095] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0096] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0097] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0098] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0099] The steps of the methods or algorithms described in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (EEPROM), registers, hard disk, portable hard disk, read-only optical disk (CD-ROM), or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Furthermore, the ASIC can reside in a terminal device or management device. Alternatively, the processor and storage medium can exist as discrete components in the terminal device or management device.
[0100] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in the embodiments of this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated.
[0101] The aforementioned computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media.
[0102] The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).
[0103] The modules / units included in the various devices and products described in the above embodiments can be software modules / units, hardware modules / units, or a combination of both. For example, for devices and products applied to or integrated into a chip, all modules / units can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs that run on a processor integrated within the chip, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits. For devices and products applied to or integrated into a chip module, all modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented using hardware methods such as circuits. The implementation is achieved through a software program that runs on the processor integrated within the chip module. The remaining modules / units (if any) can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into terminal equipment, each of their modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components within the terminal equipment. Alternatively, at least some modules / units can be implemented through a software program that runs on the processor integrated within the terminal equipment, while the remaining modules / units (if any) can be implemented using hardware methods such as circuits.
[0104] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above descriptions are merely specific embodiments of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. A key management method based on quantum random numbers, characterized in that, A server-side application for a key management system, the key management system further including a device-side application, the server including a QRNG module; the method including: The QRNG module generates a first quantum random number and a second quantum random number. The root key is determined based on the first quantum random number; The first OTP key fragment is determined based on the root key and the second quantum random number; Obtain the target basic information corresponding to the device; Determine the device-specific key based on the target basic information and the first OTP key fragment; The first OTP key fragment is distributed to the device. After distribution, the first OTP key fragment is destroyed. The device is used to determine the device-specific key based on the first OTP key fragment and to implement the decryption function based on the device-specific key. When data is transmitted between the server and the device, the data is encrypted using the device's proprietary key to obtain encrypted data, and the encrypted data is then transmitted to the device.
2. The method as described in claim 1, characterized in that, The step of determining the first OTP key fragment based on the root key and the second quantum random number includes: Determine the purpose of the first key corresponding to the second quantum random number; Determine the first concatenation constant corresponding to the purpose of the first key; The first splicing constant and the second quantum random number are spliced together to obtain the first splicing data; The first salt value is determined based on the first spliced data; The first OTP key fragment is determined based on the first salt value and the second quantum random number.
3. The method as described in claim 2, characterized in that, The target basic information includes: unique device identifier and version constant; The step of determining the device-specific key based on the target basic information and the first OTP key fragment includes: The second salt value is determined based on the device's unique identifier and the version constant; The second salt value is processed using the first OTP key fragment to obtain the third salt value; Construct key context information based on the target basic information; The device-specific key is determined based on the key context information and the third salt value.
4. The method as described in claim 3, characterized in that, Determining the device-specific key based on the key context information and the third salt value includes: The key context information is hashed to obtain a first hash value; The device-specific key is obtained by processing the first hash value and the third salt value using a preset key derivation algorithm.
5. The method according to any one of claims 1-4, characterized in that, The step of distributing the first OTP key fragment to the device includes: Determine the target communication link type between the server and the device; the target communication link type includes any of the following: fiber optic communication link, tunnel communication link; Determine the target transmission parameters corresponding to the target communication link type; According to the target transmission parameters, the first OTP key fragment is transmitted to the device through the communication link.
6. The method as described in claim 5, characterized in that, The tunnel communication link includes a PQC-mTLS encrypted tunnel; When the target communication link type includes the PQC-mTLS encrypted tunnel, transmitting the first OTP key fragment to the device via the communication link according to the target transmission parameters includes: Determine the target packetization parameters corresponding to the PQC-mTLS encrypted tunnel; The first OTP key fragment is packaged into a data packet according to the target packaging parameters; According to the target transmission parameters, the data packet is loaded into the PQC-mTLS encrypted tunnel for tunnel encryption processing and then sent to the device.
7. The method as described in claim 6, characterized in that, The encryption of data based on the device's proprietary key to obtain encrypted data includes: Receive target data request information from the device; the target data request information includes: target request type and target request data information; The QRNG module generates a third quantum random number. Determine the target security level based on the target request type; A temporary request key is determined based on the target security level, the third quantum random number, and the device-specific key; Determine the target request data corresponding to the target request data information; The target request data is encrypted using the device-specific key to obtain intermediate encrypted data; The intermediate encrypted data is encrypted using the temporary request key to obtain the encrypted data.
8. A key management device based on quantum random numbers, characterized in that, The key management system is applied to a server-side application, and the key management system also includes a device-side application. The server-side application includes a QRNG module; the device includes a random number generation unit, a key determination unit, a key distribution unit, and an encryption unit; wherein: The random number generation unit is used to generate a first quantum random number and a second quantum random number through the QRNG module; The key determination unit is configured to: determine a root key based on the first quantum random number; determine a first OTP key fragment based on the root key and the second quantum random number; obtain target basic information corresponding to the device; and determine a device-specific key based on the target basic information and the first OTP key fragment. The key distribution unit is used to distribute the first OTP key fragment to the device, and destroy the first OTP key fragment after distribution; the device is used to determine the device-specific key based on the first OTP key fragment, and implement the decryption function based on the device-specific key. The encryption unit is used to encrypt data based on the device's proprietary key during data transmission between the server and the device to obtain encrypted data, and then transmit the encrypted data to the device.
9. An electronic device, characterized in that, include: Processor, memory, communication interface, and one or more programs; The one or more programs are stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps of the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, A computer program for storing electronic data interchange, wherein the computer program causes a computer to perform the method as described in any one of claims 1-7.