Data detection method of quantum neural discriminator based on block cipher

By applying a quantum neural differentiator based on packet cipher in data detection, the problem of difficulty in detecting encrypted traffic and lack of adaptability in the prior art is solved, efficient data encryption and detection is achieved, and the risk of data leakage and tampering is reduced.

CN119675923AActive Publication Date: 2025-03-21CHONGQING UNIV OF POSTS & TELECOMM
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411731297.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

Existing data leakage and tamper detection methods are difficult to detect encrypted traffic, lack adaptability and self-learning capabilities, and rely heavily on feature engineering, requiring a lot of manual intervention.

Method used

The data detection method of a quantum neural differentiator based on packet cipher is adopted. The sender encrypts the plain text by packetizing the text, and the receiver uses the trained quantum neural differentiator to detect the cipher text to identify normal and abnormal data samples.

Benefits of technology

It improves the detection capability of encrypted data, reduces the risk of data leakage and tampering, reduces false alarms and missed reports, and improves the efficiency of security monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119675923A_ABST
    Figure CN119675923A_ABST
Patent Text Reader

Abstract

The invention discloses a block cipher-based data detection method for a quantum neural discriminator. The method comprises the following steps: a sender encrypts a specific plaintext by using a block encryption algorithm to obtain ciphertext data and transmits the ciphertext data to a receiver; receiving and generating a specific data set, wherein the data set is composed of normal data conforming to characteristics and random abnormal data; thirdly, a receiver constructs a quantum neural network, input data are coded into a quantum state, convolution is achieved through a revolving door and a controlled door, and residual connection is achieved through control bit addition and unit matrix addition; the method comprises the steps that firstly, a network is obtained, then the network is trained and passes a verification test, so that an efficient quantum nerve discriminator is obtained, and finally, a receiver inputs received data into the quantum nerve discriminator for detection. According to the method, the powerful parallel processing capability of quantum computing and the advancement of the deep learning technology are fused, and normal data and abnormal data can be effectively distinguished, so that whether the data are leaked or tampered or not is judged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of quantum information security, and in particular relates to a data detection method of a quantum neural discriminator based on block cipher. Background Art

[0002] With the rapid development of information technology, data security has become the focus of attention for countries, enterprises and individuals. In the context of global informatization and networking, data leakage and tampering incidents occur frequently, posing serious threats to national security, corporate interests and personal privacy. The security of traditional encryption algorithms may be threatened in the face of increasingly powerful computing power, especially the development of quantum computers may make current non-quantum encryption algorithms no longer secure.

[0003] At present, the mainstream methods for detecting data leakage and tampering mainly rely on technologies such as rule-based detection systems, traffic analysis, and signature matching. These methods usually require pre-definition of a series of attack features and rules, and then identify potential threats by monitoring network traffic and system logs. However, these methods have several significant problems: first, they are difficult to detect encrypted traffic, and rule-based detection is also easily bypassed by attackers through mutation attacks; at the same time, they lack adaptability and self-learning capabilities, and are difficult to cope with changing attack patterns; finally, these methods rely heavily on feature engineering and require a lot of manual intervention to update and maintain detection rules. Therefore, exploring new security protection methods and detection technologies has become an urgent need in the field of information security. Summary of the invention

[0004] In order to solve the problems existing in the background technology, the present invention combines the advantages of quantum and neural network, and proposes a data detection method of quantum neural discriminator based on block cipher, including: the sender encrypts a specific plaintext pair using a block encryption algorithm to obtain a ciphertext pair, and transmits the ciphertext pair to the receiver; the receiver inputs the received ciphertext pair into the trained quantum neural discriminator pair for detection to obtain the detection result; wherein the training process of the quantum neural discriminator is as follows:

[0005] S1: Randomly generate plaintext pairs with specific differences to construct a training set, and replace some plaintext pairs in the training set with random plaintexts;

[0006] S2: Use a block encryption algorithm to encrypt the plaintext pairs in the training set to obtain ciphertext pairs; the ciphertext pairs of the plaintext pairs that have not been replaced in the training set are used as normal data samples, and the ciphertext pairs of the plaintext pairs that have been replaced are used as abnormal data samples;

