Key storage method, key extraction method and key storage system
By precoding the key, key pattern information is generated and storage is bound by scattering media, the problem of insufficient security in the traditional key storage mechanism is solved, and the high security storage and extraction of keys is achieved.
Patent Information
- Application Number
- CN202310496721.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-04
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-05-04
AI Technical Summary
Traditional key storage mechanisms cannot resist physical attacks and illegal replication of untrusted supply chains, and are not very secure and pose great security risks.
Key pattern information is generated by precoding the original key, and the optical information and scattering medium are bound to storage. The non-clonability of the scattering medium ensures the security of the key. The stored key includes the target optical information and the scattering medium matching the original key.
Improve the security level of keys, preventing keys from being cloned and stolen, and enhancing user information security.
Smart Images

Figure CN116405207B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a key storage method, a key storage device, a key extraction method, a key extraction device, a key storage system, a computer device, a storage medium, and a computer program product. Background Art
[0002] With the rapid development of computer networks and modern communication technologies, people have put forward higher requirements on all aspects of key applications.
[0003] Traditional key storage methods permanently store keys in digital form within devices, such as those based on non-volatile memory (NVM) registers like EEPROM (Electrically Erasable Programmable Read-Only Memory) and Flash Memory (Flash Memory). These key storage mechanisms are vulnerable to physical attacks that could result from an attacker gaining access to the storage device (e.g., a stolen USB drive for copying). They also cannot prevent illegal copying and counterfeiting during the manufacturing process by attackers in untrusted supply chains.
[0004] It can be seen that in the traditional key storage mechanism, the storage medium is not clonable, so the security is not high, which brings great security risks to user information. Summary of the Invention
[0005] Based on this, it is necessary to provide a key storage method, key storage device, key extraction method, key extraction device, key storage system, computer equipment, storage medium and computer program product that can improve the security of key storage in response to the above technical problems.
[0006] In a first aspect, the present application provides a key storage method. The key storage method includes:
[0007] Pre-encoding the original key to be stored to obtain key pattern information;
[0008] Target optical information is generated based on the key pattern information; wherein, after the target optical information is sent to an optical modulator, the optical modulator modulates the incident light signal to obtain a target incident wavefront; after the target incident wavefront passes through a scattering medium, feedback pattern information matching the key pattern information is generated on a receiving device; the scattering medium is matched one-to-one with the original key; and the stored key includes the target optical information and the scattering medium matching the original key.
[0009] In one embodiment, generating target optical information according to the key pattern information includes:
[0010] Initializing a plurality of random optical information and sending the plurality of random optical information to an optical modulator; the optical modulator modulates a received incident light signal according to each of the random optical information to obtain a random incident wavefront corresponding to each of the random optical information;
[0011] receiving a plurality of feedback pattern information; the feedback pattern information being information generated on a receiving device after the random incident wavefront passes through a scattering medium;
[0012] The target optical information is obtained according to each random optical information in combination with the correlation between each feedback pattern information and the key pattern information.
[0013] In one embodiment, the step of combining the correlation between each feedback pattern information and the key pattern information and obtaining the target optical information according to each random optical information includes:
[0014] sorting the random optical information according to the correlation between the feedback pattern information and the key pattern information;
[0015] Based on the sorting of the random optical information, the selected random optical information is optimized and iterated to obtain a plurality of iterative optical information, and each of the iterative optical information is sent to the optical modulator; the optical modulator modulates the incident light signal according to each of the iterative optical information to obtain a plurality of iterative incident wavefronts;
[0016] If feedback pattern information matching the key pattern information is received, the optimization iteration is stopped, and the iterative optical information corresponding to the feedback pattern information matching the key pattern information is used as the target optical information; the feedback pattern information is the information generated on the receiving device after the iterative incident wavefront passes through the scattering medium.
[0017] In one embodiment, the optimizing and iterating the selected random optical information based on the sorting of the random optical information to obtain a plurality of iterative optical information, and sending each iterative optical information to the optical modulator includes:
[0018] If the number of optimization iterations for each random optical information reaches the preset target iteration number, the iteration is stopped, and the final iterative optical information is used as the target optical information, and the feedback pattern information corresponding to the final iterative optical information matches the key pattern information.
[0019] In a second aspect, the present application further provides a key storage system, which includes a controller, an optical modulator connected to the controller, and a receiving device, wherein the controller is configured to store keys according to the key storage method described above.
[0020] In a third aspect, the present application further provides a key storage device. The key storage device comprises:
[0021] An encoding module, used for pre-encoding the original key to be stored to obtain key pattern information;
[0022] A storage module is configured to generate target optical information based on the key pattern information; wherein, after the target optical information is sent to an optical modulator, the optical modulator modulates the incident optical signal to obtain a target incident wavefront; after the target incident wavefront passes through a scattering medium, feedback pattern information matching the key pattern information is generated on a receiving device; the scattering medium is matched one-to-one with the original key; and the stored key includes the target optical information and the scattering medium matching the original key.
[0023] In a fourth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0024] Pre-encoding the original key to be stored to obtain key pattern information;
[0025] Target optical information is generated based on the key pattern information; wherein, after the target optical information is sent to an optical modulator, the optical modulator modulates the incident light signal to obtain a target incident wavefront; after the target incident wavefront passes through a scattering medium, feedback pattern information matching the key pattern information is generated on a receiving device; the scattering medium is matched one-to-one with the original key; and the stored key includes the target optical information and the scattering medium matching the original key.
[0026] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0027] Pre-encoding the original key to be stored to obtain key pattern information;
[0028] Target optical information is generated based on the key pattern information; wherein, after the target optical information is sent to an optical modulator, the optical modulator modulates the incident light signal to obtain a target incident wavefront; after the target incident wavefront passes through a scattering medium, feedback pattern information matching the key pattern information is generated on a receiving device; the scattering medium is matched one-to-one with the original key; and the stored key includes the target optical information and the scattering medium matching the original key.
[0029] In a sixth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:
[0030] Pre-encoding the original key to be stored to obtain key pattern information;
[0031] Target optical information is generated based on the key pattern information; wherein, after the target optical information is sent to an optical modulator, the optical modulator modulates the incident light signal to obtain a target incident wavefront; after the target incident wavefront passes through a scattering medium, feedback pattern information matching the key pattern information is generated on a receiving device; the scattering medium is matched one-to-one with the original key; and the stored key includes the target optical information and the scattering medium matching the original key.
[0032] The key storage method, key storage device, key custody system, computer device, storage medium, and computer program product described above pre-encode the original key to be stored to obtain key pattern information; then generate target optical information based on the key pattern information; wherein, after the target optical information is sent to an optical modulator, the optical modulator modulates the incident light signal to obtain a target incident wavefront; after the target incident wavefront passes through a scattering medium, feedback pattern information matching the key pattern information is generated on a receiving device; the scattering medium is matched one-to-one with the original key; and the stored key includes the target optical information and the scattering medium matching the original key. Thus, the user only needs to keep the target optical information and the scattering medium related to the original key. Since the complex internal structure of the scattering medium cannot be copied, it cannot be cloned. Even if an attacker physically accesses the scattering medium or the target optical information, the original key cannot be stolen, thereby improving the security level of the original key and, in turn, user information security.
[0033] In a seventh aspect, the present application provides a key extraction method. The key extraction method includes:
[0034] Obtaining target optical information of the key to be extracted, and sending the target optical information to an optical modulator; the optical modulator modulates an incident light signal according to the target optical information to obtain a target incident wavefront;
[0035] Receiving feedback pattern information; the feedback pattern information is information generated on the receiving device after the target incident wavefront passes through the scattering medium; the scattering medium matches the key to be extracted;
[0036] An original key is generated according to the feedback pattern information; wherein the feedback pattern information matches the key pattern information, and the key pattern information is obtained by precoding based on the original key.
[0037] In an eighth aspect, the present application further provides a key storage system, which includes a controller, an optical modulator connected to the controller, and a receiving device, wherein the controller is configured to extract a key according to the key extraction method described above.
[0038] In a ninth aspect, the present application further provides a key extraction device. The key extraction device comprises:
[0039] An extraction module is used to obtain target optical information of the key to be extracted and send the target optical information to an optical modulator; the optical modulator modulates the incident light signal according to the target optical information to obtain a target incident wavefront;
[0040] A receiving module, configured to receive feedback pattern information; the feedback pattern information is information generated on a receiving device after the target incident wavefront passes through a scattering medium; the scattering medium matches the key to be extracted;
[0041] A decoding module is used to generate an original key according to the feedback pattern information; wherein the feedback pattern information matches the key pattern information, and the key pattern information is obtained by precoding based on the original key.
[0042] In a tenth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0043] Obtaining target optical information of the key to be extracted, and sending the target optical information to an optical modulator; the optical modulator modulates an incident light signal according to the target optical information to obtain a target incident wavefront;
[0044] Receiving feedback pattern information; the feedback pattern information is information generated on the receiving device after the target incident wavefront passes through the scattering medium; the scattering medium matches the key to be extracted;
[0045] An original key is generated according to the feedback pattern information; wherein the feedback pattern information matches the key pattern information, and the key pattern information is obtained by precoding based on the original key.
[0046] In an eleventh aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0047] Obtaining target optical information of the key to be extracted, and sending the target optical information to an optical modulator; the optical modulator modulates an incident light signal according to the target optical information to obtain a target incident wavefront;
[0048] Receiving feedback pattern information; the feedback pattern information is information generated on the receiving device after the target incident wavefront passes through the scattering medium; the scattering medium matches the key to be extracted;
[0049] An original key is generated according to the feedback pattern information; wherein the feedback pattern information matches the key pattern information, and the key pattern information is obtained by precoding based on the original key.
[0050] In a twelfth aspect, the present application further provides a computer program product. The computer program product includes a computer program, which, when executed by a processor, implements the following steps:
[0051] Obtaining target optical information of the key to be extracted, and sending the target optical information to an optical modulator; the optical modulator modulates an incident light signal according to the target optical information to obtain a target incident wavefront;
[0052] Receiving feedback pattern information; the feedback pattern information is information generated on the receiving device after the target incident wavefront passes through the scattering medium; the scattering medium matches the key to be extracted;
[0053] An original key is generated according to the feedback pattern information; wherein the feedback pattern information matches the key pattern information, and the key pattern information is obtained by precoding based on the original key.
[0054] The key extraction method, key extraction device, key storage system, computer device, storage medium, and computer program product described above obtain target optical information of the key to be extracted and transmit the target optical information to an optical modulator; the optical modulator modulates the incident light signal according to the target optical information to obtain a target incident wavefront; and receives feedback pattern information; the feedback pattern information is information generated on the receiving device after the target incident wavefront passes through a scattering medium; the scattering medium matches the key to be extracted; and the original key is generated based on the feedback pattern information; wherein the feedback pattern information matches the key pattern information, and the key pattern information is pre-coded based on the original key. During the key extraction process, because the scattering medium is non-replicable, the user can only complete the extraction by providing a matching scattering medium. This prevents the key from being stolen, thus providing higher security and improving user information security. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A diagram illustrating an application environment of a key storage method and a key extraction method in one embodiment;
[0056] Figure 2 1 is a flow chart of a key storage method according to an embodiment;
[0057] Figure 3 A schematic diagram of a key storage method according to an embodiment;
[0058] Figure 4 A schematic diagram of a process for generating target optical information based on key pattern information in one embodiment;
[0059] Figure 5 A schematic diagram of a process for obtaining target optical information based on each random optical information in accordance with the correlation between each feedback pattern information and the key pattern information in one embodiment;
[0060] Figure 6 A schematic diagram of a process for obtaining target optical information according to each random optical information in accordance with the correlation between each feedback pattern information and the key pattern information in another embodiment;
[0061] Figure 7 Schematic diagram of a flow chart of a multi-objective genetic optimization algorithm NSGA-II in one embodiment;
[0062] Figure 8 1 is a flow chart of a key extraction method according to an embodiment;
[0063] Figure 9 This is a schematic diagram of the correlation coefficient when the population size is 64, 128, and 256 during the simulation process;
[0064] Figure 10is a structural block diagram of a key storage device in one embodiment;
[0065] Figure 11 is a structural block diagram of a key extraction device in one embodiment;
[0066] Figure 12 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0068] The security of keys throughout their entire lifecycle—from generation, storage, use, and destruction—is crucial. Keys spend the longest time in storage during this lifecycle. Like processes like information encryption and identity authentication, secure key storage is a crucial component of key security applications. Furthermore, humans cannot memorize keys of practical length. This crucial fact necessitates that keys be stored elsewhere, such as in NVM. However, this key storage method cannot guarantee against illegal copying and counterfeiting during the manufacturing process by attackers in untrusted supply chains. Furthermore, there is a clear need for higher-level secure storage of numerical keys (such as private keys in RSA asymmetric encryption).
[0069] Based on this, the present application provides a key storage method that can improve the security of key storage, and the key storage method can be applied to a key storage system. In some embodiments, Figure 1 As shown, the key storage system includes a controller 110, an optical modulator 120 connected to the controller 110, and a receiving device 130. The controller 110 pre-encodes the original key to be stored to obtain key pattern information; target optical information is then generated based on the key pattern information. After the target optical information is sent to the optical modulator 120, the optical modulator 120 modulates the incident optical signal to obtain a target incident wavefront. After the target incident wavefront passes through the scattering medium 150, feedback pattern information matching the key pattern information is generated on the receiving device 130. The scattering medium 150 is matched one-to-one with the original key. The stored key includes the target optical information and the scattering medium matching the original key.
[0070] The controller 110 can be, but is not limited to, various personal computers, laptops, smartphones, tablet computers, and IoT devices. The optical modulator 120 can be, for example, a spatial modulator, which, under the control of the controller, can modulate a parameter of the light field through liquid crystal molecules. For example, by modulating the amplitude of the light field, modulating the phase through the refractive index, modulating the polarization state through the rotation of the polarization plane, or converting incoherent light into coherent light, thereby writing certain information into the light wave and achieving the purpose of light wave modulation. The receiving device 130 can include an image plane detector such as a CCD (Charge Coupled Device) capable of receiving pattern information. Preferably, the receiving device 130 is a monochrome CCD.
[0071] Furthermore, the key storage system may further include a light source 140 for outputting an incident light signal. Exemplarily, the light source 140 is a coherent light source, and the incident light signal is coherent radiation.
[0072] In one embodiment, Figure 2 As shown, a key storage method is provided, which is applied to Figure 1 Taking the controller in as an example, the method includes the following steps 200 and 300.
[0073] Step 200: pre-encode the original key to be stored to obtain key pattern information.
[0074] The key pattern type is not limited; it only needs to be able to be pre-encoded from the original key and decoded to yield the original key. For example, the key pattern can be a QR code, barcode, or other pattern that can contain information. The key pattern information includes key pattern-related information, such as the key pattern, its brightness, and grayscale values.
[0075] The original key can be an existing key, and its type is not limited. For example, the original key can include a digital key and an optical key. A digital key, as the name suggests, is a digital key. An optical key can be a key derived from an optical encryption system, such as a phase mask. This embodiment does not limit the type of the original key; as long as the key pattern can be obtained through pre-coding by the controller, it will suffice.
[0076] Step 300: Generate target optical information according to key pattern information.
[0077] Among them, after the target optical information is sent to the optical modulator, the optical modulator modulates the incident light signal to obtain the target incident wavefront; after the target incident wavefront passes through the scattering medium, feedback pattern information matching the key pattern information is generated on the receiving device; the scattering medium is matched one-to-one with the original key; the stored key includes the target optical information and the scattering medium matching the original key.
[0078] In this embodiment, the target optical information can be obtained based on the wavefront shaping technology, the optical modulator can be a phase spatial light modulator, and the target optical information generated by the controller based on the key pattern information may include phase information for controlling the phase spatial light modulator, and the phase information may be a phase map.
[0079] After receiving the target optical information, the optical modulator modulates the incident light signal based on this information to produce the target incident wavefront. For example, if the target optical information includes target phase information, modulating the modulation element on the spatial light modulator with this target phase information can change the phase of the incident light signal and produce the corresponding target incident wavefront.
[0080] A scattering medium is a substance that scatters light. After passing through the scattering medium, the target incident wavefront coherently superimposes in the target area, focusing the characteristic pattern of the scattered light waves on the receiving device. The resulting speckle pattern on the receiving device forms a target feedback pattern, which the receiving device then generates feedback pattern information based on. This feedback pattern information includes information about the feedback pattern, such as the feedback pattern, its brightness, and grayscale values.
[0081] The feedback pattern information that matches the key pattern information will subsequently be used to extract the original key. The specific requirements for matching the feedback pattern information with the key pattern information can be set based on actual conditions, as long as the original key extraction requirements are met. For example, matching can be when two pieces of information meet a certain relationship. For example, when the correlation coefficient between the key pattern and the feedback pattern reaches a preset matching value, the feedback pattern information can be considered to match the key pattern information. The preset matching value can be set based on actual conditions. Matching can also be when the two pieces of information are consistent. For example, if the feedback pattern and the brightness of the feedback pattern in the feedback pattern information are consistent with the key pattern and the brightness of the key pattern in the key pattern information, then the feedback pattern information matches the key pattern information. Alternatively, if the feedback pattern and the key pattern are consistent, but the brightness of the feedback pattern and the brightness of the key pattern are inconsistent, but the brightness of the feedback pattern and the brightness of the key pattern meet the preset requirements, then the feedback pattern information matches the key pattern information.
[0082] Since the feedback pattern information matching the key pattern information is obtained based on the target optical information and the matching scattering medium, the stored key includes the target optical information and the scattering medium matching the original key, thereby realizing the "binding" of the original key, the multiple scattering medium and the target optical information, such as Figure 3 The target optical information and scattering medium can be kept by the user to facilitate the subsequent extraction of the original key, or they can be handed over to a reliable institution for protection to further ensure the security of the key.
[0083] Scattering media have the following characteristics: 1. The unpredictable interaction between coherent radiation and the scattering medium makes it difficult to accurately explore the internal structure of the scattering medium. 2. The manufacturing process of scattering media is also full of randomness. For example, when making a scattering medium using zinc oxide as the raw material, the method used is to spray the zinc oxide onto a glass base. The resulting scattering medium is filled with irregularly distributed micro-nanoparticles. Based on these two characteristics of scattering media, it is virtually impossible to replicate two identical scattering media. Therefore, scattering media can be regarded as a physically unclonable function (PUF). Therefore, even if an attacker has physical access to the scattering medium, it cannot be copied.
[0084] The key storage method pre-encodes the original key to be stored to obtain key pattern information; then generates target optical information based on the key pattern information. After the target optical information is sent to an optical modulator, the optical modulator modulates the incident light signal to obtain a target incident wavefront; after the target incident wavefront passes through a scattering medium, feedback pattern information matching the key pattern information is generated on a receiving device; the scattering medium is matched one-to-one with the original key; and the stored key includes the target optical information and the scattering medium matching the original key. Thus, users only need to keep the scattering medium and target optical information related to the original key. Since the complex internal structure of the scattering medium cannot be copied, it cannot be cloned. Even if an attacker physically accesses the scattering medium, they cannot steal the original key, thereby improving the security level of the original key and, in turn, user information security.
[0085] Preferably, the scattering medium may include a multiple scattering medium. A multiple scattering medium is a material that causes multiple scattering of light and has a more complex structure. Binding the multiple scattering medium to the original key and converting the original key into the multiple scattering medium using the key storage method can further enhance security. The number of multiple scattering media can be determined based on actual circumstances and is not limited in this embodiment.
[0086] The target optical information can also be in a publicly available form. This is because the user maintains the non-copyable scattering medium. Even if the target optical information is stolen, there's no risk of leaking the original key. Those skilled in the art will appreciate that if the target optical information is inconvenient for the user to keep, they can determine other forms of storage based on the target optical information and provide them to the user for safekeeping. The form of the storage basis is not limited; as long as the target optical information containing the key can be retrieved based on the storage basis, it will suffice.
[0087] Furthermore, in related technologies, biometrics (such as fingerprints and irises) are often used to improve the security of key storage and reduce the risk of cloning. However, with the continuous advancement of biometric cloning and replication technology, the risk of biometric cloning is becoming increasingly greater. Furthermore, the methods used to collect biometrics can easily infringe on personal privacy, and the collected biometric information can be easily misused, resulting in serious consequences.
[0088] In contrast, the unclonability of this embodiment stems from the unclonability of the scattering medium. The internal structural information of the scattering medium cannot be read, let alone illegally exploited. Therefore, the security of the key is improved without infringing the user's biometric privacy. Furthermore, this key storage solution is based on a key storage system. The key storage system includes an optical path consisting of an incident light source, an optical modulator, and a receiving device, as well as circuits between the controller and the optical modulator, and between the controller and the receiving device. Therefore, the key storage system is an optoelectronic hybrid system. Signal transmission speeds based on this optoelectronic hybrid system are very high, making the storage of the original key very fast.
[0089] Furthermore, because the security of encrypted plaintext depends heavily on the size of the key space, keys are typically around several hundred bits long. Furthermore, different encryption algorithms, and even the same algorithm used to encrypt plaintext of varying lengths, require different key lengths. For example, the asymmetric RSA algorithm requires keys ranging from 96 to 1024 bits when encrypting plaintext of varying lengths. Therefore, to facilitate binding the original key to the multi-scattering medium, these long, non-fixed digital keys can be unified and pre-encoded into key patterns to generate key pattern information.
[0090] In this embodiment, a QR code is chosen as the precoding method because it offers strong robustness, excellent anti-interference properties, and a large data capacity, allowing for uniform encoding of long, non-fixed digital keys. After precoding the original key to form the key QR code, an optical modulator modulates the target incident wavefront. The speckle pattern of the incident wavefront after passing through the multi-scattering medium forms the key QR code pattern on the receiving device, thereby establishing a one-to-one mapping between the scattering medium and the key QR code.
[0091] In actual implementation, the most primitive and simple Version 1 QR code can be selected as the encoding format to reduce the computational complexity and time of the pre-encoding process. Furthermore, using the Version 1 QR code pattern as the truth map, modulating the optical modulator according to this truth map, and ultimately obtaining feedback pattern information that matches the key pattern information can be significantly shortened.
[0092] Furthermore, when the original key is a digital key (i.e., a numerical key) obtained according to a computer cryptographic system, the controller pre-encodes the digital key to obtain a Version 1 QR code as the key pattern, and then the target optical information is obtained through wavefront shaping technology to achieve "binding" of the digital key and the scattering medium, completing the storage process.
[0093] When the original key is a phase mask obtained based on an optical encryption system, the controller pre-encodes the phase mask to obtain the Version 1 QR code as the key pattern, obtains the key pattern information, and then obtains the target optical information through wavefront shaping technology to achieve "binding" of the phase mask and the scattering medium, completing the storage process.
[0094] It is understood that when performing wavefront shaping according to the key pattern, a specific method can be selected based on actual conditions. For example, a spatial domain wavefront shaping technology based on feedback optimization can be used to focus the key QR code.
[0095] Specifically, when coherent light is used as the incident light and illuminates a scattering medium, a disordered interference pattern, known as laser speckle, is detected on the detection plane of the receiving device. Due to the linear nature of the scattering process, the input and output model of light waves in a scattering medium can be expressed as follows:
[0096] , (1)
[0097] Where m and n represent the rows and columns in the modulation unit sequence in the optical modulator, E m represents the complex amplitude received by the detection plane, and the element represents the m-row and n-column matrix transfer matrix, and represents the amplitude and phase of the light waves from different incident channels, i represents a complex number, and e represents a mathematical constant. Each element of the transmission matrix represents the contribution of each incident channel to the target output point. Under the above-mentioned input and output model of light waves passing through a scattering medium, the principle of spatial wavefront shaping technology based on feedback optimization can be as follows: by modulating the modulation unit on the spatial light modulator, the phase of the incident light is changed, so that the light waves from different incident channels are coherently enhanced in the target area after passing through the scattering medium. This can achieve single-point focusing or multi-point focusing of the scattered light waves, forming a feedback pattern on the receiving device. The modulation feedback process collects feedback pattern information as a feedback signal through the receiving device. The feedback signal includes speckle through the multi-scattering medium. The QR code can be regarded as composed of different light and dark distributions of multiple points. Therefore, wavefront shaping technology can be used to achieve a one-to-one binding of the QR code to the unclonable multi-scattering medium, and ensure the recognizability of the QR code achieved by wavefront shaping technology, thereby ensuring the accuracy of the key extraction process.
[0098] It should also be noted that the information obtained by the receiving device (such as the image plane detector) based on the feedback pattern formed by the collected speckle is feedback pattern information.
[0099] In one embodiment, Figure 4 As shown, step 300 may include steps 310 to 330.
[0100] Step 310: Initialize a plurality of random optical information and send the plurality of random optical information to an optical modulator.
[0101] The optical modulator modulates the received incident light signal according to each random optical information to obtain a random incident wavefront corresponding to each random optical information.
[0102] Specifically, during population initialization, the controller can generate multiple random phase masks (random optical information) of a preset pixel size as the initial individuals of the population, taking into account actual conditions. The number of random phase masks is determined based on factors such as the algorithm's convergence speed, solution accuracy, and time consumption. The preset size can be determined based on factors such as the key QR code and the receiving device, for example, 100.
[0103] After the controller sends multiple random phase masks to the optical modulator, the optical modulator modulates the received coherent radiation according to each random phase mask to obtain a random incident wavefront corresponding to each random phase mask.
[0104] Step 320: Receive multiple feedback pattern information.
[0105] The feedback pattern information is the information generated on the receiving device after the random incident wavefront passes through the scattering medium.
[0106] After passing through the scattering medium, the randomly incident wavefronts from different incident channels are coherently enhanced in the target area, achieving single-point or multi-point focusing of the scattered light waves, forming feedback pattern information on the receiving device. The receiving device then sends the feedback pattern information to the controller.
[0107] Step 330 : combining the correlation between each feedback pattern information and the key pattern information, and obtaining target optical information according to each random optical information.
[0108] After receiving the feedback pattern information, the controller determines the correlation between each feedback pattern information and the key pattern information. The correlation coefficient can be used as an evaluation index to evaluate the focusing effect of each feedback pattern.
[0109] It can be understood that when the correlation coefficient is larger, the focusing effect of the feedback pattern is closer to the key pattern as the true value map. When the correlation coefficient between the feedback pattern and the true value map is greater than a certain value (such as a preset matching value), the focusing effect of the feedback pattern can meet the needs (such as the original key can be obtained by decoding based on the feedback pattern).
[0110] In one embodiment, when determining the target optical information (target phase mask), the determination can be based on the phase masks corresponding to the feedback image information with a correlation greater than a preset matching value. In another embodiment, the correlation between each piece of feedback pattern information and the key pattern information can be sorted from highest to lowest correlation. The phase masks corresponding to a preset number of top-ranked feedback image information are then selected. Based on these phase masks, the target phase mask is determined and used as the target optical information.
[0111] This method "binds" the key pattern (such as a QR code) to the scattering medium and target optical information, effectively converting the original key into the scattering medium. This improves the security of the original key by leveraging the unclonable nature of the scattering medium. Furthermore, a more focused feedback pattern based on the target optical information and the scattering medium can be generated, resulting in higher accuracy in subsequent extraction of the original key.
[0112] In combination with the correlation between each feedback pattern information and the key pattern information, when the target optical information is obtained according to each random optical information, an optimization algorithm can be used to perform iterative optimization.
[0113] In one embodiment, Figure 5 As shown, step 330 may include steps 331 to 333.
[0114] Step 331 : sorting each random optical information according to the correlation between each feedback pattern information and the key pattern information.
[0115] It can be understood that the ranking of the correlation between each feedback pattern information and the key pattern information can be used as the basis for sorting each random optical information. Therefore, the random optical information corresponding to each feedback pattern information can be sorted with reference to the order of the feedback pattern information, thereby obtaining the sorting of each random optical information.
[0116] Step 332 : Based on the sorting of the random optical information, the selected random optical information is optimized and iterated to obtain a plurality of iterative optical information, and each iterative optical information is sent to the optical modulator.
[0117] The optical modulator modulates the incident light signal according to each iterative optical information to obtain multiple iterative incident wavefronts.
[0118] Since the random optical information that is ranked higher in the order has a better focusing effect on the corresponding feedback image, a preset number of random optical information that are ranked higher in the order can be selected for optimization iteration to obtain iterative optical information with a more optimized effect. The preset number can be set according to actual conditions.
[0119] Step 333: If feedback pattern information matching the key pattern information is received, the optimization iteration is stopped, and the iterative optical information corresponding to the feedback pattern information matching the key pattern information is used as the target optical information.
[0120] The feedback pattern information is the information generated on the receiving device after the iterative incident wavefront passes through the scattering medium.
[0121] In this embodiment, when the correlation coefficient between the key pattern and the feedback pattern reaches a preset coefficient value, it is considered that the feedback pattern information matches the key pattern information.
[0122] During the continuous optimization and iteration process, the controller continuously receives feedback pattern information from the receiving device, and continuously compares the feedback pattern with the key pattern based on the feedback pattern information until the feedback pattern information that matches the key pattern information is obtained, and stops the optimization iteration to ensure the quality of the feedback pattern.
[0123] In one embodiment, Figure 6 As shown, step 332 may further include step 334: if the number of optimization iterations for each random optical information reaches a preset target number of iterations, the iteration is stopped, and the final iterative optical information is used as the target optical information, and the feedback pattern information corresponding to the final iterative optical information is matched with the key pattern information.
[0124] The preset target number of iterations is set during initialization. The specific value of the preset target number of iterations can be set based on actual needs, such as 1000. In this embodiment, once the loop is completed until all iterations are completed, the final feedback pattern information is used as the feedback pattern information that matches the key pattern information. Because the optimization iteration process does not determine whether the feedback pattern information matches the key pattern information, the calculation speed can be improved, saving a lot of computational effort.
[0125] Furthermore, when the number of optimization iterations reaches the preset target number of iterations, it can be determined whether the final feedback pattern information matches the key pattern information. If not, the optimization iteration process is repeated again until the target optical information is determined.
[0126] In a specific embodiment, since it is necessary to achieve complex pattern focusing (two-dimensional code) through wavefront shaping technology, a more applicable multi-objective genetic optimization algorithm NSGA-II can be used.
[0127] like Figure 7 As shown, during the population initialization process, the number of evolutions can be set to T and the mutation probability can be set based on the actual situation. , initialize the k value. Then generate M random phase masks of size 100×100 pixels as the initial individuals of the population, that is, random optical information.
[0128] It should also be noted that before performing the fitness evaluation, it is also necessary to select a suitable objective function constrained iterative optimization algorithm. The goal in this embodiment is to modulate the speckle pattern into a two-dimensional code. The two-dimensional code has a delicate and complex structure. Therefore, it is necessary to first ensure that the light wave can be effectively focused on the area corresponding to the white pixel. In other words, the light intensity value of the focused area needs to be as large as possible. The second issue that needs to be considered is how to ensure the uniformity of the light intensity of the white pixel area and the black pixel area. This is because although the two-dimensional code has good error correction capabilities and can tolerate a certain proportion of pixel grayscale value inversion, if the receiving device wants to successfully identify the information of the two-dimensional code, the pixel value inversion ratio must be within the tolerance range. Therefore, the uniformity of the light intensity of the white pixel area and the black pixel area must be ensured. Based on the above two points, preferably, the following two objective evaluation functions can be selected to evaluate the fitness level of individuals in the population:
[0129]
[0130]
[0131] Among them, f1 represents the brightness of the area corresponding to the white pixel, i represents the pixel number of the target area, Indicates the light intensity at each point in the focus area, that is, the intensity value of the white pixel area in the image plane and the QR code pattern. represents the intensity value of the background area; f2 represents the uniformity of the area corresponding to white pixels and black pixels, and Represent the standard deviation of the light intensity of white pixels and black pixels respectively. It should also be noted that the NSGA-II algorithm is an optimization algorithm that minimizes the objective function, so the negative sign needs to be added to Equation (2).
[0132] The fitness of each masked individual is then evaluated based on the two determined objective functions. Based on the fitness value obtained from the fitness evaluation, each mask is non-dominated and sorted, and the corresponding crowding distance is calculated. Based on the results of the non-dominated sorting and crowding distance calculations, a selection probability is assigned to each individual. Individuals with higher rankings and greater crowding distances have a greater probability of being selected as a parent. For example, the selection probability can be assigned to each individual according to a geometric progression, as shown in the following formula:
[0133]
[0134] Among them, i represents the sorting level of non-dominated sorting, p i Represents the probability of being selected, M represents the initial individual book of the population, and q is the probability of the first-ranked individual being selected. M and q can be set according to the actual situation, for example, q is set to 0.005.
[0135] Next, a roulette wheel algorithm is used to select two parents from each of the M individuals, repeating this cycle M / 2 times for a total of M parents. These M parents are then divided into two groups, and uniform crossover and basic bit mutation are performed to generate M offspring. The parents and offspring are then mixed and subjected to non-dominated sorting and crowding distance calculations. The top M individuals with the highest fitness are saved and used as parents for the next iteration, and the cycle continues.
[0136] In the iterative process, the correlation coefficient can be used as an evaluation index of the focusing effect. The correlation coefficient is defined as follows:
[0137]
[0138] in, and Respectively represent the grayscale values of each point of the two-dimensional code pattern (feedback pattern) and the true value map (key pattern) after wavefront shaping and focusing, and Represent the average grayscale values of the focused QR code pattern and the ground truth image respectively.
[0139] It should be noted that a matching value may be preset in the controller first. When the obtained correlation coefficient reaches the preset matching value, it is determined that the feedback pattern information matches the key image information, and the iteration ends at this time.
[0140] If the correlation coefficient is less than the preset matching value and the number of iterations has not been completed, it is necessary to continue iterating until a phase mask that meets the requirements (enabling the correlation coefficient to reach the preset matching value) is determined as the target optical information.
[0141] Alternatively, the algorithm may be looped until all iterations are completed (K=T), and then the correlation coefficient is calculated. If the correlation coefficient is lower than a preset matching value, the algorithm is repeated until a phase mask that meets the requirements is determined as the target optical information.
[0142] The key storage medium (multiple scattering medium) used in the above key storage method is unclonable. The key is pre-encoded and converted into a QR code, and then wavefront shaping is used to "equivalently convert" the multiple scattering medium and the original key. Since the multiple scattering medium is unclonable, it can resist physical contact attacks by attackers. Unless a calibrated specific scattering medium (a multiple scattering medium that matches the original key) is stolen, it is impossible to clone the calibrated storage medium or obtain key information from it.
[0143] Original keys (such as designed numerical keys) have wide applicability. The key storage process is not related to key generation. Existing designed and widely used numerical keys (such as RSA asymmetric encryption private keys) can be re-stored.
[0144] The present application also provides a key extraction method, which can also be applied to Figure 1 The key custody system shown.
[0145] In one embodiment, Figure 8 As shown, a key extraction method is provided, which is applied to Figure 1 Taking the controller in as an example, the method includes the following steps 400 to 600.
[0146] Step 400: Acquire target optical information of the key to be extracted, and send the target optical information to an optical modulator.
[0147] The optical modulator modulates the incident light signal according to the target optical information to obtain the target incident wavefront.
[0148] The target optical information of the key to be extracted is obtained after storing the key according to the embodiment of the key storage method described above. Therefore, when extracting the key, it is necessary to first obtain the target optical information of the key to be extracted and send the target optical information to the optical modulator. The optical modulator modulates the incident light signal according to the target optical information to obtain the same target incident wavefront as that used during the key storage process.
[0149] Step 500: Receive feedback pattern information.
[0150] The feedback pattern information is information generated on the receiving device after the target incident wavefront passes through the scattering medium; the scattering medium matches the key to be extracted.
[0151] Among them, the scattering medium that matches the key to be extracted is the scattering medium used by the original key during the storage process. When the target incident wavefront passes through the scattering medium that matches the key to be extracted, the same feedback pattern information as that in the storage process will be formed on the receiving device, and the feedback pattern information matches the key pattern information.
[0152] Step 600: Generate an original key based on the feedback pattern information.
[0153] The feedback pattern information matches the key pattern information, and the key pattern information is obtained by precoding based on the original key.
[0154] Since the feedback image information matches the key pattern information, it may include information of the original key included in the key image information. Therefore, the original key may be obtained by decoding based on the feedback pattern information.
[0155] In this key extraction method, due to the unclonable nature of the scattering medium, extraction can only be completed by the user providing a matching scattering medium. This prevents key theft, providing enhanced security and improving user information security. Furthermore, since this key extraction method is optical, and light waves travel at extremely high speeds, key extraction can be completed instantly using an optoelectronic hybrid system.
[0156] It should also be noted that during the research and development process, the inventors conducted simulations of optical key storage and key extraction in scattering media based on the aforementioned embodiments. During numerical simulations of the optical key storage scheme, the convergence speed, solution accuracy, and time consumption of the algorithm were compared under different population sizes to determine the optimal population size. Subsequently, the security of the key extraction scheme was analyzed through simulations.
[0157] Specifically, the simulation process can simulate multiple scattering media by cascading multiple random phase masks. For example, the number of iterations, T, was set to 1000, and simulations were performed with population sizes, M, of 64, 128, and 256. As the population size increases, the resulting feedback pattern becomes more correlated with the true value map used as the key pattern.
[0158] Furthermore, two objective functions are used for quantitative analysis. The results are shown in Table 1. As the population size increases, both f1 and f2 decrease. Therefore, as the population space increases, the probability of the algorithm searching for a more global solution increases, thereby avoiding the algorithm from falling into a local optimum.
[0159] Table 1
[0160]
[0161] Next, using the correlation coefficient as the evaluation index, the iterative convergence curves for populations M = 64, 128, and 256 are plotted, as shown in Figure 9 As shown by Figure 9 It can be concluded that the larger the population, the shorter the time required for the correlation coefficient to reach the preset correlation coefficient (assuming it is 0.9).
[0162] After the above analysis, the appropriate population size can be selected comprehensively based on the convergence speed, solution accuracy and time consumption.
[0163] Because key storage security benefits from the unclonability of multiple scattering media, it's difficult for any unauthorized eavesdropper to create an identical multiple scattering medium. Only users holding a specific multiple scattering medium can obtain key-related information. In a security verification simulation, assuming a legitimate user holds multiple scattering medium A, which is bound to a key, and an unauthorized user holds another multiple scattering medium, B, three different scenarios were used to verify whether users holding different multiple scattering media could successfully obtain key information.
[0164] Scenario 1: Another 10 phase mask layers are randomly generated as the multiple scattering medium B.
[0165] Scenario 2: A phase mask layer is randomly generated to replace the fifth phase mask layer of the multi-scattering medium A.
[0166] Scenario 3: Interchanging the 1st and 10th random phase mask plates of multi-scattering medium A.
[0167] From the simulation results, it can be determined that if the multiple scattering medium changes, the key information will not be obtained. Only by holding the correct multiple scattering medium can the key be accurately extracted.
[0168] Therefore, this optical key storage and key extraction scheme based on multiple scattering media pre-encodes the original key to be stored (such as the numerical key of a computer cryptographic system or the phase mask of an optical encryption system) into a "multi-point focusing pattern" (such as a QR code). Then, through wavefront shaping technology, a certain input light field is "focused" into the above pattern after passing through a certain scattering medium or a group of specific scattering media, thereby establishing a one-to-one mapping relationship between the key to be stored, the scattering medium, and the input light field. The original key is "converted" into an unclonable entity - the multiple scattering medium. Even if an attacker physically contacts the multiple scattering medium that stores the key, he cannot copy or obtain the key information from it, thus achieving a high level of key storage security.
[0169] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0170] Based on the same inventive concept, embodiments of the present application further provide a key storage device for implementing the key storage method described above. The implementation solution provided by this device is similar to the implementation solution described in the above method. Therefore, the specific limitations of one or more key storage device embodiments provided below can be found in the above-mentioned limitations of the key storage method and will not be repeated here.
[0171] In one embodiment, Figure 10 As shown, a key storage device is provided, including: an encoding module 710 and a storage module 720, wherein:
[0172] The encoding module 710 is used to pre-encode the original key to be stored to obtain key pattern information.
[0173] The storage module 720 is configured to generate target optical information according to the key pattern information.
[0174] Among them, after the target optical information is sent to the optical modulator, the optical modulator modulates the incident light signal to obtain the target incident wavefront; after the target incident wavefront passes through the scattering medium, feedback pattern information matching the key pattern information is generated on the receiving device; the scattering medium is matched one-to-one with the original key; the stored key includes the target optical information and the scattering medium matching the original key.
[0175] In one embodiment, the storage module 720 is further used to initialize multiple random optical information and send the multiple random optical information to the optical modulator; the optical modulator modulates the received incident light signal according to each random optical information to obtain a random incident wavefront corresponding to each random optical information; receives multiple feedback pattern information; the feedback pattern information is information generated on the receiving device after the random incident wavefront passes through the scattering medium; and combines the degree of correlation between each feedback pattern information and the key pattern information to obtain the target optical information according to each random optical information.
[0176] The storage module 720 is further configured to sort each random optical information according to the degree of correlation between each feedback pattern information and the key pattern information; based on the sorting of the random optical information, optimize and iterate the selected random optical information to obtain multiple iterative optical information, and send each iterative optical information to the optical modulator; the optical modulator modulates the incident light signal according to each iterative optical information to obtain multiple iterative incident wavefronts; if feedback pattern information matching the key pattern information is received, the optimization iteration is stopped, and the iterative optical information corresponding to the feedback pattern information matching the key pattern information is used as the target optical information; the feedback pattern information is information generated on the receiving device after the iterative incident wavefront passes through the scattering medium.
[0177] The storage module 720 is also used to: if the number of optimization iterations for each random optical information reaches a preset target number of iterations, stop the iteration, and use the final iterative optical information as the target optical information, and match the feedback pattern information corresponding to the final iterative optical information with the key pattern information.
[0178] Based on the same inventive concept, embodiments of the present application also provide a key storage device for implementing the key extraction method described above. The implementation solution provided by this device is similar to the implementation solution described in the above method. Therefore, the specific limitations of one or more key extraction device embodiments provided below can be found in the above-mentioned limitations of the key extraction method and will not be repeated here.
[0179] In one embodiment, Figure 11 As shown, a key extraction device is provided, including: an extraction module 810, a receiving module 820 and a decoding module 830, wherein:
[0180] The extraction module 810 is used to obtain the target optical information of the key to be extracted and send the target optical information to the optical modulator; the optical modulator modulates the incident light signal according to the target optical information to obtain the target incident wavefront;
[0181] The receiving module 820 is configured to receive feedback pattern information; the feedback pattern information is information generated on the receiving device after the target incident wavefront passes through the scattering medium; the scattering medium matches the key to be extracted;
[0182] The decoding module 830 is configured to generate an original key according to the feedback pattern information; wherein the feedback pattern information matches the key pattern information, and the key pattern information is obtained by precoding based on the original key.
[0183] Each module in the key storage device and key extraction device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0184] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 12As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. 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, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data such as target optical information. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a key storage method or a key extraction method is implemented.
[0185] Those skilled in the art will understand that Figure 12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0186] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the above-mentioned key storage method embodiments or the steps in the key extraction method embodiments are implemented.
[0187] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned key storage method embodiments or the steps in the above-mentioned key extraction method embodiments are implemented.
[0188] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the computer program implements the steps in the above-mentioned key storage method embodiments or the steps in the above-mentioned key extraction method embodiments.
[0189] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0190] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.
[0191] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0192] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A key storage method, characterized in that: The key storage method comprises: Pre-encoding the original key to be stored to obtain key pattern information; generating target optical information based on the key pattern information; wherein, after the target optical information is sent to an optical modulator, the optical modulator modulates the incident optical signal to obtain a target incident wavefront; after the target incident wavefront passes through a scattering medium, feedback pattern information matching the key pattern information is generated on a receiving device; the scattering medium is matched one-to-one with the original key; and the stored key includes the target optical information and the scattering medium matching the original key; Wherein, generating target optical information according to the key pattern information includes: Initializing a plurality of random optical information and sending the plurality of random optical information to the optical modulator; the optical modulator modulates a received incident light signal according to each of the random optical information to obtain a random incident wavefront corresponding to each of the random optical information; receiving a plurality of feedback pattern information; the feedback pattern information being information generated on a receiving device after the random incident wavefront passes through a scattering medium; combining the correlation between each feedback pattern information and the key pattern information, and obtaining target optical information according to each random optical information; The step of combining the correlation between each feedback pattern information and the key pattern information and obtaining target optical information according to each random optical information includes: sorting the random optical information according to the correlation between the feedback pattern information and the key pattern information; Based on the sorting of the random optical information, the selected random optical information is optimized and iterated to obtain a plurality of iterative optical information, and each of the iterative optical information is sent to the optical modulator; the optical modulator modulates the incident light signal according to each of the iterative optical information to obtain a plurality of iterative incident wavefronts; If feedback pattern information matching the key pattern information is received, the optimization iteration is stopped, and the iterative optical information corresponding to the feedback pattern information matching the key pattern information is used as the target optical information; the feedback pattern information is the information generated on the receiving device after the iterative incident wavefront passes through the scattering medium.
2. The method according to claim 1, characterized in that The optimizing and iterating the selected random optical information based on the sorting of the random optical information to obtain a plurality of iterative optical information, and sending each of the iterative optical information to the optical modulator includes: If the number of optimization iterations for each random optical information reaches the preset target iteration number, the iteration is stopped, and the final iterative optical information is used as the target optical information, and the feedback pattern information corresponding to the final iterative optical information matches the key pattern information.
3. A key extraction method, characterized in that: Based on the key storage method according to claim 1 or 2, the key extraction method includes: Obtaining target optical information of the key to be extracted, and sending the target optical information to an optical modulator; the optical modulator modulates an incident light signal according to the target optical information to obtain a target incident wavefront; Receiving feedback pattern information; the feedback pattern information is information generated on the receiving device after the target incident wavefront passes through the scattering medium; the scattering medium matches the key to be extracted; An original key is generated according to the feedback pattern information; wherein the feedback pattern information matches the key pattern information, and the key pattern information is obtained by precoding based on the original key.
4. A key storage system, characterized in that: The system includes: a controller, an optical modulator connected to the controller, and a receiving device. The controller is used to store a key according to the key storage method according to claim 1 or 2, or to extract a key according to the key extraction method according to claim 3.
5. A key storage device, characterized in that: The key storage device comprises: An encoding module, used for pre-encoding the original key to be stored to obtain key pattern information; a storage module configured to generate target optical information based on the key pattern information; wherein, after the target optical information is sent to an optical modulator, the optical modulator modulates an incident optical signal to obtain a target incident wavefront; after the target incident wavefront passes through a scattering medium, feedback pattern information matching the key pattern information is generated on a receiving device; the scattering medium is matched one-to-one with the original key; the stored key includes the target optical information and the scattering medium matching the original key; wherein, generating the target optical information based on the key pattern information includes: Initializing a plurality of random optical information and sending the plurality of random optical information to an optical modulator; the optical modulator modulates a received incident light signal according to each of the random optical information to obtain a random incident wavefront corresponding to each of the random optical information; receiving a plurality of feedback pattern information; the feedback pattern information being information generated on a receiving device after the random incident wavefront passes through a scattering medium; combining the correlation between each feedback pattern information and the key pattern information, and obtaining target optical information according to each random optical information; Combining the correlation between each feedback pattern information and the key pattern information, and obtaining the target optical information according to each random optical information, includes: sorting the random optical information according to the correlation between the feedback pattern information and the key pattern information; Based on the sorting of the random optical information, the selected random optical information is optimized and iterated to obtain a plurality of iterative optical information, and each of the iterative optical information is sent to the optical modulator; the optical modulator modulates the incident light signal according to each of the iterative optical information to obtain a plurality of iterative incident wavefronts; If feedback pattern information matching the key pattern information is received, the optimization iteration is stopped, and the iterative optical information corresponding to the feedback pattern information matching the key pattern information is used as the target optical information; the feedback pattern information is the information generated on the receiving device after the iterative incident wavefront passes through the scattering medium.
6. A key extraction device, characterized in that: Used to implement the key extraction method according to claim 3; the key extraction device comprises: An extraction module is used to obtain target optical information of the key to be extracted and send the target optical information to an optical modulator; the optical modulator modulates the incident light signal according to the target optical information to obtain a target incident wavefront; A receiving module, configured to receive feedback pattern information; the feedback pattern information is information generated on a receiving device after the target incident wavefront passes through a scattering medium; the scattering medium matches the key to be extracted; A decoding module is used to generate an original key according to the feedback pattern information; wherein the feedback pattern information matches the key pattern information, and the key pattern information is obtained by precoding based on the original key.
7. 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 key storage method according to claim 1 or 2, or the steps of the key extraction method according to claim 3 are implemented.
8. 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 key storage method according to claim 1 or 2, or the steps of the key extraction method according to claim 3 are implemented.