A stream cipher generation method and system based on a dual-channel fluorescence spectrum physical entropy source
Patent Information
- Application Number
- CN202611210892.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-09-22
AI Technical Summary
[0005]为了解决现有流密码生成方法中密钥物理唯一性不足、密钥生成机制单一、缺乏将反应扩散时空动力学与深度学习融合以生成高熵密钥流的技术缺陷,本发明设计了一种基于双通道荧光光谱物理熵源的流密码生成方法及系统,该方法以两组独立荧光材料的完整发射光谱为物理熵源,经哈希运算生成主密钥,再利用主密钥驱动Gray-Scott反应扩散系统进行时空演化,生成仿生皮肤动态纹理并提取多维时空动力学特征序列,将该特征序列输入由长短期记忆网络与注意力机制构成的深度学习模型,进行时空特征学习与聚合,生成高级上下文特征指纹,将主密钥与高级特征指纹共同输入密钥派生函数,生成四维Lorenz超混沌系统的初始参数,经预热后迭代产生高熵密钥流,并用于逐字节流密码加解密,实现了物理随机性、非线性动力学随机性的逐级增强与深度融合,为高安全等级的信息加密提供了技术支撑
一、本发明以两组独立荧光材料在380nm-780nm波段的完整发射光谱作为物理熵源,构建了光谱、主密钥、仿生反应扩散、深度学习特征指纹、超混沌密钥流的多层级密钥派生与扩散链路,主密钥仅作为根密钥驱动后续动力学系统,物理随机性在每一层级均被非线性放大与复杂化,攻击者即便获取了算法结构,无法在物理层面复现完全相同的双通道荧光发射光谱,即无法重构任何一级的派生参数,从而解决了针对数字密钥的复制与分发攻击,实现了物理安全与算法安全的深度绑定。
Smart Images