[0007] S3: Train the quantum neural discriminator based on the constructed normal data samples and abnormal data samples to obtain a trained quantum neural discriminator.

[0008] The present invention has at least the following beneficial effects

[0009] The present invention uses the superposition state of quantum computers to simultaneously represent multiple states, thus achieving true parallel computing. The present invention uses the powerful parallel processing capabilities provided by quantum computing, combined with the advanced nature of deep learning technology, and has the following advantages:

[0010] 1. Utilize the high efficiency of quantum neural distinguishers to improve the performance of data encryption and detection and reduce the risk of data leakage and tampering.

[0011] 2. Improve the detection capability of encrypted data: Using neural discriminators, the model can be trained to recognize the statistical characteristics of normal encrypted data, thereby detecting abnormal or tampered encrypted data without decryption.

[0012] 3. Reduce false positives and false negatives: Through deep learning technology, the neural discriminator can more accurately identify data patterns, reduce false positives and false negatives, and improve the efficiency of security monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 The figure is a flowchart of the method of the present invention. DETAILED DESCRIPTION

[0014] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0015] See also Figure 1 The present invention provides a data detection method of a quantum neural discriminator based on a block cipher, comprising: a sender encrypts a specific plaintext pair using a block encryption algorithm to obtain a ciphertext pair, and transmits the ciphertext pair to a receiver; the receiver inputs the received ciphertext pair into a trained quantum neural discriminator pair for detection to obtain a detection result; wherein the training process of the quantum neural discriminator is as follows:

[0016] S1: Randomly generate plaintext pairs with specific differences to construct a training set, and replace some plaintext pairs in the training set with random plaintexts;

[0017] S2: Use a block encryption algorithm to encrypt the plaintext pairs in the training set to obtain ciphertext pairs; the ciphertext pairs of the plaintext pairs that have not been replaced in the training set are used as normal data samples, and the ciphertext pairs of the plaintext pairs that have been replaced are used as abnormal data samples;

[0018] S3: Train the quantum neural discriminator based on the constructed normal data samples and abnormal data samples to obtain a trained quantum neural discriminator.

[0019] Preferably, the step S1 comprises:

[0020] S11: Select a differential path α→β with high probability, where α represents the input differential and β represents the output differential;

[0021] S12: Use a random data generator to randomly generate a plaintext pair (P i 0 ,P i 1 )(i∈1,2,…,N) and a binary label list Y i , Y i ∈{0,1}, N represents the number of plaintext pairs;

[0022] S13: Y i = 0 plaintext pair (P i 0 ,P i 1 ) i 1 Using the randomly generated plaintext P i 1* Replace, and get a new plaintext pair (P i 0 ,P i 1* ).

[0023] Preferably, before the quantum neural distinguisher processes the ciphertext pair, the ciphertext pair is preprocessed, and the preprocessing includes: representing the ciphertext pair (C0, C1) of length m·n as m n-bit word sequences (w0, w1, ..., w i ,…,w m-1 ), where w i (i∈0,1,…,m-1) is a row vector of an m×n matrix.

[0024] Preferably, the training of the quantum neural discriminator comprises:

[0025] S31: Divide the preprocessed ciphertext pair into t sub-parts, and use the rotating gate RY(θ) to encode each sub-part into the initial quantum state

[0026] S32: The initial quantum state Through the controlled quantum convolutional network system U cir The processed state is represented as Then add the unit matrix I and use auxiliary quantum control to realize residual connection to obtain the quantum state |ψ>;

[0027] S33: Initial quantum state Through the quantum circuit to realize the unitary transformation and convolution, we can get the quantum state

[0028] S34: Quantum state As input data, apply the quantum Boolean circuit U b , realize the nonlinear rectification function and obtain the quantum state

[0029] S35: Quantum state As input data, perform the convolution steps similar to S34, perform the second convolution, and obtain the quantum state

[0030] S36: Measure the quantum state |ψ> and obtain the classical output y of the residual convolution i ;

