Hash function construction method based on dynamic feedback quantum walking
By optimizing the coin operator parameters of the quantum walk hash function through a dynamic feedback mechanism, the problems of uneven quantum state distribution and weak adaptive ability in the quantum hash function are solved, resulting in more efficient hash function output uniformity and collision resistance, which is suitable for security protocols in finance, securities and other fields.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIHANG UNIV
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-17
AI Technical Summary
Existing quantum hash functions suffer from uneven quantum state distribution and weak adaptive ability in quantum walk evolution, resulting in uneven output probability distribution and affecting their responsiveness to input changes and collision resistance.
A quantum walk hash function construction method based on dynamic feedback mechanism is adopted. By monitoring the quantum state evolution process in real time and combining a multi-index dynamic feedback mechanism and gradient information optimization strategy, the coin operator parameters are dynamically adjusted to optimize the diffusion behavior and probability distribution of quantum states.
It significantly improves the output uniformity and collision resistance of hash functions, enhances sensitivity and security to input messages, and has greater flexibility and adaptability.
Smart Images

Figure CN121887375A_ABST
Abstract
Description
Technical Field
[0001] This invention specifically relates to a method for constructing hash functions based on dynamic feedback quantum walks, belonging to the field of network security technology. Background Technology
[0002] Hash functions, as the cornerstone of cryptography, are widely used in core security protocols such as digital signatures, message authentication, and key derivation, covering important fields such as finance, securities, and e-commerce. They are key technologies for cryptographic applications such as digital signatures, message authentication codes, and pseudo-random number generation. Existing quantum algorithms, such as Shor's algorithm and Grover's algorithm, pose a serious threat to classical public-key cryptosystems (such as RSA and ECC) based on mathematically difficult problems such as large integer factorization and discrete logarithms. Grover's algorithm, in particular, can reduce the brute-force search complexity of hash functions from... Reduce to This poses a direct threat to the collision resistance of classic hash functions.
[0003] Currently, research on quantum hash functions mainly proceeds in two directions: one is the classical input-quantum output quantum hash function, whose output is a quantum state, and whose security depends on the quantum no-cloning principle and Holevo bound; the other is the classical input-classical output quantum hash function, whose output is a classical bit string, which is usually implemented based on quantum computing models such as quantum walk and Boson sampling.
[0004] The core characteristic of classical input-quantum output quantum hash functions is that they map classical input messages (such as binary bit strings) to quantum output states. Research on these functions can be traced back to the theoretical exploration of quantum one-way functions. However, the main problems with this approach are that the length of the output quantum state is proportional to, rather than constant, the length of the input message; secondly, it does not satisfy the determinism required by classical hash functions. These properties limit its application as a primitive of hash functions in quantum cryptography.
[0005] Compared to classical input-quantum output schemes, classical input-classical output quantum hash functions map classical messages to classical bit strings as outputs, without altering the data exchange format of existing information systems. This makes them easier to integrate with classical systems, thus becoming a research hotspot in the field of quantum hashing in recent years. The design of these functions is mainly based on two mature quantum computing models: discrete / continuous-time quantum walk models and Boson sampling. Among them, hash function schemes based on quantum walks have become the mainstream research direction due to their advantages such as flexible structure, low resource overhead, and excellent statistical performance.
[0006] Although existing research on hash functions based on quantum walks has made some progress in terms of technical implementation and security, there are still shortcomings in the probability distribution of quantum walk evolution and the system's adaptive capability: First, the static setting of coin operator parameters leads to the phenomenon of partial vertex probability clustering during the quantum walk evolution under certain specific message inputs, reducing the uniformity of the output probability distribution; Second, fixed evolution strategies are difficult to adaptively adjust according to the dynamic characteristics of different messages, thus affecting the diffusion efficiency of quantum states in the entire location space and limiting the hash function's ability to respond to input changes.
[0007] To address the issues of uneven quantum state distribution and weak adaptability in traditional quantum hash functions, this invention proposes a hash function construction method based on a dynamic feedback mechanism for quantum walks. Different initial messages result in different initial quantum states, which influence the setting of the coin operator parameters. By integrating the message with the quantum walk parameters, the complexity of the quantum walk evolution is increased. By monitoring the quantum state evolution process in real time and dynamically adjusting the coin operator parameters based on information theory indices, a closed-loop feedback control is formed to eliminate probability clustering, thereby optimizing the diffusion behavior and probability distribution of quantum states. A parameter optimization strategy based on gradient information is designed to achieve adaptive control of the quantum state evolution process, improving diffusion efficiency and output uniformity. This invention enhances the hash function's sensitivity to input messages, collision resistance, and output uniformity, while also providing higher security and flexibility. Summary of the Invention
[0008] The purpose of this invention is to overcome the problems of uneven quantum state distribution and probability clustering of specific vertices caused by static parameters in existing quantum walk hash functions, and to provide a hash function construction method based on dynamic feedback quantum walks. This method introduces a multi-index dynamic feedback mechanism to control the evolution process of the quantum walk in real time, thereby significantly improving the output uniformity, collision resistance, and sensitivity to input messages of the hash function.
[0009] The technical solution adopted in this invention is: a method for constructing a quantum walk hash function based on a dynamic anti-mechanism. Its core is to map the input message to the initial parameters of the quantum walk, and dynamically adjust the coin operator through a multi-index comprehensive evaluation model and an optimization strategy based on gradient information during the evolution process, and finally extract the hash value from the optimized probability distribution.
[0010] This invention includes the following steps: Step 1: Implement hash function initialization based on dynamic feedback quantum walk The parameter set of the hash function construction method based on dynamic feedback quantum walk in this invention is as follows: The specific parameter meanings and setting requirements are as follows: , A natural number representing the size of a two-dimensional lattice point, i.e., a two-dimensional discrete-time quantum walk. Evolution occurs on a two-dimensional grid; the parameter probability amplification coefficient of the post-processing method. and modulus Its value is an integer greater than 0, determined by the security level of the hash function. and satisfy .
[0011] Enter message Convert to binary string ,in, express The bits, , The length of the binary string is represented, and an initial quantum state is constructed using a specific mapping rule, encoding the message information into the quantum state phase. A single-step Grover coin operator quantum walk is performed on the constructed initial quantum state, extracting the von Neumann entropy and purity of the reduced density matrix of the coin space as eigenvectors of the quantum state. Initial coin parameters for a dynamic feedback mechanism are then generated through a nonlinear mapping. , The initial value representing the ground state transition probability. This represents the initial value of the relative phase.
[0012] The specific steps for initializing the hash function based on dynamic feedback quantum walk in step 1 are as follows: (1) Security level selection Choose the security level of the hash function, which is the binary length of the output hash value. ,like Bit, Bits, etc., according to Determine the size of the two-dimensional lattice point for performing a two-dimensional discrete-time quantum walk. and appropriate modulus coefficient Make .
[0013] (2) Input message preprocessing and initial quantum state construction Given plaintext message , For classic information such as text or images Code format. First, the plaintext message... according to The code formats are arranged in order, concatenated, and converted into a binary string. Next, the binary string... Mapped to a A complex vector of dimension is used to construct the initial quantum state, and the specific mapping rules are as follows:
[0014] in, Represents the quantum initial state. Indicates the length of the binary string. The corresponding binary string Each bit position The phase angle is determined by the message bits; when the message bit is 0, the phase is 0, and when the message bit is 1, the phase is... , The phase factor is in complex exponential form, and the basis is... It constitutes a Hilbert space of dimensionality This mapping rule maps each message bit... Encoding as corresponding The phase of the message embeds the classical information of the message into the phase structure of the initial quantum state.
[0015] (3) Initialization of coin operator parameters A single-step quantum walk is performed on the initial quantum state, and the evolution of the single-step quantum walk is determined by... accomplish, The state obtained after evolution is the identity operator representing the location space. The feature messages are extracted to generate the initial coin phase parameters, and the coin operator used is the Grover operator. Shift operator The definition is as follows:
[0016] in, and Let be the ground state vector in the location space. and For the ground state of the coin space, Represents the tensor product. For the evolving state... Find the reduced density matrix of the coin space. ,in The trace operation is represented. To extract its statistical characteristics, the trace operation is calculated. von Neumann entropy and purity:
[0017] in, express von Neumann entropy, express The purity is calculated to obtain a two-dimensional eigenvector. And map the feature vector
[0018] Convert to coin operator parameters , which are the initial parameters used for dynamic feedback mechanism adjustment and subsequent quantum walk evolution.
[0019] Step 2: Realizing Dynamic Feedback Quantum Walk Evolution by Construct a coin operator for the initial coin parameters, so as to For the initial quantum state, in A coin-parameterized quantum walk is performed on a two-dimensional lattice. The unitary transformation operator for each step in the internal execution of the quantum walk evolution is... ,in, and They act on the coin space respectively and The coin arithmetic, and They are respectively in and The position space identity operator for orientation. This method uses adjustable parameters. The operator, as the main body controlled by the dynamic feedback mechanism, is the core coin operator in the quantum walk evolution process. It is defined as follows:
[0020] in, Controlling the transition probabilities between ground states Controlling the relative phase, This represents a complex phase factor used to adjust the phase of a quantum state. It is all the matrix whose determinant is 1. A group consisting of unitary matrices. In quantum computing, Operators represent all possible unitary transformations on a single qubit. and They are in and The conditional shift operator in the direction is defined as follows:
[0021] in, and for The ground state vector in the position space of the direction. and for The ground state vector in the position space of the direction. and For the ground state of the coin space, Represents the tensor product. Each time... After the first evolution step, calculate the probability distribution in the location space. ,in, This represents the probability value of each vertex in the final state. A comprehensive evaluation function is constructed based on Shannon entropy, chi-square test value, and uniformity coefficient. For Always in position The probability is:
[0022] in, For the ground state of the total Hilbert space, express The quantum state at time t. The probability distribution. It forms the basis for all subsequent statistical indicator calculations. Shannon entropy. The entropy value measures the uncertainty of a probability distribution; a higher entropy value indicates a more uniform distribution. Chi-square test value. It measures the difference between the actual probability distribution and the uniform distribution. The deviation is denoted by the uniformity coefficient; a lower value indicates a more uniform distribution. The uniformity of a probability distribution can be judged by focusing on the maximum value in the distribution. The closer the uniformity coefficient is to 1, the less significant the localization in the distribution.
[0023] Based on the above indicators, a comprehensive evaluation function is defined, and the weight coefficients and comprehensive evaluation standard thresholds for each evaluation indicator are set:
[0024] in, It is the maximum possible Shannon entropy. It is the theoretical chi-square value under uniform distribution. The preset weighting coefficients satisfy... This evaluation function aims to comprehensively quantify the deviation between the current distribution and the ideal uniform distribution, facilitating subsequent decisions on whether to activate the feedback mechanism for quantum walk evolution control and coin operator adjustment.
[0025] If the evaluation result does not reach the uniformity threshold, a feedback mechanism is activated. The coin parameters are updated using a gradient optimization strategy, and the initial quantum walk evolution is repeated, forming a closed-loop control of "quantum walk evolution - comprehensive model evaluation - feedback control adjustment" until the output distribution reaches optimal uniformity. Specifically, the system updates the coin parameters based on the evaluation result as follows:
[0026] in, and These represent the parameter values before and after the update, and the parameter increment, respectively. Generated by an optimization strategy based on gradient information:
[0027] in, denoted as the learning rate. After parameter updates are complete, the system begins a new round of feedback control loop. The loop terminates when the feedback decision condition is met, and the system outputs the final quantum state and calculates its probability distribution in the location space. This distribution, optimized by the dynamic feedback mechanism, exhibits high uniformity and randomness, and is used for subsequent hash value extraction.
[0028] Step 3: Obtain the probability distribution of the final quantum state vertex through projection measurement. Measuring the final quantum state position state The final quantum state is obtained at each vertex of the two-dimensional lattice. The probability distribution is ,in, It represents the probability value of each vertex in the final state.
[0029] Step 4: Execute the post-processing method to calculate the hash value. right Each of them Post-processing method That is, the probability value of each vertex multiplied by After rounding down, the modulus is... The modulo operation is used to calculate the value of each vertex. Corresponding string , Concatenate them in order and convert them into a new binary string. Use it as the hash value of the plaintext. .
[0030] The advantages of this invention compared to the prior art are: (1) This invention proposes a novel quantum walk model that introduces a dynamic feedback mechanism. By monitoring the quantum state distribution in real time and dynamically adjusting the coin operator parameters, it integrates a multi-index evaluation model based on information theory and statistics, providing a comprehensive and reliable quantitative basis for feedback control and ensuring that the optimization process is scientific and effective. It effectively eliminates the probability clustering phenomenon in traditional quantum walk hash functions, significantly improves the uniformity and randomness of the output distribution, and thus enhances the collision resistance.
[0031] (2) This invention embeds the initial message into the initial coin parameters, so that any tiny change in the input will lead to a completely different path. Combined with the feedback-optimized diffusion process, the hash function exhibits a near-ideal avalanche effect. This invention does not rely on specific grid topologies or families of coin operators, and its framework is flexible, providing a general and robust method for constructing hash functions with different security requirements and output lengths. Attached Figure Description
[0032] Figure 1 This is a flowchart of the method.
[0033] Figure 2 This is a design diagram of a quantum walk model based on a dynamic feedback mechanism.
[0034] Figure 3 This is a flowchart of the dynamic feedback mechanism. Detailed Implementation
[0035] The present invention proposes a method for constructing a hash function based on dynamic feedback quantum walks. The main idea is to construct a quantum walk model based on dynamic feedback mechanism based on the two-dimensional discrete-time quantum walk method, and then construct a quantum hash function based on this model.
[0036] The proposed method for constructing hash functions based on dynamic feedback quantum walks in this invention allows the dynamic feedback quantum walk process to occur in Hilbert space on a two-dimensional lattice. In, among them, and They represent direction and The position space of direction, and This corresponds to the two-dimensional coin space. From the initial quantum state constructed based on messages... Departure, in a size of Dynamic feedback quantum walk evolution is achieved on a two-dimensional lattice. After comprehensive evaluation model assessment and dynamic feedback mechanism optimization control, the final quantum state is obtained. For the final quantum state Post-processing operations are performed on the vertex probability distribution to calculate the value of each vertex. The corresponding string Concatenate them in order and convert them into a new binary string. Use it as the hash value of the plaintext. .
[0037] To verify the practicality and superiority of this invention in the field of message authentication and integrity protection, this embodiment uses message authentication in secure communication as an application scenario. In this scenario, the system needs to generate hash values for communication messages to verify whether the messages have been tampered with during transmission, ensuring the integrity and authenticity of the messages. The hash function must be highly sensitive to any small changes in the input message and produce a uniformly distributed output to meet the high security requirements of message authentication.
[0038] The present invention provides a method for constructing a hash function based on dynamic feedback quantum walks, the overall process of which is as follows: Figure 1 As shown, it mainly includes the following four core steps: Step 1: Implement hash function initialization based on dynamic feedback quantum walk The purpose of this step is to transform an input message of arbitrary length into initial parameters that drive the evolution of the quantum walk. First, the security level of the hash function is chosen, which is the binary length of the output hash value. for Bits. At this point, the modulus coefficient is selected. And probability expansion factor All Therefore, the corresponding two-dimensional grid size for the execution of a two-dimensional discrete-time quantum walk is... .
[0039] Given a plaintext input message to be compressed Transform it into The code format is then arranged in order and converted into binary format. Assume:
[0040] Map the binary message string to a A complex vector of dimension is used to construct the initial quantum state, and the specific mapping rule is as follows:
[0041] Among them, phase The phase is determined by the message bits; when the message bit is 0, the phase is 0; when the message bit is 1, the phase is... This mapping rule maps each message bit... Encoding as corresponding The phase of the message embeds the classical information of the message into the phase structure of the initial quantum state.
[0042] To extract message-related dynamic features from the initial quantum state, a single-step quantum walk evolution is performed on the quantum state to obtain... The feature messages are extracted from these features to generate the initial coin phase parameters. The total Hilbert space of the walking system is defined as follows: ,in For a two-dimensional coin space, the position space From the base Zhang Cheng. With For the initial state, use the Grover operator. and shift operators Performing a single-step quantum walk evolution yields... .calculate Reduced density matrix in coin space ,extract The von Neumann entropy and purity constitute the eigenvector. .
[0043]
[0044] Feature vector Through nonlinear mapping function Convert to initial coin parameters The parameter set obtained in this example is: .
[0045] Step 2: Realizing Dynamic Feedback Quantum Walk Evolution The quantum walk model design based on a dynamic feedback mechanism closely relies on the mathematical model of two-dimensional discrete-time quantum walks. By introducing a parameterized coin operator and designing a comprehensive evaluation model based on multiple statistical indicators, the quantum walk process undergoes a cyclical optimization process of "quantum walk evolution - comprehensive model evaluation - feedback control adjustment." The specific quantum walk model design is as follows: Figure 2 As shown.
[0046] A quantum walk model based on a dynamic feedback mechanism, with For the initial coin parameters, For the initial quantum state, in A coin-parameterized quantum walk is performed on a two-dimensional lattice. The unitary transformation operator for each step in the internal execution of the quantum walk evolution is... ,in, and They act on the coin space respectively and The coin counter.
[0047] This invention employs adjustable parameters The operator serves as the main body of the dynamic feedback mechanism control, namely the core coin operator in the quantum walk evolution process. It is all the matrix whose determinant is 1. A group consisting of unitary matrices. In quantum computing, The operator represents all possible unitary transformations on a single qubit. Among them, Controlling the transition probabilities between ground states Control the relative phase. The coin operator for constructing quantum walk evolution in operator form is defined as follows:
[0048] and It is a conditional shift operator, defined as follows:
[0049] conduct After the first evolution step, calculate the probability distribution in the location space. A comprehensive evaluation function is constructed based on Shannon entropy, chi-square test value, and uniformity coefficient. Specific index definitions are as follows: for At any given moment, the quantum state is in position. The probability is:
[0050] in, For the ground state of the total Hilbert space, express The quantum state at a given moment.
[0051] Shannon entropy It measures the uncertainty of a probability distribution; a higher entropy value indicates a more uniform distribution.
[0052]
[0053] Chi-square test value It measures the difference between the actual probability distribution and the uniform distribution. The lower the deviation value, the closer the distribution is to uniformity.
[0054]
[0055] The uniformity coefficient judges the degree of uniformity of the distribution by focusing on the maxima in the probability distribution. The closer the coefficient is to 1, the less significant the localization in the distribution.
[0056]
[0057] Based on the above indicators, a comprehensive evaluation function is defined, and the weight coefficients of each evaluation indicator and the threshold of the comprehensive evaluation standard are set.
[0058]
[0059] in, It is the maximum possible Shannon entropy. This is the theoretical chi-square value under a uniform distribution, with weighting coefficients set. ,satisfy Based on the calculation results of the comprehensive evaluation function, it is determined whether to activate the feedback mechanism for quantum walk evolution control and coin operator adjustment. If the evaluation result does not reach the uniformity threshold, the feedback mechanism is activated, the coin parameters are updated through a gradient optimization strategy, and the initial state quantum walk evolution is performed. The dynamic feedback mechanism based on the coin operator parameters realizes the cyclical process of "quantum walk evolution - comprehensive model evaluation - feedback control adjustment," as specifically implemented as follows: Figure 3 As shown, this continues until the output distribution reaches optimal uniformity. The coin parameters are updated as follows:
[0060] Among them, parameter increment Generated by an optimization strategy based on gradient information, with a set learning rate. :
[0061] After the parameter update is complete, the system begins a new round of feedback control loop. The loop terminates when the feedback decision condition is met, and the system outputs the final quantum state and calculates its probability distribution in the location space. This is used for subsequent hash value extraction.
[0062] Step 3: Obtain the probability distribution of the final quantum state vertex through projection measurement. Measuring the final quantum state position state The final quantum state is obtained at each vertex of the two-dimensional lattice. The probability distribution is ,in, This represents the probability value of each vertex in the final state. A simulation program can be used to calculate the probability distribution of the final quantum state at each position, rounded to 8 decimal places:
[0063] Step 4: Execute the post-processing method to calculate the hash value. The probability distribution obtained in step 3 Each of them The post-processing method is executed, which involves multiplying the probability value of each vertex by... After rounding down, the modulus is... The modulo operation yields the hash value:
[0064] Arrange all the characters in order and connect them to get a A binary string of bits as a hash value For simplicity, convert it to Number string: 343683d92cc734572c83142aa62babe2542baaeee3679f40611651af552ff623.
[0065] To verify the effectiveness of this invention in message authentication applications, we tested key performance metrics of the hash function: (1) Avalanche effect test: Construct four sets of test messages, original message Single-bit flip message Randomly insert single-bit messages Randomly delete single-bit messages Calculate their hash values separately, and then calculate the hash values with respect to each hash value. Hamming distance between hash values. Experimental results show that the average Hamming distance of the hash function constructed in this invention is 128 bits, the bit change rate is 50%, it is highly sensitive to small changes in the input message, meets the strict avalanche effect requirement of cryptographic hash functions, and can effectively detect any tampering of the message; (2) Collision resistance test: for the original message Generate new messages by performing random single-bit flips. Two sets of hash values were calculated, and the distribution of the number of hits with the same character at corresponding positions was statistically analyzed. The Kullback-Leibler (KL) divergence was used to measure the difference between the experimental distribution and the ideal random distribution, and the mean absolute difference between the hash values was also calculated. A smaller KL divergence value indicates that the theoretical hit count is closer to the experimental hit count, and the hash function has better collision resistance. A smaller deviation between the mean absolute difference and the theoretical value indicates better collision resistance. Experimental results show that the hash function constructed in this invention has a KL divergence of only 0.000214 and a mean absolute difference deviation from the theoretical value of only 0.02, exhibiting excellent collision resistance and effectively resisting collision attacks. (3) Diffusion and Confusion Test: Through 10,000 independent tests, the average number of bits changed between the hash values of the original message and the single-bit flipped message is statistically analyzed. Change probability and its standard deviation and The average number of bit changes in the hash function constructed in this invention. For 128 bits, change the probability It reaches 50%, meeting the target under ideal conditions. Meanwhile, and The values are 8.0597% and 3.1483% respectively, indicating that the present invention has good diffusion and obfuscation performance. Small perturbations at the input end can uniformly and stably affect the entire output, and it has strong resistance to differential analysis attacks. (4) Uniformity test: Through 10,000 independent tests, the frequency at which each bit of the hash value flips due to input perturbation is counted. The average number of flips is calculated. Absolute deviation from the ideal value and the standard deviation of the number of flips The average number of flips in the hash function constructed in this invention. The value is 5000.33, with an absolute deviation from the ideal value of only 0.33, and the standard deviation is... The value of 51.0110 indicates that the hash value output by this invention has a highly uniform flip probability on each bit, successfully eliminating the probability aggregation phenomenon that may be caused by static parameter methods, effectively masking the statistical characteristics of the input information, and resisting statistical analysis attacks.
[0066] Through systematic security testing and analysis, the hash function based on dynamic feedback quantum walks proposed in this invention demonstrates excellent performance in core cryptographic indicators such as sensitivity, collision resistance, diffusion confusion resistance, and uniformity, reaching or approaching the expected values of the ideal security model. Therefore, this invention is fully applicable to security protocols such as message authentication, digital signatures, and data tamper-proofing that require extremely high integrity, authenticity, and collision resistance, possessing clear practicality and outstanding security advantages.
[0067] The above description is merely an example of a hash function construction method based on dynamic feedback quantum walks. It should be noted that these examples are only used to illustrate the implementation process of the present invention and do not limit the scope of the present invention. For those skilled in the art, several improvements, refinements, or equivalent modifications can be made without departing from the principle of the hash function construction method based on dynamic feedback quantum walks of the present invention. These improvements, refinements, or equivalent modifications should also be considered as the scope defined by the appended claims of the hash function construction method based on dynamic feedback quantum walks of the present invention.
Claims
1. A method for constructing a hash function based on dynamic feedback quantum walks, characterized in that, It includes the following steps: Step 1: Implement hash function initialization based on dynamic feedback quantum walk Step 1.1: Select an appropriate hash function output length based on the security level requirements of the hash function. Select an appropriate two-dimensional grid size Probability magnification factor and modulus ; Step 1.2: Given a plaintext message First, the plaintext message according to The code formats are arranged in order, concatenated, and converted into a binary string. According to binary messages The bits construct the initial quantum state By embedding the classical information of the message into the phase of the quantum state, a correlation is established between the message and the quantum walk dynamics. Step 1.3: with Perform a quantum walk evolution with the Grover operator as the coin operator on the initial quantum state to obtain the evolved quantum state. Extract its feature vector and generate initial values for the coin parameters through a nonlinear mapping. ; Step 2: Realizing Dynamic Feedback Quantum Walk Evolution In size A dynamic feedback quantum walk method is performed on a two-dimensional lattice to achieve this. Construct the coin operator for quantum walks using the initial coin parameters. ;implement After the quantum walk evolution, the vertex probability distribution and statistical indicators are calculated. The comprehensive evaluation model is used to determine whether the ideal distribution conditions are met, and to decide whether to adjust the coin operator parameters based on gradient information optimization strategy. After feedback adjustment, the initial quantum state Re-execute the quantum walk evolution to obtain the final quantum state. ; Step 3: Obtain the probability distribution of the final quantum state vertex through projection measurement. Measuring the final quantum state position state The final quantum state is obtained at each vertex of the two-dimensional lattice. The probability distribution is ,in, It is the probability value of each vertex in the final state; Step 4: Execute the post-processing method to calculate the hash value. right Each of them Post-processing method That is, the probability value of each vertex multiplied by After rounding down, the modulus is... The modulo operation is used to calculate the value of each vertex. Corresponding string , Concatenate them in order and convert them into a new binary string. Use it as the hash value of the plaintext. .
2. The method for constructing a hash function based on dynamic feedback quantum walks according to claim 1, characterized in that: In step 1.1, the security level of the hash function is selected, which is the binary length of the output hash value. ,according to Determine the size of the two-dimensional lattice point for performing a two-dimensional discrete-time quantum walk. Modulo coefficient Make .
3. The method for constructing a hash function based on dynamic feedback quantum walks according to claim 1, characterized in that: In step 1.2, the plaintext message is first... according to The code formats are arranged in order, concatenated, and converted into a binary string. Next, the binary string Mapped to a For a complex vector of dimension 1, the initial quantum state is constructed using the following mapping rule: ; in, Represents the quantum initial state. Indicates the length of the binary string. The corresponding binary string Each bit position The phase angle is determined by the message bits. It is a phase factor in complex exponential form.
4. A method for constructing a hash function based on dynamic feedback quantum walks according to claim 1, 2, or 3, characterized in that: In step 1.3, a single-step quantum walk is performed on the initial quantum state. The evolution of the single-step quantum walk is determined by... accomplish, The state obtained after evolution is the identity operator representing the location space. The feature messages are extracted to generate the initial coin phase parameters, and the coin operator used is the Grover operator. Shift operator The definition is as follows: ; in, and Let be the ground state vector in the location space. and For the ground state of the coin space, Represents the tensor product; for the evolving state Find the reduced density matrix of the coin space. ,in, The trace operation is represented; in order to extract its statistical characteristics, the trace is calculated. von Neumann entropy and purity: ; in, express von Neumann entropy, express The purity is calculated to obtain a two-dimensional eigenvector. And map the feature vector ; Convert to coin operator parameters , which are the initial parameters used for dynamic feedback mechanism adjustment and subsequent quantum walk evolution.
5. The method for constructing a hash function based on dynamic feedback quantum walk according to claim 1, characterized in that: In step 2, with Construct a coin operator for the initial coin parameters, so as to For the initial quantum state, in A coin-parameterized quantum walk is performed on a two-dimensional lattice. The unitary transformation operator for each step in the internal execution of the quantum walk evolution is: ,in, and They act on the coin space respectively and The coin arithmetic, and They are respectively in and The identity operator for the position space of the direction.
6. A method for constructing a hash function based on dynamic feedback quantum walks according to claim 1 or 5, characterized in that: Using adjustable parameters The operator, as the main body of the dynamic feedback mechanism control, is the core coin operator in the quantum walk evolution process; it is defined as follows: ; in, Controlling the transition probabilities between ground states Controlling the relative phase, This represents a complex phase factor used to adjust the phase of a quantum state.
7. The method for constructing a hash function based on dynamic feedback quantum walk according to claim 1, characterized in that: and They are in and The conditional shift operator in the direction is defined as follows: ; in, and for The ground state vector in the position space of the direction. and for The ground state vector in the position space of the direction. and For the ground state of the coin space, Represents the tensor product; each time... After the first evolution step, calculate the probability distribution in the location space. ,in, It represents the probability value of each vertex in the final state; and an evaluation function is constructed based on Shannon entropy, chi-square test value, and uniformity coefficient.
8. The method for constructing a hash function based on dynamic feedback quantum walk according to claim 7, characterized in that: for Always in position The probability is: ; in, For the ground state of the total Hilbert space, express Quantum state at a given moment; Shannon entropy The entropy value measures the uncertainty of a probability distribution; a higher entropy value indicates a more uniform distribution. (Chi-square test value) It measures the difference between the actual probability distribution and the uniform distribution. The deviation is expressed as a coefficient of uniformity; a lower value indicates a more uniform distribution. The uniformity of a probability distribution can be judged by focusing on the maximum value in the distribution. The closer the uniformity coefficient is to 1, the less significant the localization in the distribution.
9. A method for constructing a hash function based on dynamic feedback quantum walks according to claim 8, characterized in that: Define the comprehensive evaluation function and set the weight coefficients for each evaluation indicator and the threshold for the comprehensive evaluation standard: ; in, It is the maximum possible Shannon entropy. It is the theoretical chi-square value under uniform distribution. The preset weighting coefficients satisfy... .
10. A method for constructing a hash function based on dynamic feedback quantum walks according to claim 9, characterized in that: If the evaluation result does not reach the uniformity threshold, a feedback mechanism is activated. The coin parameters are updated through a gradient optimization strategy, and the initial state quantum walk evolution is repeated, forming a closed-loop control of quantum walk evolution, comprehensive model evaluation, and feedback control adjustment, until the output distribution reaches optimal uniformity. Specifically, based on the evaluation result, the coin parameters are updated as follows: ; in, and These represent the parameter values before and after the update, and the parameter increment, respectively. Generated by an optimization strategy based on gradient information: ; in, The learning rate is used; after the parameter update is completed, the system starts a new round of feedback control loop; when the feedback decision condition is met, the loop terminates, the system outputs the final quantum state and calculates its probability distribution in the location space.