Figure CN122802147A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of information security and cryptography, specifically to a method and system for generating stream ciphers based on a dual-channel fluorescence spectroscopy physical entropy source. Background Technology
[0002] Stream ciphers are symmetric cryptosystems that encrypt plaintext data streams bit by bit or byte by byte. Their security hinges on the design of the keystream generator. The randomness, unpredictability, and physical non-cloning nature of the keystream generation mechanism directly determine the entire cryptographic system's ability to resist brute-force attacks, statistical analysis attacks, and physical copying attacks. With the increasing demands for autonomous control and physical layer security in information security, exploring keystream generation methods that integrate physical entropy sources and complex digital models has become an important research direction in the field of cryptography.
[0003] Existing stream cipher keystream generation schemes can be broadly categorized into two types. The first type relies on pure digital pseudo-random number generators or low-dimensional chaotic mappings to generate the keystream. Key generation in this type is entirely based on algorithms and digital seeds, lacking physical uniqueness and non-cloning properties. Digital seeds can be easily copied or distributed, failing to provide a secure foundation for critical data bound to physical entities. The second type attempts to introduce physically non-cloning functions as entropy sources, but its key generation mechanisms often remain at a single-level mapping level, directly converting physical quantities into keys. This lack of multi-level, cross-dimensional key derivation and diffusion architectures results in insufficient amplification and complexity of physical randomness, low entropy source utilization, and failure to combine the rich spatiotemporal dynamics generated by the reaction diffusion system with deep learning models to further extract advanced cryptographic features and drive high-dimensional chaotic systems. This leads to insufficient nonlinear complexity of the keystream and inadequate resistance to phase space reconstruction analysis.
[0004] In summary, existing technologies cannot simultaneously meet the comprehensive security requirements of physical non-cloning of keys, high-entropy randomness, and strong resistance to cryptanalysis; therefore, there is an urgent need for a new multi-level key derivation system to overcome the above-mentioned technical deficiencies. Summary of the Invention
[0005] To address the shortcomings of existing stream cipher generation methods, such as insufficient physical uniqueness of keys, a single key generation mechanism, and a lack of technical integration of reaction-diffusion spatiotemporal dynamics and deep learning to generate high-entropy keystreams, this invention designs a stream cipher generation method and system based on a dual-channel fluorescence spectroscopy physical entropy source. This method uses the complete emission spectra of two independent fluorescent materials as the physical entropy source, generates a master key through hashing, and then uses the master key to drive the Gray-Scott reaction-diffusion system to perform spatiotemporal evolution, generating a biomimetic skin dynamic texture and extracting a multidimensional spatiotemporal dynamic feature sequence. This feature sequence is input into a deep learning model composed of a long short-term memory network and an attention mechanism for spatiotemporal feature learning and aggregation, generating a high-level contextual fingerprint. The master key and the high-level fingerprint are jointly input into a key derivation function to generate the initial parameters of a four-dimensional Lorenz hyperchaotic system. After preheating, a high-entropy keystream is iteratively generated and used for byte-by-byte stream cipher encryption and decryption. This achieves a progressive enhancement and deep integration of physical randomness and nonlinear dynamic randomness, providing technical support for high-security information encryption.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: On one hand, a method and system for generating stream ciphers based on a dual-channel fluorescence spectroscopy physical entropy source, the specific steps of which are as follows: S100: Collect the complete emission spectra of two independent fluorescent materials, preprocess the collected complete emission spectra of the two independent fluorescent materials to construct a dual-channel spectral vector, and perform a cryptographic hash operation on the dual-channel spectral vector to generate a master key; S200. Using the master key, derive the control parameters and initial state of the Gray-Scott reaction diffusion system, drive the Gray-Scott reaction diffusion system to perform spatiotemporal evolution, generate a biomimetic skin dynamic texture pattern, continuously sample the spatiotemporal evolution process, and extract multidimensional spatiotemporal dynamic features from the state field at each sampling moment to form a temporal feature sequence. S300. Input the temporal feature sequence into an LSTM-Attention model composed of a long short-term memory network and an attention mechanism. Use the long short-term memory network to learn the spatiotemporal evolution law of the temporal feature sequence, and use the attention mechanism to adaptively weight and aggregate the hidden states of the long short-term memory network to generate a fixed-length high-level contextual feature fingerprint. S400. The master key is fused with the high-level context feature fingerprint, and the initial state and control parameters of the four-dimensional Lorenz hyperchaotic system are generated through the key derivation function. The four-dimensional Lorenz hyperchaotic system is preheated and iterated. After eliminating transient effects, the iteration continues and a high-entropy key stream is generated. S500. During the encryption process, the plaintext data to be encrypted is subjected to byte-by-byte logical operations with the high-entropy key stream to generate ciphertext. During the decryption process, the same dual-channel fluorescence emission spectrum as in the encryption process is input, and steps S100-S400 are repeated to reconstruct the same high-entropy key stream as in the encryption process. The inverse logical operation corresponding to the byte-by-byte logical operation is then performed on the ciphertext to recover the plaintext.
[0007] Further, S100 includes: Emission spectra of two independent fluorescent materials in the visible light band of 380nm-780nm were collected. The collected emission spectra were preprocessed by denoising, wavelength calibration, and intensity normalization to obtain the spectral vector of channel A. and the spectral vector of channel B ,in, and These represent the wavelengths of channel A and channel B, respectively. Normalized fluorescence emission intensity at the location; The spectral vector of channel A With the spectral vector of channel B Cascade the spectral vectors to construct a joint spectral vector. ; The joint spectral vector was hashed using the SHA-256 cryptographic hash algorithm. Perform a one-way hash operation to generate a 256-bit master key. SHA256 The master key It serves as the root key for the entire key derivation process.
[0008] Furthermore, in S200, the Gray-Scott reactive diffusion system simulates the reactive diffusion process of two chemical substances, an activator and an inhibitor. The Gray-Scott reactive diffusion system is controlled by a set of differential equations, which are as follows: , ,in, and Represent the spatial coordinates of the two chemical substances respectively. and time Under the concentration field, For the Laplace operator, and The diffusion coefficient between the activator and the inhibitor. For feed rate, The rate of extinction; Based on the master key Derived control parameters, in Initialization on discrete mesh field and The field is determined, and the feed rate is set. and the rate of extinction The value of is used to make different physical entropy sources produce different evolution trajectories for the desired Gray-Scott reaction-diffusion system.
[0009] Furthermore, in step S200, multidimensional spatiotemporal dynamic features are extracted from the state field at each sampling time to form a temporal feature sequence. , The total number of sampling times, for each feature vector Include: For sampling time The above Field concentration distribution Calculate the average concentration of all grid points to obtain the average density characteristic; Calculate the Field concentration distribution The standard deviation of the concentration at all grid points is used to obtain the standard deviation characteristic. The Field concentration distribution The concentration values are linearly quantized into an 8-bit integer matrix. An XOR operation is performed on all row vectors of the 8-bit integer matrix to obtain a column check vector. Then, an XOR operation is performed on all column vectors of the 8-bit integer matrix to obtain a row check vector. The average value of the column check vector and each element in the row check vector is used as the row-column folding XOR check feature. The Field concentration distribution The concentration value distribution is divided into 256 gray levels. The Shannon information entropy of the concentration value distribution is calculated. The spatial information entropy features are obtained, where, For the first The probability of each gray level appearing.
[0010] Furthermore, S300 includes: Time series feature sequences The input is a Long Short-Term Memory (LSTM) network, which recursively processes the sequence information through its gating mechanism, outputting a hidden state sequence of the same length as the input temporal feature sequence. ; An attention mechanism is introduced, and a trainable context query vector is randomly initialized. And set a trainable weight matrix. ; For each moment Hidden state Calculate the hidden state With the context query vector Importance rating ; The importance scores at all times are normalized using the Softmax function to obtain the i-th... Attention weight at each moment ; We perform a weighted summation of the hidden states at all time points to obtain a fixed-length high-level context feature fingerprint vector. .
[0011] Furthermore, S400 includes: The master key is concatenated and fused with the high-level context feature fingerprint vector, and the fusion result is input into the key derivation function; The key derivation function outputs a set of initialization parameters for the four-dimensional Lorenz hyperchaotic system, the initialization parameter set including the initial values of the state variables. and system control parameters ; The four-dimensional Lorenz hyperchaotic system is: , , , ,in, Let these be the four state variables of the four-dimensional Lorenz hyperchaotic system. These are the system control parameters for the four-dimensional Lorenz hyperchaotic system. The fourth-dimensional coupling parameter of the four-dimensional Lorenz hyperchaotic system is given. It is a time variable; Before generating the high-entropy key stream, the four-dimensional Lorenz hyperchaotic system is iterated for no less than 1200 steps for preheating, and all preheating data is discarded to eliminate initial transient effects.
[0012] Furthermore, the generation process of the high-entropy keystream is as follows: For the first after preheating is complete Step iteration, to obtain the first State values of each iteration Calculate the state fusion value ; The state fusion value Mapping to byte space generates a key byte. ,in, For floor operations, mod is the floor operation; Continue iterating until the length of the generated high-entropy keystream equals the length of the plaintext data to be encrypted. The high-entropy key stream is obtained. .
[0013] Furthermore, in S500, the byte-by-byte logical operation is an XOR operation; During the encryption process, for plaintext data sequences and high-entropy key stream ciphertext bytes pass The calculation shows that, Represents the XOR operator; During the decryption process, the ciphertext sequence The same high-entropy key stream as the reconstructed Through inverse operation Restore plaintext bytes.
[0014] Furthermore, this method constructs a complete multi-level key derivation and diffusion chain, which consists of the following steps: generating the master key using dual-channel fluorescence emission spectroscopy. The master key drives the biomimetic skin reaction diffusion model to generate a time-series feature sequence. The temporal feature sequences are aggregated into high-level contextual feature fingerprints using the LSTM-Attention model. The master key and high-level contextual fingerprint jointly drive the four-dimensional Lorenz hyperchaotic system to generate a high-entropy key stream. The multi-level key derivation and diffusion link achieves a progressive enhancement and deep fusion of physical randomness, nonlinear dynamic randomness, and hyperchaotic digital randomness.
[0015] On the other hand, a stream cipher generation system based on a dual-channel fluorescence spectroscopy physical entropy source includes: A dual-channel fluorescence emission spectroscopy acquisition module is used to acquire the complete emission spectra of two independent fluorescent materials; The spectral preprocessing and master key generation module is used to perform noise reduction, calibration and normalization preprocessing on the acquired complete emission spectrum, construct a joint spectral vector, and perform a cryptographic hash operation on the joint spectral vector to generate a master key; The biomimetic skin reaction diffusion and feature extraction module is used to derive parameters based on the master key and drive the Gray-Scott reaction diffusion model to perform spatiotemporal evolution, and continuously extract multidimensional spatiotemporal dynamic features from the spatiotemporal evolution process to form a temporal feature sequence. The LSTM-Attention feature aggregation module, which incorporates a long short-term memory network and an attention mechanism, is used to receive the temporal feature sequence and output a fixed-length high-level contextual feature fingerprint. The hyperchaotic key stream generation module is used to fuse the master key with the high-level context feature fingerprint, and generate the initialization parameters of the four-dimensional Lorenz hyperchaotic system through the key derivation function. After preheating and iteration, a high-entropy key stream is generated. The stream cipher encryption / decryption module is used to store plaintext data to be encrypted or ciphertext data to be decrypted, and to perform byte-by-byte logical operations on the stored data using the high-entropy key stream to achieve encryption or decryption.
[0016] Compared with existing technologies, this method and system for generating stream ciphers based on a dual-channel fluorescence spectroscopy physical entropy source has the following advantages: I. This invention uses the complete emission spectra of two independent fluorescent materials in the 380nm-780nm band as the physical entropy source to construct a multi-level key derivation and diffusion link consisting of spectrum, master key, biomimetic reaction diffusion, deep learning feature fingerprint, and hyperchaotic key stream. The master key only serves as the root key to drive the subsequent dynamic system. Physical randomness is nonlinearly amplified and complicated at each level. Even if an attacker obtains the algorithm structure, they cannot reproduce the exact same dual-channel fluorescence emission spectrum at the physical level, that is, they cannot reconstruct the derivation parameters at any level. This solves the problem of copying and distributing attacks on digital keys and achieves a deep binding between physical security and algorithm security.
[0017] II. This invention employs the Gray-Scott reaction-diffusion model to simulate the interaction between activators and inhibitors, generating a biomimetic skin dynamic texture with high nonlinearity and spatiotemporal complexity. During the spatiotemporal evolution of the inhibitor concentration field, a multidimensional spatiotemporal dynamic feature sequence, including average density, standard deviation, row-column folding XOR check value, and spatial information entropy, is extracted. This sequence fully records the nonlinear trajectory of the pattern from initial perturbation to stable evolution. An LSTM-Attention deep learning model is introduced to perform sequence modeling and adaptive feature aggregation on this feature sequence, generating a fixed-length high-level contextual feature fingerprint. This fingerprint effectively compresses high-dimensional dynamic information and greatly improves the key stream's resistance to differential analysis.
[0018] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0020] Figure 1 This is a flowchart illustrating the steps of a stream cipher generation method based on a dual-channel fluorescence spectroscopy physical entropy source in an embodiment of the present invention. Figure 2 This is a schematic diagram of the LSTM-Attention feature aggregation process in an embodiment of the present invention; Figure 3 This is a block diagram of a stream cipher generation system based on a dual-channel fluorescence spectroscopy physical entropy source in an embodiment of the present invention. Detailed Implementation
[0021] To better understand the above technical solutions, a detailed description of the solutions will be provided below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0022] This embodiment provides a stream cipher generation method based on a dual-channel fluorescence spectroscopy physical entropy source, such as... Figure 1 As shown, the steps of this method are as follows: S100: Collect the complete emission spectra of two independent fluorescent materials, preprocess the collected complete emission spectra of the two independent fluorescent materials to construct a dual-channel spectral vector, and perform a cryptographic hash operation on the dual-channel spectral vector to generate a master key; S200. Using the master key, derive the control parameters and initial state of the Gray-Scott reaction diffusion system, drive the Gray-Scott reaction diffusion system to perform spatiotemporal evolution, generate a biomimetic skin dynamic texture pattern, continuously sample the spatiotemporal evolution process, and extract multidimensional spatiotemporal dynamic features from the state field at each sampling moment to form a temporal feature sequence. S300. Input the temporal feature sequence into an LSTM-Attention model composed of a long short-term memory network and an attention mechanism. Use the long short-term memory network to learn the spatiotemporal evolution law of the temporal feature sequence, and use the attention mechanism to adaptively weight and aggregate the hidden states of the long short-term memory network to generate a fixed-length high-level contextual feature fingerprint. S400. The master key is fused with the high-level context feature fingerprint, and the initial state and control parameters of the four-dimensional Lorenz hyperchaotic system are generated through the key derivation function. The four-dimensional Lorenz hyperchaotic system is preheated and iterated. After eliminating transient effects, the iteration continues and a high-entropy key stream is generated. S500. During the encryption process, the plaintext data to be encrypted is subjected to byte-by-byte logical operations with the high-entropy key stream to generate ciphertext. During the decryption process, the same dual-channel fluorescence emission spectrum as in the encryption process is input, and steps S100-S400 are repeated to reconstruct the same high-entropy key stream as in the encryption process. The inverse logical operation corresponding to the byte-by-byte logical operation is then performed on the ciphertext to recover the plaintext.
[0023] In step S100 above, the complete emission spectra of two independent fluorescent materials are used as physical entropy sources, and a root key for driving all subsequent dynamic modules is generated using a cryptographic hash algorithm. First, two independent fluorescent materials with fundamental differences in chemical composition, microstructure, or luminescence mechanism are selected and labeled as fluorescent material A and fluorescent material B, respectively. In this embodiment, fluorescent material A is a rare-earth-doped fluoride nanocrystal, and fluorescent material B is a core-shell II-VI group quantum dot. A fluorescence spectrometer is used to collect the complete emission spectra of fluorescent materials A and B in the visible light band of 380nm-780nm under the same excitation conditions. During the acquisition process, the wavelength and power of the excitation source, as well as the integration time and slit width of the spectrometer, are kept constant to ensure consistency in the spectral acquisition conditions. The wavelength sampling interval of the spectrometer is set to 1nm, meaning that each emission spectrum contains 401 discrete wavelength sampling points throughout the entire 380nm to 780nm band.
[0024] The two sets of raw emission spectrum data were preprocessed. The preprocessing steps included: Noise suppression: The Savitzky-Golay smoothing filter algorithm is used to smooth the original spectral data, removing high-frequency noise components introduced by instrument dark current, photon shot noise and environmental electromagnetic interference. The window width of the Savitzky-Golay filter is set to 15 sampling points and the polynomial order is set to 3rd order. While effectively suppressing noise, it preserves fine-grained spectral structure information such as peak position, peak shape and relative intensity of the spectral curve to the greatest extent.
[0025] Wavelength calibration: The wavelength axis of the spectrometer is calibrated using the known characteristic spectral lines of a standard mercury argon lamp light source, a wavelength correction curve is established, and each sampling point is accurately mapped to the corresponding wavelength value, eliminating wavelength deviation caused by optical path drift or mechanical error of the spectrometer.
[0026] Intensity normalization: The fluorescence emission intensity of all wavelength points in the denoised and wavelength-calibrated spectral data is divided by the maximum intensity value in the spectral curve, and the intensity range of the entire spectrum is linearly mapped to the [0, 1] interval. This eliminates the overall intensity scaling differences caused by factors such as fluctuations in excitation source power, differences in sample concentration, or changes in acquisition geometry, so that the spectral data collected in different batches maintain a consistent numerical representation.
[0027] Outlier correction: The normalized spectral data is traversed and detected. If the intensity value of a certain wavelength point exceeds the range of ±3 times the standard deviation of the mean intensity of its adjacent wavelength points, the intensity value of that wavelength point is replaced with the linear interpolation result of the intensity of the adjacent wavelength points to eliminate isolated spike anomalies caused by instantaneous electrical pulses.
[0028] After preprocessing, the spectral vector of channel A is obtained. and the spectral vector of channel B ,in, Indicates that channel A is at wavelength Normalized fluorescence emission intensity after pretreatment This indicates that channel B is at wavelength Normalized fluorescence emission intensity after pretreatment, wavelength The value ranges from 380 nm to 780 nm, which are integer nanometer values. The spectral vector of channel A... Spectral vector of channel B By concatenating vectors in a fixed order, first channel A and then channel B, a joint spectral vector is constructed. Joint spectral vector The dimension is 802, completely preserving all fluorescence emission spectral structure information of the two fluorescent materials in the 380nm to 780nm wavelength range. The joint spectral vector is processed using the SHA-256 cryptographic hash algorithm. Perform a one-way hash operation to generate a master key with a length of 256 bits. SHA256 In this embodiment, the input to the SHA-256 algorithm is the joint spectral vector. The binary representation of the output is a fixed-length 256-bit hash value. Because the complete fluorescence emission spectrum contains far more information than chromaticity coordinates or single wavelength intensity, its 802-dimensional high-dimensional spectral structure information guarantees the master key. The master key possesses extremely high information entropy and strong collision resistance. It is not used as a direct encryption key, but as the root key of the entire key derivation process, used to drive the subsequent biomimetic skin reaction diffusion system, LSTM-Attention feature aggregation module and four-dimensional Lorenz hyperchaotic system.
[0029] In step S200 above, the physical entropy source master key generated in step S100 is mapped to a nonlinear reaction-diffusion dynamics system, realizing the transformation and amplification of physical randomness into spatiotemporal dynamic randomness. In this embodiment, a two-dimensional Gray-Scott reaction-diffusion partial differential equation is used as a biomimetic skin reaction-diffusion model. This model simulates the reaction-diffusion process of two chemical substances, activators and inhibitors, and can self-organize to generate various complex spatiotemporal patterns that are highly similar to the texture of biological surfaces, such as spots, stripes, and mazes. The Gray-Scott reaction-diffusion system is controlled by a set of partial differential equations: , In the system of equations, Indicates the activator in spatial coordinates and time Under the concentration field, The value of is a dimensionless real number between 0 and 1; Indicates the inhibitor in spatial coordinates and time Under the concentration field, The value of is also a dimensionless real number between 0 and 1; For a two-dimensional Laplace operator, , used to describe the diffusion behavior of chemical substances in two-dimensional space; The diffusion coefficient of the activator is denoted as . Let be the diffusion coefficient of the inhibitor, and both are positive real constants; For feed rate, To determine the extinction rate, this embodiment uses a size of Numerical solutions for the Gray-Scott reactive diffusion system are performed on a two-dimensional discrete grid. The number of points on a single edge of the discrete grid is [not specified]. Set to 256, space step size Version 1.0 uses the explicit finite difference method for time integration, with a time step size of [missing information]. The diffusion coefficient is set to 0.5. The diffusion coefficient is fixed at 0.16. With a fixed value of 0.08, the Laplace operator uses a nine-point difference template under periodic boundary conditions for discrete approximation to eliminate boundary effects and simulate the reaction-diffusion process on an infinitely large plane.
[0030] Using the master key generated in step S100 The control parameters and initial state of the Gray-Scott reactive diffusion system are derived, and the specific key derivation process is as follows: master key The first 128 bits are input into the HMAC-SHA256 key derivation function, and a context string is appended to identify the purpose of the Gray-Scott model parameter derivation, generating a 256-bit derivation key material. The feed rate is obtained by extracting and mapping the data sequentially from the derived key material according to a fixed byte order. rate of extinction And a random seed value used for initialization; in this embodiment, the feed rate The rate of extinction is mapped to a specific value within the interval [0.020, 0.055]. It is mapped to a specific value within the interval [0.050, 0.065] to enable the Gray-Scott reactive diffusion system to operate within the pattern-forming region of its parameter space, ensuring that the system can produce rich and stable spatiotemporal patterns; During initialization, the activator's The field is initialized as a uniform steady-state background of all 1s, and a uniformly distributed random perturbation with an amplitude of ±0.01 is superimposed on each grid node to suppress the... The field is initialized to a background of all zeros. Then, local high-concentration square reaction kernels with an amplitude of 0.25 are set at several random grid nodes determined according to the derived random seed. Each reaction kernel has a side length of 5 grid units. These local high-concentration reaction kernels are used to simulate local activation regions in the biomimetic skin pigment cell network, serving as initial trigger points to drive the self-organized evolution of the system pattern. Different fluorescent materials correspond to different master keys, thereby deriving different feed rates. rate of extinction The initial distribution of reaction nuclei causes different physical entropy sources to produce completely different evolutionary trajectories in the Gray-Scott reaction diffusion system.
[0031] After initialization, the system begins iterative evolution, with a total evolution step count set to 10,000. Starting from step 1000, sampling is performed every 100 steps, for a total of 90 samplings. Step 1000 is chosen as the initial sampling point to allow the system to fully experience the initial transient evolution phase before entering a stable pattern formation phase. The total number of sampling times... The value is 90. For each sampling time... Obtain the inhibitor at that moment Concentration distribution of the field and from this concentration distribution The following four types of multidimensional spatiotemporal dynamic features are extracted to constitute the sampling time. Corresponding feature vector The feature vector The included features are: Average density characteristics, for sampling time Inhibitor concentration distribution All The concentration values of each grid node are summed and then divided by the total number of grid nodes. The average density characteristic value is obtained. The average density characteristic is used to characterize the overall level of inhibitor concentration in the entire two-dimensional space, reflecting the overall activation level of the reactive diffusion system at that moment; Standard deviation characteristics, calculation of sampling time Inhibitor concentration distribution All The standard deviation of the concentration values of each grid node is used to describe the dispersion of the inhibitor concentration in two-dimensional space. The larger the standard deviation value, the stronger the contrast between light and dark in the bionic skin texture and the more significant the spatial structure. The row-column folding XOR check feature will be used to determine the sampling time. Inhibitor concentration distribution The concentration values of each grid node are linearly quantized into 8-bit unsigned integers, that is, the concentration value interval [0, 1] is linearly mapped to the integer interval [0, 255], resulting in a... An 8-bit integer matrix, all of the 8-bit integer matrix Perform a bitwise XOR operation on each row vector to obtain a vector of length . The column check vector, and then all of the 8-bit integer matrix. Perform a bitwise XOR operation on each of the column vectors to obtain a vector of length . The row check vector is obtained by concatenating the column check vector with each element of the row check vector, and the arithmetic mean of the concatenated vector is calculated. This result is used as the row-column folded XOR check feature value, which is relevant to the inhibitor concentration distribution. Even minute changes in the concentration value of any grid node are highly sensitive, effectively amplifying the impact of local disturbances on the overall characteristics; Spatial information entropy characteristics, sampling time Inhibitor concentration distribution The concentration values are divided into 256 gray levels at equal intervals, and the values falling into the gray level are statistically analyzed. The number of grid nodes at each gray level accounts for a certain percentage of the total number of grid nodes. The proportion is used as the probability of that gray level appearing. ,in The value of is 0, 1, 2, ..., 255. Calculate the inhibitor concentration distribution. Shannon information entropy The spatial information entropy feature value is obtained, and the Shannon information entropy is obtained. This is used to measure the complexity and randomness of bionic skin texture. A higher information entropy indicates a greater amount of information in the texture pattern and a higher degree of disorder in its spatial structure. The feature vectors from all 90 sampling times are arranged in chronological order to form a structure of length [length missing]. Temporal feature sequences .
[0032] In step S300 above, such as Figure 2 As shown, a deep learning model is used to perform sequence modeling and adaptive feature aggregation on the temporal feature sequence generated in step S200, compressing high-dimensional spatiotemporal dynamic information into a fixed-length high-level contextual feature fingerprint, thereby achieving efficient mapping from complex spatiotemporal texture to cryptographic feature space. The deep learning model used in this step is an LSTM-Attention model composed of a long short-term memory network and an attention mechanism. This model consists of four parts: an input layer, a single-layer long short-term memory network layer, an attention mechanism layer, and an output layer.
[0033] The input layer receives the temporal feature sequence generated in step S200. Each time step Input It is a 4-dimensional feature vector containing the average density feature, standard deviation feature, row and column folding XOR check feature, and spatial information entropy feature at the sampling time. The dimension of the entire input sequence is 90×4.
[0034] The Long Short-Term Memory (LSTM) network layer contains 128 hidden units and recursively processes the input sequence step-by-step. At each time step... Long Short-Term Memory (LSTM) network units receive the input feature vector at the current time step. and the previous time step Hidden state and cell state By using the combined action of the forget gate, input gate, and output gate, the hidden state at the current time step is updated. and cell state The forget gate controls the cell state from the previous time step. The input gate controls which information is discarded; the input gate controls which new information from the candidate cell states at the current time step is written into the cell state; the output gate controls the cell state at the current time step. How much information is output as a hidden state? This gated recursive mechanism enables Long Short-Term Memory (LSTM) networks to effectively learn long-term spatiotemporal dependencies spanning multiple time steps in temporal feature sequences. After recursive processing through all 90 time steps, the LSM network layer outputs a hidden state sequence of the same length as the input sequence. Each hidden state It is a 128-dimensional vector.
[0035] The attention mechanism layer receives the complete hidden state sequence output by the long short-term memory network layer. The purpose of introducing the attention mechanism is to adaptively identify and strengthen the most critical time step features in the hidden state sequence that represent the overall evolutionary pattern, while weakening the influence of secondary or redundant time step features. In this embodiment, a trainable context query vector with a dimension of 128 is randomly initialized. And set a trainable weight matrix with dimensions of 128×128. For each moment Hidden state Calculate the hidden state With context query vector The importance score uses a variant of the scaled dot product attention mechanism, and the specific calculation formula is as follows: ,in Hidden state The transpose of . The importance scores for all 90 time points are normalized using the Softmax function to obtain the . Attention weight at each moment ,in Represented by natural constant An exponential function with base 0.5. Attention weights. satisfy , characterizing the The importance of the evolutionary state at each sampling time point to the overall dynamic behavior representation is assessed. Finally, attention-weighted summation is performed on the hidden states at all 90 time points to obtain a high-level contextual feature fingerprint vector of fixed length 128 dimensions. The output layer will generate high-level contextual feature fingerprint vectors. As the final output.
[0036] In step S400 above, the physical layer master key generated in step S100 is fused with the dynamic layer high-level context feature fingerprint generated in step S300, and they jointly drive the four-dimensional Lorenz hyperchaotic system to generate the final high-entropy key stream for data encryption and decryption. First, the 256-bit master key generated in step S100 is... The 128-dimensional high-level contextual feature fingerprint vector C generated in step S300 is concatenated and fused. The specific fusion method is as follows: High-context feature fingerprint vector Each dimensional component multiplied by The integer part is then converted to a 16-bit binary representation. The binary representations of the 128 dimensions are concatenated in sequence to obtain a 2048-bit feature fingerprint bit string. The 2048-bit characteristic fingerprint bit string and the 256-bit master key The two parts are concatenated to form a 2304-bit fused bit string; The 2304-bit fused bit string is input to the key derivation function. In this embodiment, the key derivation function is the HKDF key derivation function, which internally uses the SHA-256 hash function. The key derivation function outputs a set of initialization parameters for the four-dimensional Lorenz hyperchaotic system. This initialization parameter set specifically includes the initial values of the state variables. and system control parameters initial value Mapped to the interval [-15.0, 15.0], initial value Mapped to the interval [-20.0, 20.0], initial value Mapped to the interval [0.0, 40.0], initial value Mapped to the interval [-10.0, 10.0]; system control parameters It is mapped to the interval [9.510.5]. It is mapped to the interval [27.5, 28.5]. It is mapped to the interval [2.6, 2.7]. Mapped to the interval [0.08, 0.12]; the mathematical model of the four-dimensional Lorenz hyperchaotic system consists of four first-order ordinary differential equations: ,in, These are the four state variables of a four-dimensional Lorenz hyperchaotic system, all of which take the values of real numbers. The control parameters are inherited from the classic three-dimensional Lorenz system. The fourth coupling parameter is introduced to extend the three-dimensional Lorenz system into a four-dimensional system with hyperchaotic behavior; As a continuous-time variable, the four-dimensional Lorenz hyperchaotic system has two positive Lyapunov exponents within the parameter mapping interval. Its phase space trajectory is exponentially stretched in both directions simultaneously. Its dynamic behavior is more complex than that of low-dimensional chaotic systems, and it is more sensitive to initial conditions and control parameters. The fourth-order Runge-Kutta numerical integration method is used to iteratively solve the four-dimensional Lorenz hyperchaotic system. The integration step size is set to 0.001. Before the key stream is officially generated, the system is preheated iteratively. The number of preheating iterations is set to 1500 steps. All state data generated during the preheating stage is discarded and not recorded. After the preheating is complete, the high-entropy key stream is officially generated, and the four-dimensional Lorenz hyperchaotic system continues to iterate. For the first... The process involves iterating through the four state variables in each iteration step to obtain the values of those four variables. Calculate the state fusion value ,in This indicates the absolute value operation; fusing state values Mapped to byte space, generating an 8-bit key byte. mod256, where, The floor function represents rounding down, and mod represents modulo operation. The combination of floor and modulo operations ensures the generation of the key bytes. The key bytes are uniformly distributed within the integer range of 0 to 255. Key bytes are continuously generated iteratively and then concatenated sequentially until a high-entropy key stream is formed. length The length of the key stream is exactly the same as the length of the plaintext data to be encrypted. High-entropy key stream. Each key byte in All are from the master key With high-context feature fingerprints The jointly determined hyperchaotic orbital state mapping results in the generation of the entire key stream being simultaneously influenced by the physical entropy source, the spatiotemporal dynamics of the bionic skin, and the nonlinear evolution characteristics of the hyperchaotic system.
[0037] In step S500 above, the high-entropy keystream generated in step S400 is used to perform stream cipher encryption and decryption operations on the data to be protected; during the encryption process, the plaintext data to be encrypted is organized into a plaintext data sequence according to byte order. ,in, Indicates the first One plaintext byte, The total number of bytes in the plaintext data is the number of bytes in the plaintext data sequence. With the high-entropy key stream generated in step S400 Based on a one-to-one correspondence of byte positions, perform a byte-by-byte XOR logical operation to ciphertext bytes. The calculation formula is ,in, The XNOR operator is defined as follows: if two input bits are the same, the output is 1; if two input bits are different, the output is 0. The XNOR operation is the logical inverse of the XOR operation and is self-reversible.
[0038] Concatenate all the calculated ciphertext bytes in order to form a ciphertext sequence of the same length as the plaintext. ciphertext sequence Stored or transmitted as a binary file.
[0039] During the decryption process, the authorized user holding the dual-channel fluorescent material needs to provide two independent fluorescent materials that are exactly the same as those used in the encryption process. Under the same excitation and acquisition conditions as the encryption process, the complete emission spectra of fluorescent material A and fluorescent material B in the 380nm to 780nm wavelength band are obtained. After receiving the spectral data, the decryption terminal regenerates the master key according to steps S100 to S400, which are exactly the same as those used in the encryption process. The algorithm drives a biomimetic skin-like reactive diffusion system to perform spatiotemporal evolution and extract temporal feature sequences; utilizes an LSTM-Attention model to generate high-level contextual feature fingerprints; and drives a four-dimensional Lorenz hyperchaotic system to generate a high-entropy keystream. Since the input physical entropy source is identical, and all algorithm steps and parameter mapping rules are consistent with the encryption process, the high-entropy keystream reconstructed at the decryption end... High-entropy key stream used at the encryption end The byte-by-byte match is complete, and the decryption end obtains the reconstructed keystream. Then, the received ciphertext sequence With the reconstructed key stream By matching each byte position one by one, perform a byte-by-byte XOR logical operation to recover the plaintext data bytes. Because the XOR operation is inverse—that is, performing two XOR operations on the same key byte is equivalent to an identity transformation—the decryption end can achieve lossless recovery of the ciphertext, obtaining a plaintext data sequence that is completely consistent with the original plaintext. .
[0040] When the fluorescent material used by the attacker differs from the legitimate fluorescent material in chemical composition, microstructure, or luminescence mechanism, or when there are deviations in the acquisition conditions and encryption process, the input emission spectrum will produce an intensity difference at at least one wavelength point. This intensity difference is amplified by the SHA-256 hash algorithm in step S100, resulting in a completely different master key. The difference in the master key is amplified by the changes in the Gray-Scott reaction-diffusion system parameters and initial conditions in step S200, causing a significant deviation in the evolution trajectory of the bionic skin texture, resulting in a completely different extracted temporal feature sequence. The difference in the temporal feature sequence is amplified layer by layer by the LSTM-Attention model in step S300, resulting in a significant numerical deviation in the generated high-level contextual fingerprint. The initial state and parameters of the four-dimensional Lorenz hyperchaotic system, driven by the high-level contextual fingerprint and the master key, change. After 1500 steps of preheating iteration, the system trajectory has separated into completely different hyperchaotic trajectory branches, and the final generated high-entropy key stream has no correlation with the encryption key stream. Attackers can exploit a faulty keystream to perform an XOR operation on the ciphertext, resulting in a random noise sequence that has no statistical correlation with the plaintext and cannot recover any valid plaintext information.
[0041] In a preferred embodiment, this embodiment also provides a stream cipher encryption system that implements the stream cipher generation method, such as... Figure 3 As shown, this stream cipher generation system based on a dual-channel fluorescence spectroscopy physical entropy source includes: A dual-channel fluorescence emission spectroscopy acquisition module is used to acquire the complete emission spectra of two independent fluorescent materials; The spectral preprocessing and master key generation module is used to perform noise reduction, calibration and normalization preprocessing on the acquired complete emission spectrum, construct a joint spectral vector, and perform a cryptographic hash operation on the joint spectral vector to generate a master key; The biomimetic skin reaction diffusion and feature extraction module is used to derive parameters based on the master key and drive the Gray-Scott reaction diffusion model to perform spatiotemporal evolution, and continuously extract multidimensional spatiotemporal dynamic features from the spatiotemporal evolution process to form a temporal feature sequence. The LSTM-Attention feature aggregation module, which incorporates a long short-term memory network and an attention mechanism, is used to receive the temporal feature sequence and output a fixed-length high-level contextual feature fingerprint. The hyperchaotic key stream generation module is used to fuse the master key with the high-level context feature fingerprint, and generate the initialization parameters of the four-dimensional Lorenz hyperchaotic system through the key derivation function. After preheating and iteration, a high-entropy key stream is generated. The stream cipher encryption / decryption module is used to store plaintext data to be encrypted or ciphertext data to be decrypted, and to perform byte-by-byte logical operations on the stored data using the high-entropy key stream to achieve encryption or decryption.
[0042] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A stream cipher generation method based on a dual-channel fluorescence spectroscopy physical entropy source, characterized in that, The steps of this method are as follows: S100: Collect the complete emission spectra of two independent fluorescent materials, preprocess the collected complete emission spectra of the two independent fluorescent materials to construct a dual-channel spectral vector, and perform a cryptographic hash operation on the dual-channel spectral vector to generate a master key; S200. Using the master key, derive the control parameters and initial state of the Gray-Scott reaction diffusion system, drive the Gray-Scott reaction diffusion system to perform spatiotemporal evolution, generate a biomimetic skin dynamic texture pattern, continuously sample the spatiotemporal evolution process, and extract multidimensional spatiotemporal dynamic features from the state field at each sampling moment to form a temporal feature sequence. S300. Input the temporal feature sequence into an LSTM-Attention model composed of a long short-term memory network and an attention mechanism. Use the long short-term memory network to learn the spatiotemporal evolution law of the temporal feature sequence, and use the attention mechanism to adaptively weight and aggregate the hidden states of the long short-term memory network to generate a fixed-length high-level contextual feature fingerprint. S400. The master key is fused with the high-level context feature fingerprint, and the initial state and control parameters of the four-dimensional Lorenz hyperchaotic system are generated through the key derivation function. The four-dimensional Lorenz hyperchaotic system is preheated and iterated. After eliminating transient effects, the iteration continues and a high-entropy key stream is generated. S500. During the encryption process, the plaintext data to be encrypted is subjected to byte-by-byte logical operations with the high-entropy key stream to generate ciphertext. During the decryption process, the same dual-channel fluorescence emission spectrum as in the encryption process is input, steps S100-S400 are repeated, a high-entropy key stream identical to that in the encryption process is reconstructed, and the inverse logic operation corresponding to the byte-by-byte logic operation is performed on the ciphertext to recover the plaintext.
2. The stream cipher generation method based on a dual-channel fluorescence spectroscopy physical entropy source according to claim 1, characterized in that, S100 includes: Emission spectra of two independent fluorescent materials in the visible light band of 380nm-780nm were collected. The collected emission spectra were preprocessed by denoising, wavelength calibration, and intensity normalization to obtain the spectral vector of channel A. and the spectral vector of channel B ,in, and These represent the wavelengths of channel A and channel B, respectively. Normalized fluorescence emission intensity at the location; The spectral vector of channel A With the spectral vector of channel B Cascade the spectral vectors to construct a joint spectral vector. ; The joint spectral vector was hashed using the SHA-256 cryptographic hash algorithm. Perform a one-way hash operation to generate a 256-bit master key. SHA256 The master key It serves as the root key for the entire key derivation process.
3. The stream cipher generation method based on a dual-channel fluorescence spectroscopy physical entropy source according to claim 1, characterized in that, In S200, the Gray-Scott reactive diffusion system simulates the reactive diffusion process of two chemical substances, an activator and an inhibitor. The Gray-Scott reactive diffusion system is controlled by a set of differential equations, which are as follows: , ,in, and Represent the spatial coordinates of the two chemical substances respectively. and time Under the concentration field, For the Laplace operator, and The diffusion coefficient between the activator and the inhibitor. For feed rate, The rate of extinction; Based on the master key Derived control parameters, in Initialization on discrete mesh field and The field is determined, and the feed rate is set. and the rate of extinction The value of is used to make different physical entropy sources produce different evolution trajectories for the desired Gray-Scott reaction-diffusion system.
4. The stream cipher generation method based on a dual-channel fluorescence spectroscopy physical entropy source according to claim 3, characterized in that, In step S200, multidimensional spatiotemporal dynamic features are extracted from the state field at each sampling time to form a temporal feature sequence. , The total number of sampling times, for each feature vector Include: sampling time The above Field concentration distribution Calculate the average concentration of all grid points to obtain the average density characteristic; Calculate the Field concentration distribution The standard deviation of the concentration at all grid points is used to obtain the standard deviation characteristic. The Field concentration distribution The concentration values are linearly quantized into an 8-bit integer matrix. An XOR operation is performed on all row vectors of the 8-bit integer matrix to obtain a column check vector. Then, an XOR operation is performed on all column vectors of the 8-bit integer matrix to obtain a row check vector. The average value of the column check vector and each element in the row check vector is used as the row-column folding XOR check feature. The Field concentration distribution The concentration value distribution is divided into 256 gray levels. The Shannon information entropy of the concentration value distribution is calculated. The spatial information entropy features are obtained, where, For the first The probability of each gray level appearing.
5. The stream cipher generation method based on a dual-channel fluorescence spectroscopy physical entropy source according to claim 1, characterized in that, The S300 includes: Time series feature sequences The input is a Long Short-Term Memory (LSTM) network, which recursively processes the sequence information through its gating mechanism, outputting a hidden state sequence of the same length as the input temporal feature sequence. ; An attention mechanism is introduced to initialize a trainable context query vector. And set a trainable weight matrix. ; For each moment Hidden state Calculate the hidden state With the context query vector Importance rating ; The importance scores at all times are normalized using the Softmax function to obtain the i-th... Attention weight at each moment ; We perform a weighted summation of the hidden states at all time points to obtain a fixed-length high-level context feature fingerprint vector. .
6. The stream cipher generation method based on a dual-channel fluorescence spectroscopy physical entropy source according to claim 1, characterized in that, The S400 includes: The master key is concatenated and fused with the high-level context feature fingerprint vector, and the fusion result is input into the key derivation function; The key derivation function outputs a set of initialization parameters for the four-dimensional Lorenz hyperchaotic system, the initialization parameter set including the initial values of the state variables. and system control parameters ; The four-dimensional Lorenz hyperchaotic system is: , , , ,in, Let these be the four state variables of the four-dimensional Lorenz hyperchaotic system. These are the system control parameters for the four-dimensional Lorenz hyperchaotic system. The fourth-dimensional coupling parameter of the four-dimensional Lorenz hyperchaotic system is given. It is a time variable; The four-dimensional Lorenz hyperchaotic system is preheated by iterating before generating the high-entropy key stream.
7. The stream cipher generation method based on a dual-channel fluorescence spectroscopy physical entropy source according to claim 6, characterized in that, The process of generating the high-entropy key stream is as follows: For the first after preheating is complete Step iteration, to obtain the first State values of each iteration Calculate the state fusion value ; The state fusion value Mapping to byte space generates a key byte. ,in, For floor operations, mod is the floor operation; Continue iterating until the length of the generated high-entropy keystream equals the length of the plaintext data to be encrypted. The high-entropy key stream is obtained. .
8. The stream cipher generation method based on a dual-channel fluorescence spectroscopy physical entropy source according to claim 1, characterized in that, In S500, the byte-by-byte logical operation is an XOR operation; During the encryption process, for plaintext data sequences and high-entropy key stream ciphertext bytes pass The calculation shows that, Represents the XOR operator; During the decryption process, the ciphertext sequence The same high-entropy key stream as the reconstructed Through inverse operation Restore plaintext bytes.
9. A stream cipher generation system based on a dual-channel fluorescence spectroscopy physical entropy source, applicable to the stream cipher generation method based on a dual-channel fluorescence spectroscopy physical entropy source as described in any one of claims 1-8, characterized in that, The system includes: A dual-channel fluorescence emission spectroscopy acquisition module is used to acquire the complete emission spectra of two independent fluorescent materials; The spectral preprocessing and master key generation module is used to perform noise reduction, calibration and normalization preprocessing on the acquired complete emission spectrum, construct a joint spectral vector, and perform a cryptographic hash operation on the joint spectral vector to generate a master key; The biomimetic skin reaction diffusion and feature extraction module is used to derive parameters based on the master key and drive the Gray-Scott reaction diffusion model to perform spatiotemporal evolution, and continuously extract multidimensional spatiotemporal dynamic features from the spatiotemporal evolution process to form a temporal feature sequence. The LSTM-Attention feature aggregation module, which incorporates a long short-term memory network and an attention mechanism, is used to receive the temporal feature sequence and output a fixed-length high-level contextual feature fingerprint. The hyperchaotic key stream generation module is used to fuse the master key with the high-level context feature fingerprint, and generate the initialization parameters of the four-dimensional Lorenz hyperchaotic system through the key derivation function. After preheating and iteration, a high-entropy key stream is generated. The stream cipher encryption / decryption module is used to store plaintext data to be encrypted or ciphertext data to be decrypted, and to perform byte-by-byte logical operations on the stored data using the high-entropy key stream to achieve encryption or decryption.