[0031] S37: Repeat steps S32 to S36, perform residual convolution on each sub-part, and then measure the total output y = {y1, y2, ..., y t};

[0032] S38: Use quantum circuits to replace the classical fully connected layers, integrate and abstract the convolution results, and obtain the quantum state |Q′>;

[0033] S39: Measure the quantum state |Q′> and obtain the output value s={s1,s2,…,s v};

[0034] S310: Finally, the output value s is input into the Sigmoid activation function to obtain the predicted value, and a mean square error loss function is constructed based on the predicted value and the true label. The parameters of the quantum neural discriminator are tuned based on the constructed mean square error loss function to obtain a trained quantum neural discriminator.

[0035] Preferably, the step S31 includes:

[0036] S311: Divide the preprocessed ciphertext pair into t sub-parts, each sub-part z d The size of is 3×3, and its classical value is x={x1,x2,…,x i ,…,x9};

[0037] S312: Initialize 9 quantum bits, and the initial states of the 9 quantum bits are all |0>;

[0038] S313: Use the revolving door RY(θ) to resize each sub-part z d The classical value of x is encoded. i As the rotation angle corresponding to each value, the initial quantum state is obtained

[0039]

[0040] in, represents the initial quantum state, Represents a tensor product operation.

[0041] Preferably, the step S32 includes:

[0042] S321: Set auxiliary qubit |0>, quantum state becomes |q>:

[0043]

[0044] S322: Apply a Hadamard gate to the auxiliary quantum bit, and the quantum state |q> evolves to |q1>:

[0045]

[0046] S323: Through auxiliary quantum bit control, in the initial quantum state The quantum convolutional network system U cir and the unit matrix I, we get the quantum state |q2>:

[0047]

[0048] S324: Apply a Hadamard gate to the auxiliary quantum bit of the quantum state |q2> again to obtain the quantum state |ψ>:

[0049]

[0050] Among them, U cir Represents a controlled quantum convolutional network system.

[0051] Preferably, the step S33 comprises:

[0052] S331: Initial quantum state Each quantum bit of the quantum state is subjected to a rotation gate RX(θ). Evolved into |u>:

[0053]

[0054] S332: Apply CNOT gates between adjacent qubits of the quantum state |u> to entangle the qubits and obtain the quantum state

[0055]

[0056] Among them, θ i represents the rotation angle of the i-th quantum bit, CNOT i,i+1 The controlled NOT gate indicates that the i-th quantum bit is the control bit and the i+1-th quantum bit is the controlled bit. Represents a tensor product operation.

[0057] Preferably, the step S35 includes:

[0058] S351: As input data, perform the second convolution and get

[0059]

[0060] S352: Applied Quantum Boolean Circuits U b , realizing the nonlinear rectification function:

[0061]

[0062] Among them, θ′ i represents the rotation angle of the i-th quantum bit, CNOT′ i,i+1 The controlled NOT gate indicates that the i-th quantum bit is the control bit and the i+1-th quantum bit is the controlled bit. Represents the tensor product operation; RX(θ′ i ) indicates a revolving door.

[0063] Preferably, the step S36 includes:

[0064] S361: Measure the auxiliary qubit in the quantum state |ψ>. When the auxiliary qubit is in the |0> state, the output result is:

[0065]

[0066] Among them, U cir represents a controlled quantum convolutional network system; I represents the identity matrix;

[0067] S362: Yes Measure and obtain the classic data y after residual convolution i .

[0068] Preferably, the step S38 comprises:

[0069] S381: The output of the convolution is amplitude-encoded and converted again into a quantum state of v qubits |Q>:

[0070]

[0071] S382: Transform through a quantum circuit to achieve post-processing and obtain higher-level features:

[0072]

[0073] Among them, CNOT i,i+1 The controlled NOT gate indicates that the i-th quantum bit is the control bit and the i+1-th quantum bit is the controlled bit. Represents the tensor product operation, R y (θ i ) represents a revolving door, θ i represents the rotation angle of the i-th quantum bit.

[0074] In summary, the present invention uses quantum computers to rely on the superposition state of qubits, and has the ability to simultaneously represent multiple states, thus achieving true parallel computing. The present invention uses the powerful parallel processing capabilities provided by quantum computing, combined with the advanced nature of deep learning technology, and has the following advantages:

[0075] 1. Utilize the high efficiency of quantum neural distinguishers to improve the performance of data encryption and detection and reduce the risk of data leakage and tampering.

[0076] 2. Improve the detection capability of encrypted data: Using neural discriminators, the model can be trained to recognize the statistical characteristics of normal encrypted data, thereby detecting abnormal or tampered encrypted data without decryption.

[0077] 3. Reduce false positives and false negatives: Through deep learning technology, the neural discriminator can more accurately identify data patterns, reduce false positives and false negatives, and improve the efficiency of security monitoring.

[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A data detection method of a quantum neural distinguisher based on block cipher, characterized in that: include: The sender uses a block encryption algorithm to encrypt a specific plaintext pair to obtain a ciphertext pair, and transmits the ciphertext pair to the receiver; the receiver inputs the received ciphertext pair into the trained quantum neural discriminator pair for detection to obtain the detection result; The training process of the quantum neural discriminator is as follows: S1: Randomly generate plaintext pairs with specific differences to construct a training set, and replace some plaintext pairs in the training set with random plaintexts; S2: Use a block encryption algorithm to encrypt the plaintext pairs in the training set to obtain ciphertext pairs; the ciphertext pairs of the plaintext pairs that have not been replaced in the training set are used as normal data samples, and the ciphertext pairs of the plaintext pairs that have been replaced are used as abnormal data samples; S3: Train the quantum neural discriminator based on the constructed normal data samples and abnormal data samples to obtain a trained quantum neural discriminator.

2. According to claim 1, a data detection method of a quantum neural distinguisher based on block cipher is characterized in that: The step S1 comprises: S11: Select a differential path α→β with high probability, where α represents the input differential and β represents the output differential; S12: Use a random data generator to randomly generate a plaintext pair (P i 0 ,P i 1 )(i∈1,2,…,N) and a binary label list Y i , Y i ∈{0,1}, N represents the number of plaintext pairs; S13: Y i = 0 plaintext pair (P i 0 ,P i 1 ) i 1 Using randomly generated plaintext Replace, and get a new plaintext pair 3. According to claim 1, a data detection method of a quantum neural distinguisher based on block cipher is characterized in that: Before the quantum neural distinguisher processes the ciphertext pair, the ciphertext pair is preprocessed. The preprocessing includes: representing the ciphertext pair (C0, C1) of length m·n as m n-bit word sequences (w0, w1, ..., w i ,…,w m-1 ), where w i (i∈0,1,…,m-1) is a row vector of an m×n matrix.

4. The data detection method of a quantum neural distinguisher based on block cipher according to claim 3 is characterized in that: The training of the quantum neural discriminator comprises: S31: Divide the preprocessed ciphertext pair into t sub-parts, and use the rotating gate RY(θ) to encode each sub-part into the initial quantum state S32: The initial quantum state Through the controlled quantum convolutional network system U cir The processed state is represented as Then add the unit matrix I and use auxiliary quantum control to realize residual connection to obtain the quantum state |ψ>; S33: Initial quantum state Through the quantum circuit to realize the unitary transformation and convolution, we can get the quantum state S34: The quantum state As input data, apply the quantum Boolean circuit U b , realize the nonlinear rectification function and obtain the quantum state S35: Quantum state As input data, perform the convolution steps similar to S34, perform the second convolution, and obtain the quantum state S36: Measure the quantum state |ψ> and obtain the classical output y of the residual convolution i ; S37: Repeat steps S32 to S36, perform residual convolution on each sub-part, and then measure the total output y = {y1, y2, ..., y t }; S38: Use quantum circuits to replace the classical fully connected layers, integrate and abstract the convolution results, and obtain the quantum state |Q′>; S39: Measure the quantum state |Q′> and obtain the output value s={s1,s2,…,s v }; S310: Finally, the output value s is input into the Sigmoid activation function to obtain the predicted value, and a mean square error loss function is constructed based on the predicted value and the true label. The parameters of the quantum neural discriminator are tuned based on the constructed mean square error loss function to obtain a trained quantum neural discriminator.

5. The data detection method of a quantum neural distinguisher based on block cipher according to claim 4 is characterized in that: The step S31 comprises: S311: Divide the preprocessed ciphertext pair into d sub-parts, each sub-part z d The size of is 3×3, and its classical value is x={x1,x2,…,x i ,…,x9}; S312: Initialize 9 quantum bits, and the initial states of the 9 quantum bits are all |0>; S313: Use the revolving door RY(θ) to resize each sub-part z d The classical value of x is encoded. i As the rotation angle corresponding to each value, the initial quantum state is obtained in, represents the initial quantum state, Represents a tensor product operation.

6. The data detection method of a quantum neural distinguisher based on block cipher according to claim 4 is characterized in that: The step S32 comprises: S321: Set auxiliary qubit |0>, quantum state becomes |q>: S322: Apply a Hadamard gate to the auxiliary quantum bit, and the quantum state |q> evolves to |q1>: S323: Through auxiliary quantum bit control, in the initial quantum state The quantum convolutional network system U cir and the unit matrix I, we get the quantum state |q2>: S324: Apply a Hadamard gate to the auxiliary quantum bit of the quantum state |q2> again to obtain the quantum state |ψ>: Among them, U cir Represents a controlled quantum convolutional network system.

7. The data detection method of a quantum neural distinguisher based on block cipher according to claim 3 is characterized in that: The step S33 comprises: S331: Initial quantum state Each quantum bit of the quantum state is subjected to a rotation gate RX(θ). Evolves into |u>: S332: Apply CNOT gates between adjacent qubits in quantum state |u> to entangle the qubits and obtain the quantum state Among them, θ i represents the rotation angle of the i-th quantum bit, CNOT i,i+1 The controlled NOT gate indicates that the i-th quantum bit is the control bit and the i+1-th quantum bit is the controlled bit. Represents a tensor product operation.

8. The data detection method of a quantum neural distinguisher based on block cipher according to claim 4 is characterized in that: The step S35 comprises: S351: As input data, perform the second convolution and get S352: Applied Quantum Boolean Circuits U b , realize the nonlinear rectification function (ReLu): Among them, θ i ′ represents the rotation angle of the i-th quantum bit, CNOT i ' ,i+1 The controlled NOT gate indicates that the i-th quantum bit is the control bit and the i+1-th quantum bit is the controlled bit. Represents the tensor product operation; RX(θ′ i ) indicates a revolving door.

9. The data detection method of a quantum neural distinguisher based on block cipher according to claim 4 is characterized in that: The step S36 comprises: S361: Measure the auxiliary qubit in the quantum state |ψ>. When the auxiliary qubit is in the |0> state, the output result is: Among them, U cir represents a controlled quantum convolutional network system; I represents the identity matrix; S362: Yes Measure and obtain the classic data y after residual convolution i .

10. The data detection method of a quantum neural distinguisher based on block cipher according to claim 3 is characterized in that: The step S38 comprises: S381: The output of the convolution is amplitude-encoded and converted again into a quantum state of v qubits |Q>: S382: Transform through a quantum circuit to achieve post-processing and obtain higher-level features: Among them, CNOT i,i+1 The controlled NOT gate indicates that the i-th quantum bit is the control bit and the i+1-th quantum bit is the controlled bit. Represents the tensor product operation, R y (θ i ) represents a revolving door, θ i represents the rotation angle of the i-th quantum bit.

Citation Information

Patent Citations

  • Quantum discrimination line and model for progressive training

    CN114399053A

  • Nuclear valve abnormal state identification method based on quantum convolutional neural network

    CN115563464A

  • Block cipher differential analysis method and system based on quantum neural network, and storage medium

    CN117749350A

  • Integrated Sensing and Communications Empowered by Networked Hybrid Quantum-Classical Machine Learning

    US20230368065A1