General point addition quantum operation method in elliptic curve and related device
By determining the quantum states of points P and Q, a constant modulo subtraction arithmetic unit is constructed to calculate the slopes of points P and Q. Then, general point addition operations on elliptic curves are performed using quantum logic gates. This solves the problem of low key cracking efficiency in existing technologies and achieves efficient key decryption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
- Filing Date
- 2022-12-28
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies cannot efficiently perform general point addition operations on elliptic curves using quantum computing, resulting in low key cracking efficiency.
By determining the quantum states of points P and Q, a constant-modulus subtraction arithmetic unit is constructed to calculate the slope between points P and Q. Quantum logic gates are then used to perform the general point addition operation between points P and Q.
It enables efficient point addition operations of elliptic curves through quantum circuits, thereby improving the efficiency of key cracking.
Smart Images

Figure CN118313478B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of quantum computing technology, specifically a general point-addition quantum operation method and related apparatus in elliptic curves. Background Technology
[0002] Elliptic curves are a special type of algebraic curve where all rational points can form an additive group, and the addition operation exhibits the properties of geometric addition. Consider two points P(x1, y1) and Q(x2, y2) on an elliptic curve. If P ≠ ±Q and P and Q are not points at infinity O, then a straight line connecting P and Q will intersect the elliptic curve at a third point G. A line perpendicular to the x-axis is then drawn through G, passing through another point R on the elliptic curve (usually a point symmetric about the x-axis). Point R is defined as the result of P + Q, i.e., P + Q = R. This operation is called the general point addition operation on elliptic curves.
[0003] The general point addition operation based on elliptic curves is one of the core principles of elliptic curve cryptography (ECC). Its security is mainly based on the elliptic curve discrete logarithm problem: given two points P and Q on an elliptic curve, and satisfying [d]P=Q, solve for the discrete logarithm d.
[0004] A quantum computer is a physical device that performs high-speed mathematical and logical operations, stores and processes quantum information according to the laws of quantum mechanics. When a device processes and computes quantum information and runs quantum algorithms, it is a quantum computer. Quantum computers have become a key technology under research because of their ability to process mathematical problems more efficiently than ordinary computers—for example, accelerating the key-breaking time from hundreds of years to hours. Therefore, implementing general point addition operations on elliptic curves using quantum computing is a crucial step in accelerating key-breaking. Summary of the Invention
[0005] The purpose of this invention is to provide a general point addition quantum operation method and related apparatus in elliptic curves, which aims to realize general point addition operations in elliptic curves through quantum circuits, thereby facilitating the decryption of encrypted text using the efficient processing power of quantum computing.
[0006] One embodiment of the present invention provides a general point-addition quantum operation method in elliptic curves, the method comprising:
[0007] Determine the quantum state corresponding to point P, and construct a constant modulus arithmetic unit based on point Q, wherein point P and point Q are any two points in an elliptic curve that do not coincide and are not symmetric about the x-axis, except for the point at infinity.
[0008] The slope of the straight line determined by point P and point Q is determined based on the quantum state corresponding to point P and the constant modulo subtraction arithmetic operator.
[0009] The general point addition operation result of point P and point Q is determined based on the slope.
[0010] Optionally, the quantum states corresponding to the point P(x1, y1) are |x1> and |y1>, which are stored by the first quantum register and the second quantum register, respectively.
[0011] Optionally, the coordinates of point Q are (x2, y2), and the construction of a constant modulo subtraction operator based on point Q includes:
[0012] Construct a first constant modulo subtraction operator with constant x2 and modulus p, and a second constant modulo subtraction operator with constant y2 and modulus p.
[0013] Optionally, determining the slope of the straight line determined by point P and point Q based on the quantum state corresponding to point P and the constant modulo subtraction operator includes:
[0014] Applying the first constant modulo subtraction operator to the first quantum register and applying the second constant modulo subtraction operator to the second quantum register yields a first quantum register with a quantum state of |(x1-x2)mod p> and a second quantum register with a quantum state of |(y1-y2)mod p>.
[0015] Performing the inverse modular multiplication operation on the first quantum register yields the quantum state |(x1-x2). -1 The first quantum register of mod p>;
[0016] Perform a modular multiplication operation on the first quantum register, the second quantum register, and the auxiliary quantum register with quantum state |0> to obtain the quantum state. The auxiliary quantum register, the The slope λ of the straight line defined by points P and Q.
[0017] Optionally, P+Q=R, and determining the general point addition result of point P and point Q based on the slope, includes:
[0018] Based on the slope, the quantum state of the first quantum register is evolved into a quantum state including the coordinates of the point R, and based on the slope, the quantum state of the second quantum register is evolved into a quantum state including the coordinates of the point R;
[0019] The result of a general point addition operation between point P and point Q is determined based on the first quantum register and the second quantum register, which include the quantum state of the point R coordinates.
[0020] Optionally, the coordinates of point R are (x3, y3), and the evolution of the quantum state of the first quantum register into a quantum state including the coordinates of point R based on the slope includes:
[0021] Perform the inverse modular multiplication operation on the first quantum register to obtain the first quantum register with the quantum state |(x1-x2)mod p>;
[0022] The quantum state |(y1-y2)mod p> of the second quantum register is reset to |0>, and a squared modulo operation is performed on the auxiliary quantum register and the second quantum register to obtain the quantum state |λ. 2 The second quantum register mod p>;
[0023] Performing a modulo subtraction operation on the first quantum register and the second quantum register yields the quantum state |(x1-x2-λ) 2 The first quantum register mod p>;
[0024] Perform a constant modulo addition operation with a constant value of 3x2 on the first quantum register to obtain the first quantum register with the quantum state |-(x3-x2)modp>.
[0025] Optionally, resetting the quantum state |(y1-y2)mod p> of the second quantum register to |0> includes:
[0026] Perform inverse variable modular multiplication on the auxiliary quantum register, the first quantum register, and the second quantum register to obtain the second quantum register with quantum state |0>.
[0027] Optionally, the step of evolving the quantum state of the second quantum register into a quantum state including the coordinates of the point R based on the slope includes:
[0028] The quantum state |λ of the second quantum register 2 The mod p> is reset to |0>, and a variable modular multiplication operation is performed on the auxiliary quantum register, the first quantum register and the second quantum register to obtain the second quantum register with the quantum state |(y2+y3)mod p>.
[0029] Optionally, the quantum state |λ of the second quantum register 2 mod p> is reset to |0>, including:
[0030] Perform an inverse variable square modulus operation on the second quantum register and the auxiliary quantum register to obtain a second quantum register with the quantum state |0>.
[0031] Optionally, determining the result of a general point addition operation between point P and point Q based on the first quantum register and the second quantum register, which include the quantum state of point R, includes:
[0032] Performing the inverse modulo addition operation on the first quantum register yields a first quantum register with the quantum state |(x3-x2)mod p>.
[0033] Perform a constant modulo addition operation with a constant value of x3 on the first quantum register, and a constant modulo subtraction operation with a constant value of y2 on the second quantum register to obtain a first quantum register with a quantum state of |x3mod p> and a second quantum register with a quantum state of |3mod p>.
[0034] The general point addition operation result of point P and point Q is determined based on |3mod p> and |3mod p>.
[0035] Optionally, the method further includes:
[0036] The quantum state |λmod p> of the auxiliary quantum register is reset to |0>.
[0037] Optionally, resetting the quantum state |λmod p> of the auxiliary quantum register to |0> includes:
[0038] Performing the inverse modular multiplication operation on the first quantum register yields the quantum state |(x3-x2). -1 The first quantum register of mod p>;
[0039] Perform inverse variable modular multiplication on the first quantum register, the second quantum register, and the auxiliary quantum register to obtain the auxiliary quantum register with quantum state |0>;
[0040] Perform the inverse modular multiplication operation on the first quantum register to obtain the first quantum register with the quantum state |(x3-x2)mod p>.
[0041] Another embodiment of the present invention provides a general point-addition quantum computing device in elliptic curves, the device including a processing unit for:
[0042] Determine the quantum state corresponding to point P, and construct a constant modulo subtraction arithmetic unit based on point Q, wherein point P and point Q are any two points in an elliptic curve that do not coincide and are not symmetric about the x-axis except for the point at infinity;
[0043] The slope of the straight line determined by point P and point Q is determined based on the quantum state corresponding to point P and the constant modulo subtraction arithmetic operator.
[0044] The general point addition operation result of point P and point Q is determined based on the slope.
[0045] Optionally, the quantum states corresponding to the point P(x1, y1) are |x1> and |y1>, and |x1> and |y1> are stored by the first quantum register and the second quantum register, respectively.
[0046] Optionally, the coordinates of point Q are (x2, y2), and in the aspect of constructing a constant modulo subtraction arithmetic unit based on point Q, the processing unit is specifically used for:
[0047] Construct a first constant modulo subtraction operator with constant x2 and modulus p, and a second constant modulo subtraction operator with constant y2 and modulus p.
[0048] Optionally, in determining the slope of the straight line determined by point P and point Q based on the quantum state corresponding to point P and the constant modulo subtraction operator, the processing unit is specifically used for:
[0049] Applying the first constant modulo subtraction operator to the first quantum register and applying the second constant modulo subtraction operator to the second quantum register yields a first quantum register with a quantum state of |(x1-x2)mod p> and a second quantum register with a quantum state of |(y1-y2)mod p>.
[0050] Performing the inverse modular multiplication operation on the first quantum register yields the quantum state |(x1-x2). -1 The first quantum register of mod p>;
[0051] Perform a modular multiplication operation on the first quantum register, the second quantum register, and the auxiliary quantum register with quantum state |0> to obtain the quantum state. The auxiliary quantum register, the The slope λ of the straight line defined by points P and Q.
[0052] Optionally, regarding the determination of the general point addition result of point P and point Q based on the slope, the processing unit is specifically used for:
[0053] Based on the slope, the quantum state of the first quantum register is evolved into a quantum state including the coordinates of the point R, and based on the slope, the quantum state of the second quantum register is evolved into a quantum state including the coordinates of the point R;
[0054] The result of a general point addition operation between point P and point Q is determined based on the first quantum register and the second quantum register, which include the quantum state of the point R coordinates.
[0055] Optionally, the coordinates of point R are (x3, y3), and in terms of evolving the quantum state of the first quantum register into a quantum state including the coordinates of point R based on the slope, the processing unit is specifically used for:
[0056] Perform the inverse modular multiplication operation on the first quantum register to obtain the first quantum register with the quantum state |(x1-x2)mod p>;
[0057] The quantum state |(y1-y2)mod p〉 of the second quantum register is reset to |0>, and a square modulo operation is performed on the auxiliary quantum register and the second quantum register to obtain the quantum state |λ. 2 The second quantum register mod p>;
[0058] Performing a modulo subtraction operation on the first quantum register and the second quantum register yields the quantum state |(x1-x2-λ) 2 The first quantum register of )mod p>;
[0059] Perform a constant modulo addition operation with a constant value of 3x2 on the first quantum register to obtain the first quantum register with the quantum state |-(x3-x2)modp>.
[0060] Optionally, in resetting the quantum state |(y1-y2)mod p> of the second quantum register to |0>, the processing unit is specifically used for:
[0061] Perform inverse variable modular multiplication on the auxiliary quantum register, the first quantum register, and the second quantum register to obtain the second quantum register with quantum state |0>.
[0062] Optionally, in terms of evolving the quantum state of the second quantum register into a quantum state including the coordinates of the point R based on the slope, the processing unit is specifically configured to:
[0063] The quantum state |λ of the second quantum register 2 >Reset to |0>, and perform a variable modular multiplication operation on the auxiliary quantum register, the first quantum register and the second quantum register to obtain the second quantum register with the quantum state |(y2+3)mod p>.
[0064] Optionally, in the process of setting the quantum state |λ of the second quantum register 2 Regarding the aspect of resetting mod p> to |0>, the processing unit is specifically used for:
[0065] Perform an inverse variable square modulus operation on the second quantum register and the auxiliary quantum register to obtain a second quantum register with the quantum state |0>.
[0066] Optionally, in determining the general point addition result of point P and point Q based on the first quantum register and the second quantum register including the quantum state of point R, the processing unit is specifically used for:
[0067] Performing the inverse modulo addition operation on the first quantum register yields a first quantum register with the quantum state |(x3-x2)mod p>.
[0068] Perform a constant modulo addition operation with a constant value of x2 on the first quantum register, and a constant modulo subtraction operation with a constant value of y2 on the second quantum register to obtain a first quantum register with a quantum state of |x3 mod p> and a second quantum register with a quantum state of |y3 mod p>.
[0069] The general point addition operation result of point P and point Q is determined based on |x3mod p> and |y3mod p>.
[0070] Optionally, the processing unit is further configured to:
[0071] The quantum state |λmod p> of the auxiliary quantum register is reset to |0>.
[0072] Optionally, in resetting the quantum state |λmod p> of the auxiliary quantum register to |0>, the processing unit is configured to:
[0073] Performing the inverse modular multiplication operation on the first quantum register yields the quantum state |(x3-x2). -1 The first quantum register of mod p>;
[0074] Perform inverse variable modular multiplication on the first quantum register, the second quantum register, and the auxiliary quantum register to obtain the auxiliary quantum register with quantum state |0>;
[0075] Perform the inverse modular multiplication operation on the first quantum register to obtain the first quantum register with the quantum state |(x3-x2)mod p>.
[0076] Another embodiment of the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.
[0077] Another embodiment of the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method described in any of the preceding claims.
[0078] Compared with existing technologies, this invention provides a general point-addition quantum operation method and related apparatus in elliptic curves. This method determines the quantum state corresponding to point P and constructs a constant-modulus subtraction arithmetic unit based on point Q, where points P and Q are any two points in the elliptic curve that do not coincide and are not symmetric about the x-axis, except for the point at infinity. Based on the quantum state corresponding to point P and the constant-modulus subtraction arithmetic unit, the slope of the straight line determined by points P and Q is determined. Based on the slope, the result of the general point-addition operation of points P and Q is determined. This realizes the general point-addition operation in elliptic curves through quantum circuitry, which is beneficial for subsequent encryption and decryption using the efficient processing capabilities of quantum computing. Attached Figure Description
[0079] Figure 1 A hardware structure block diagram of a computer terminal for a general point addition quantum operation method in an elliptic curve provided in an embodiment of the present invention;
[0080] Figure 2 A flowchart illustrating a general point-to-quantum operation method for elliptic curves provided in an embodiment of the present invention;
[0081] Figure 3 A schematic diagram of a quantum circuit for general point addition operations in an elliptic curve is provided as an embodiment of the present invention.
[0082] Figure 4 This is a schematic flowchart of a general point-plus-quantum computing device for elliptic curves provided in an embodiment of the present invention. Detailed Implementation
[0083] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0084] The present invention first provides a general point-plus quantum operation method in elliptic curves. This method can be applied to electronic devices, such as computer terminals, specifically ordinary computers, quantum computers, etc.
[0085] The following detailed explanation uses a computer terminal as an example. Figure 1 This is a hardware structure block diagram of a computer terminal for a general point-plus-quantum computation method in elliptic curves, provided as an embodiment of the present invention. Figure 1 As shown, a computer terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing general point addition quantum computation methods in elliptic curves are also shown. Optionally, the computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0086] The memory 104 can be used to store software programs and modules for application software, such as the program instructions / modules corresponding to the general point-plus-quantum operation method in the elliptic curve in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0087] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0088] It's important to note that a true quantum computer has a hybrid structure, comprising two main parts: a classical computer responsible for performing classical computations and control, and a quantum device responsible for running quantum programs to achieve quantum computation. A quantum program is a sequence of instructions written in a quantum language such as QRunes that can run on a quantum computer, supporting operations on quantum logic gates and ultimately enabling quantum computing. Specifically, a quantum program is a sequence of instructions that operates on quantum logic gates according to a specific timing order.
[0089] In practical applications, due to limitations in the development of quantum device hardware, quantum computing simulations are often required to verify quantum algorithms, quantum applications, and so on. Quantum computing simulation is the process of simulating the execution of a quantum program corresponding to a specific problem using a virtual architecture (i.e., a quantum virtual machine) built with the resources of a regular computer. Typically, it is necessary to construct a quantum program corresponding to a specific problem. The quantum program referred to in this embodiment of the invention is a program written in a classical language that represents qubits and their evolution, wherein qubits, quantum logic gates, etc., related to quantum computing all have corresponding classical code representations.
[0090] Quantum circuits, also known as quantum logic circuits, are a manifestation of quantum programming and are the most commonly used general-purpose quantum computing model. They represent circuits that operate on qubits under an abstract concept. They consist of qubits, circuits (timelines), and various quantum logic gates. Finally, the results are often read out through quantum measurement operations.
[0091] Unlike traditional circuits that use metal wires to transmit voltage or current signals, in quantum circuits, the circuits can be seen as being connected by time. That is, the state of a quantum bit evolves naturally over time, following the instructions of the Hamiltonian operator until it encounters a logic gate and is operated on.
[0092] A quantum program corresponds to a single quantum circuit. The quantum program described in this invention refers to this single quantum circuit, where the total number of qubits in the single quantum circuit is the same as the total number of qubits in the quantum program. This can be understood as follows: a quantum program can consist of a quantum circuit, measurement operations on the qubits within the quantum circuit, registers storing the measurement results, and control flow nodes (jump instructions). A single quantum circuit can contain dozens, hundreds, or even thousands of quantum logic gate operations. The execution of a quantum program is the process of executing all the quantum logic gates in a specific timing order. It should be noted that the timing order refers to the chronological sequence in which individual quantum logic gates are executed.
[0093] It should also be noted that this invention relates to quantum computers. In conventional silicon-based computing devices, the processing chip units are CMOS transistors. These computing units are not limited by time or coherence; that is, they are available at any time without time constraints. Furthermore, currently, the number of such computing units in silicon chips is sufficient; that is, the number of computing units in a single chip is currently in the tens of thousands. The sufficient number of computing units and the fixed selectable computing logic of CMOS transistors, such as AND logic, allow for computational efficiency through a combination of numerous CMOS transistors and limited logic functions.
[0094] Unlike the logical units in ordinary computing devices, the basic computing unit in current quantum computers is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its usage time and is not always available. Making full use of qubits within their available usage time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is a crucial challenge. The number of qubits is also one of the representative indicators of a quantum computer's performance. Each qubit performs computational functions through on-demand configured logical functions. Given the limited number of qubits and the diverse logical functions in quantum computing, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), RX gates, RY gates, RZ gates, CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum logic gates are generally represented using unitary matrices. A unitary matrix is not only a matrix form but also a type of operation and transformation. In general, the action of a quantum logic gate on a quantum state is calculated by left-multiplying a unitary matrix by the matrix corresponding to the right vector of the quantum state. In quantum computing, a finite number of qubits combined with diverse logical functions achieves computational effects.
[0095] Based on these differences in quantum computers, the design of logical functions applied to qubits (including the design of whether qubits are used and the design of the efficiency of each qubit) is crucial to improving the computational performance of quantum computers and requires special design. The aforementioned design of qubits is a technical problem that ordinary computing devices do not need to consider or face. Therefore, this invention proposes a method and related apparatus for implementing general point addition operations in elliptic curves in quantum computing. The aim is to realize general point addition operations in elliptic curves through quantum circuits, thereby facilitating the decryption of encrypted text using the efficient processing power of quantum computing.
[0096] Elliptic curve cryptography primarily utilizes elliptic curves over finite fields. This invention mainly considers elliptic curves E / F over prime number fields. P , where p is a characteristic of the finite field and is a prime number greater than 3. Therefore, all operations in this invention are modulo p. This invention considers general point addition operations: if P ≠ ±Q and P and Q are not points at infinity O, that is, points P and Q are any two points in the elliptic curve that do not coincide and are not symmetric about the x-axis except at infinity, then:
[0097] x3=(λ 2 -x1-x2)mod p, y3=(λ(x1-x3)-y1)mod p,
[0098] in, (x1, y1) are the coordinates of point P, (x2, y2) are the coordinates of point Q, (x3, y3) are the coordinates of point R, P+Q=R, and λ is the slope of the line determined by points P and Q.
[0099] Therefore, if λ can be determined, the x and y coordinates of point R can be expressed using λ, as well as the coordinates of points P and Q.
[0100] See Figure 2 , Figure 2 This is a flowchart illustrating a general point-addition quantum operation method for elliptic curves, provided as an embodiment of the present invention. The method includes the following steps:
[0101] Step 201: Determine the quantum state corresponding to point P, and construct a constant modulo subtraction arithmetic unit based on point Q, wherein point P and point Q are any two points in the elliptic curve that do not coincide and are not symmetric about the x-axis except for the point at infinity;
[0102] The quantum states corresponding to the point P(x1, y1) are |1> and |1>, and |1> and |1> are stored by the first quantum register and the second quantum register, respectively.
[0103] A collection of qubits is called a quantum register, and the first quantum register and the second quantum register each contain at least one qubit.
[0104] Optionally, the constant modulo subtraction operator constructed based on point Q includes:
[0105] Construct a first constant modulo subtraction operator with constant x2 and modulus p, and a second constant modulo subtraction operator with constant y2 and modulus p.
[0106] The constant modular subtraction operator can be constructed based on the inverse quantum circuit corresponding to the constant modular addition operator. That is, performing a transpose-conjugate operation on the quantum logic gates in the constant modular addition operator and then applying it to the qubits yields the quantum circuit corresponding to the constant modular subtraction operator. The constant modular subtraction operator is the quantum logic gates operating in sequence within this quantum circuit. The constant modular addition operator can be referenced in Chinese patent literature with application number '202211114261.7' and application title 'Constant Modular Adder, Method, and Related Apparatus Based on Quantum Fourier Transform'. Of course, other implementation methods are also possible and are not limited here.
[0107] Step 202: Determine the slope of the straight line determined by point P and point Q based on the quantum state corresponding to point P and the constant modulus subtraction operator;
[0108] Optionally, determining the slope of the straight line determined by point P and point Q based on the quantum state corresponding to point P and the constant modulo subtraction operator includes:
[0109] Applying the first constant modulo subtraction operator to the first quantum register and applying the second constant modulo subtraction operator to the second quantum register yields a first quantum register with a quantum state of |(x1-x2)mod p> and a second quantum register with a quantum state of |(y1-y2)mod p>.
[0110] Performing the inverse modular multiplication operation on the first quantum register yields the quantum state |(x1-x2). -1 The first quantum register of mod p>;
[0111] Perform a modular multiplication operation on the first quantum register, the second quantum register, and the auxiliary quantum register with quantum state |0> to obtain the quantum state. The auxiliary quantum register, the The slope λ of the straight line defined by points P and Q.
[0112] In this context, the constant-modulus subtraction operator is a series of quantum logic gates that act on the qubits in a certain order. Therefore, the first constant-modulus subtraction operator is applied to the first quantum register and the second constant-modulus subtraction operator is applied to the second quantum register. That is, the quantum logic gate corresponding to the first constant-modulus subtraction operator is applied to the qubits included in the first quantum register, and the quantum logic gate corresponding to the second constant-modulus subtraction operator is applied to the qubits included in the second quantum register, so that the quantum state of the qubits in the first and second quantum registers evolves.
[0113] Here, the quantum state of the first quantum register evolves from |1〉 to |(x1-x2)mod p〉, and the quantum state of the second quantum register evolves from |y1> to |(y1-y2)mod p>.
[0114] Specifically, the inverse modular multiplication operation is performed on the first quantum register. The inverse modular multiplication operation also applies its corresponding quantum logic gate to the qubits included in the first quantum register. The quantum state of the first quantum register evolves from |(x1-x2)modp> to |(x1-x2). -1 The quantum state of the second quantum register remains unchanged at |(y1-y2)mod p>. For a detailed implementation of the modular multiplication inverse operation, please refer to Chinese patent document application number “202211465261.1” entitled “Construction Method, Apparatus, Medium and Electronic Device of Modular Inverse Quantum Circuit”.
[0115] Specifically, a modular multiplication operation is performed on the first quantum register, the second quantum register, and the auxiliary quantum register with quantum state |0〉. That is, the quantum logic gate corresponding to the modular multiplication operation is applied to the qubits included in the first quantum register, the second quantum register, and the auxiliary quantum register. The quantum states of the first quantum register and the second quantum register remain unchanged, namely |(x1-x2) respectively. -1 The quantum states of the auxiliary quantum register evolve from |0> to |λ>, where |modp> and |(y1-y2)modp> are used. For a detailed implementation of the modular multiplication operation, please refer to Chinese patent application number “202211465294.6”, entitled “Modular Multiplication Operator, Operation Method and Related Devices”.
[0116] Step 203: Determine the general point addition operation result of point P and point Q based on the slope.
[0117] Optionally, determining the general point addition result of point P and point Q based on the slope includes:
[0118] Based on the slope, the quantum state of the first quantum register is evolved into a quantum state including the coordinates of the point R, and based on the slope, the quantum state of the second quantum register is evolved into a quantum state including the coordinates of the point R;
[0119] The result of a general point addition operation between point P and point Q is determined based on the first quantum register and the second quantum register, which include the quantum state of the point R coordinates.
[0120] Specifically, the process of evolving the quantum state of the first quantum register into a quantum state including the coordinates of the point R based on the slope includes:
[0121] Perform the inverse modular multiplication operation on the first quantum register to obtain the first quantum register with the quantum state |(x1-x2)mod p>;
[0122] The quantum state |(y1-y2)modp> of the second quantum register is reset to |0>, and a square modulo operation is performed on the auxiliary quantum register and the second quantum register to obtain the quantum state |λ. 2 The second quantum register mod p>;
[0123] Performing a modulo subtraction operation on the first quantum register and the second quantum register yields the quantum state |(x1-x2-λ) 2 The first quantum register mod p>;
[0124] Perform a constant modulo addition operation with a constant value of 3x2 on the first quantum register to obtain the first quantum register with the quantum state |-(x3-x2)modp>.
[0125] Further, resetting the quantum state |(y1-y2)modp> to |0> of the second quantum register includes:
[0126] Perform inverse variable modular multiplication on the auxiliary quantum register, the first quantum register, and the second quantum register to obtain the second quantum register with quantum state |0>.
[0127] In this context, the quantum logic gate corresponding to the modular multiplication operation of the inverse variable is transposed and conjugate with the quantum logic gate corresponding to the modular multiplication operation of the variable. The inverse variable modular multiplication operation is performed on the auxiliary quantum register, the first quantum register, and the second quantum register, i.e., the quantum logic gate corresponding to the inverse variable modular multiplication operation is applied to the qubits included in the auxiliary quantum register, the first quantum register, and the second quantum register. The quantum states of the first quantum register and the auxiliary quantum register remain unchanged, being |(x1-x2)modp> and |λ> respectively, while the quantum state of the second quantum register evolves from |(y1-y2)modp> to |0>.
[0128] Of course, resetting the quantum state |(y1-y2)modp> to |0> of the second quantum register can be implemented in other ways. Here, the modular multiplication operation of the inverse variable is only a preferred implementation provided by the embodiment of this application. When implemented in other ways, this step can be performed on the first quantum register and the second quantum register to obtain the quantum state |(x1-x2-λ)modp>. 2 Before the first quantum register (x1-x2-λ), a variable modulo subtraction operation can also be performed on the first and second quantum registers to obtain the quantum state |(x1-x2-λ). 2 After the first quantum register of )mod p>.
[0129] Specifically, performing a squared modulo operation on the auxiliary quantum register and the second quantum register yields a quantum state of |λ. 2 The second quantum register, where mod p>, is the quantum logic gate corresponding to the square modulo operation of the variable applied to the auxiliary qubit and the qubits included in the second quantum register. The quantum state of the auxiliary quantum register is |λmod p>, which remains unchanged, while the quantum state of the second quantum register evolves from |0> to |λ 2 The specific implementation of the variable square modulo operation can be found in Chinese patent document application number "202211464665.9" entitled "Variable Square Modulo Calculator, Calculation Method and Related Device".
[0130] Specifically, performing the inverse modular multiplication operation on the first quantum register yields a first quantum register with the quantum state |(x1-x2)mod p>. This means applying the inverse modular multiplication operation to the quantum logic gates of the first quantum register, and the quantum state of the first quantum register is determined by |(x1-x2)mod p>. -1 The modular multiplication inverse operation evolves from |(x1-x2)mod p>. For a detailed implementation of the modular multiplication inverse operation, please refer to the Chinese patent document with application number "202211465261.1" entitled "Construction Method, Apparatus, Medium and Electronic Device of Modular Inverse Quantum Circuit".
[0131] Specifically, performing a modulo subtraction operation on the first quantum register and the second quantum register yields the quantum state |(x1-x2-λ). 2 The first quantum register is defined as follows: the quantum logic gate corresponding to the modulo-subtraction operation is applied to the qubits included in the first and second quantum registers. The quantum state of the second quantum register is |λ. 2 Since |(x1-x2)mod p> remains unchanged, the quantum state of the first quantum register evolves from |(x1-x2)mod p> to |(x1-x2-λ). 2 The quantum logic gate corresponding to the variable modulo subtraction operation is transposed and conjugate with the quantum logic gate corresponding to the variable modulo addition operation. For the specific implementation of the variable modulo addition operation, please refer to the Chinese patent document with application number "202211465284.2" entitled "Variable Modulo Addition Operator, Operation Method and Related Device Based on Constant Addition and Subtraction".
[0132] Specifically, a constant modulo addition operation of 3x2 is performed on the first quantum register to obtain a first quantum register with the quantum state |-(x3-x2)mod p>. This means that the quantum logic gate corresponding to the constant modulo addition operation is applied to the qubits included in the first quantum register, and the quantum state of the first quantum register is determined by |(x1-x2-λ). 2 The constant modulo addition operation evolves to |-(x3-x2)modp>. For a detailed implementation of the constant modulo addition operation, please refer to Chinese patent document application number “202211114261.7” entitled “Constant Modulo Addition Operator, Method and Related Device Based on Quantum Fourier Transform”.
[0133] Specifically, the process of evolving the quantum state of the second quantum register into a quantum state including the coordinates of the point R based on the slope includes:
[0134] The quantum state |λ of the second quantum register 2The mod p> is reset to |0>, and a variable modular multiplication operation is performed on the auxiliary quantum register, the first quantum register and the second quantum register to obtain the second quantum register with the quantum state |(y2+3)mod p>.
[0135] Furthermore, the quantum state |λ of the second quantum register 2 mod p> is reset to |0>, including:
[0136] Perform an inverse variable square modulus operation on the second quantum register and the auxiliary quantum register to obtain a second quantum register with the quantum state |0>.
[0137] Specifically, an inverse variable square modulo operation is performed on the second quantum register and the auxiliary quantum register to obtain a second quantum register with the quantum state |0>. This involves applying the quantum logic gate corresponding to the inverse variable square modulo operation to the qubits included in the second quantum register and the auxiliary quantum register. The quantum state of the auxiliary register is |λmod p>, which remains unchanged, while the quantum state of the second quantum register is determined by |λ... 2 The mod p> evolves to |0>. The quantum logic gate corresponding to the inverse variable square modulus operation is transposed and conjugate with the quantum logic gate corresponding to the variable square modulus operation. For a specific implementation of the variable square modulus operation, please refer to Chinese patent document with application number "202211464665.9" entitled "Variable Square Modulus Operator, Operation Method and Related Device".
[0138] Specifically, a modular multiplication operation is performed on the auxiliary quantum register, the first quantum register, and the second quantum register to obtain the second quantum register with the quantum state |(y2+y3)mod p>. That is, the quantum logic gate corresponding to the modular multiplication operation is applied to the qubits included in the auxiliary quantum register and the first quantum register. The quantum states of the auxiliary quantum register and the first quantum register remain unchanged, namely |λmod p> and |-(x3-x2)mod p>, respectively. The quantum state of the second quantum register evolves from |0> to |(y2+y3)mod p>. For a detailed implementation of the modular multiplication operation, please refer to Chinese patent document application number "202211465294.6", entitled "Modular Multiplication Operator, Operation Method, and Related Device".
[0139] Specifically, determining the result of the general point addition operation between point P and point Q based on the first quantum register and the second quantum register, which include the quantum state of point R, includes:
[0140] Performing the inverse modulo addition operation on the first quantum register yields a first quantum register with the quantum state |(x3-x2)mod p>.
[0141] Perform a constant modulo addition operation with a constant of x3 on the first quantum register, and a constant modulo subtraction operation with a constant of y2 on the second quantum register to obtain a first quantum register with quantum state |x3mod p> and a second quantum register with quantum state |y3mod p>.
[0142] The general point addition operation result of point P and point Q is determined based on |x3mod p> and |y3mod p>.
[0143] Specifically, performing the inverse modular addition operation on the first quantum register yields a first quantum register with the quantum state |(x³-x²)mod p>. This means that the quantum logic gate corresponding to the inverse modular addition operation is applied to the qubits included in the first quantum register, and the quantum state of the first quantum register evolves from |-(x³-x²)mod p> to |(x³-x²)mod p>. For a detailed implementation of the inverse modular addition operation, please refer to Chinese patent document application number "202211465261.1", entitled "Construction Method, Apparatus, Medium, and Electronic Device of Inverse Modular Quantum Circuit".
[0144] In addition, for any number x, finding -x mod p is equivalent to calculating (p-1)·x mod p, thus the inverse operation of modular addition can also be implemented through a constant modular multiplication operation with a constant of (p-1). For a detailed implementation of the constant modular multiplication operation, please refer to Chinese patent document application number "202211125591.6", entitled "Constant Modular Addition and Modular Multiplication Operator, Modular Multiplication Operator, Operation Method and Related Device".
[0145] Specifically, a constant modulo addition operation with a constant value of x2 is performed on the first quantum register, and a constant modulo subtraction operation with a constant value of y2 is performed on the second quantum register to obtain a first quantum register with a quantum state of |x3mod p> and a second quantum register with a quantum state of |y3mod p>. That is, the quantum logic gate corresponding to the constant modulo addition operation is applied to the qubits included in the first quantum register, and the quantum state of the first quantum register evolves from |(x3-x2)mod p> to |x3mod p>; the quantum logic gate corresponding to the constant modulo subtraction operation is applied to the qubits included in the second quantum register, and the quantum state of the second quantum register evolves from |(y2+y3)mod p> to |y3mod p>.
[0146] Specifically, the general point addition operation result of point P and point Q is determined based on |x3mod p> and |y3mod p>, that is, (x3, y3) is used as the general point addition operation result of point P and point Q.
[0147] Furthermore, to conserve qubit resources, the auxiliary quantum register can be reset, allowing the qubits included in the auxiliary quantum register to be used for other data computation or storage. The method further includes:
[0148] The quantum state |λmod p> of the auxiliary quantum register is reset to |0>.
[0149] The step of resetting the quantum state |λmod p> to |0> of the auxiliary quantum register can be done before or after the step of performing the inverse modulo addition operation on the first quantum register to obtain the first quantum register with the quantum state |(x3-x2)mod p>. No limitation is made here.
[0150] In a specific implementation of the present invention, after performing the inverse modulo addition operation on the first quantum register to obtain a first quantum register with the quantum state |(x3-x2)mod p>, the step of resetting the quantum state |λmod p> of the auxiliary quantum register to |0> includes:
[0151] Performing the inverse modular multiplication operation on the first quantum register yields the quantum state |(x3-x2). -1 The first quantum register of mod p>;
[0152] Perform inverse variable modular multiplication on the first quantum register, the second quantum register, and the auxiliary quantum register to obtain the auxiliary quantum register with quantum state |0>;
[0153] Perform the inverse modular multiplication operation on the first quantum register to obtain the first quantum register with the quantum state |(x3-x2)mod p>.
[0154] Specifically, performing the inverse modular multiplication operation on the first quantum register yields the quantum state |(x3-x2). -1 The first quantum register, mod p>, is the quantum logic gate corresponding to the inverse modular multiplication operation, applied to the qubits included in the first quantum register. The quantum state of the first quantum register evolves from |(x3-x2)mod p> to |(x3-x2). -1 mod p>.
[0155] Specifically, an inverse variable modular multiplication operation is performed on the first quantum register, the second quantum register, and the auxiliary quantum register to obtain the auxiliary quantum register with the quantum state |0>. That is, the quantum logic gate corresponding to the inverse variable modular multiplication operation is applied to the qubits included in the first quantum register, the second quantum register, and the auxiliary quantum register. The quantum states corresponding to the first quantum register and the second quantum register remain unchanged, which are |(x3-x2) respectively. -1The auxiliary quantum register evolves from |λmod p> to |0>, where |λmod p> and |(y2+y3)mod p> are used. The quantum logic gate corresponding to the modular multiplication operation of the inverse variable is transposed and conjugate with the quantum logic gate corresponding to the modular multiplication operation of the variable.
[0156] Specifically, performing the inverse modular multiplication operation on the first quantum register yields a first quantum register with the quantum state |(x3-x2)mod p>. This means that the quantum logic gate corresponding to the inverse modular multiplication operation is applied to the qubits included in the first quantum register, and the quantum state of the first quantum register is determined by |(x3-x2)mod p>. -1 mod p> evolves to |(x3-x2)mod p>.
[0157] like Figure 3 As shown, Figure 3 This is a schematic diagram of a quantum circuit for general point addition operations in an elliptic curve, provided by an embodiment of the present invention. |x1> and |y1> are stored by a first quantum register and a second quantum register, respectively, and the initial quantum state of the auxiliary quantum register is |0>. The first quantum register, the second quantum register, and the auxiliary quantum register each include n qubits. In the figure, -x2 and -y2 are the first constant modular subtraction operator and the second constant modular subtraction operator, respectively; Inv is the inverse operation of modular multiplication or modular addition; and Mul is the variable modular multiplication operation. Sqr is the modular multiplication operation of the inverse variable, and Sqr is the modular square operation of the variable. This represents a modulo-subtraction operation (i.e., an inverse modulo-addition operation), while +3x2 represents a modulo-addition operation on the constant. For the inverse variable square modulo operation, Neg is the inverse modulo addition operation, +x2 is the constant modulo addition operation, and -y2 is the constant modulo subtraction operation.
[0158] Compared with existing technologies, this invention provides a general point-addition quantum operation method and related apparatus in elliptic curves. This method determines the quantum state corresponding to point P and constructs a constant-modulus subtraction arithmetic unit based on point Q, where points P and Q are any two points in the elliptic curve that do not coincide and are not symmetric about the x-axis, except for the point at infinity. Based on the quantum state corresponding to point P and the constant-modulus subtraction arithmetic unit, the slope of the straight line determined by points P and Q is determined. Based on the slope, the result of the general point-addition operation of points P and Q is determined. This realizes the general point-addition operation in elliptic curves through quantum circuitry, which is beneficial for subsequent encryption and decryption using the efficient processing capabilities of quantum computing.
[0159] See Figure 4 , Figure 4 This is a flowchart illustrating a general point-addition quantum computing device for elliptic curves according to an embodiment of the present invention. The device includes a processing unit 401, used for:
[0160] Determine the quantum state corresponding to point P, and construct a constant modulo subtraction arithmetic unit based on point Q, wherein point P and point Q are any two points in an elliptic curve that do not coincide and are not symmetric about the x-axis except for the point at infinity;
[0161] The slope of the straight line determined by point P and point Q is determined based on the quantum state corresponding to point P and the constant modulo subtraction arithmetic operator.
[0162] The general point addition operation result of point P and point Q is determined based on the slope.
[0163] Optionally, the quantum states corresponding to the point P(x1, y1) are |1> and |1>, and |1> and |1> are stored by the first quantum register and the second quantum register, respectively.
[0164] Optionally, the coordinates of point Q are (x2, y2), and in the aspect of constructing a constant modulo subtraction arithmetic unit based on point Q, the processing unit 401 is specifically used for:
[0165] Construct a first constant modulo subtraction operator with constant x2 and modulus p, and a second constant modulo subtraction operator with constant y2 and modulus p.
[0166] Optionally, in determining the slope of the straight line determined by point P and point Q based on the quantum state corresponding to point P and the constant modulo subtraction operator, the processing unit 401 is specifically used for:
[0167] Applying the first constant modulo subtraction operator to the first quantum register and applying the second constant modulo subtraction operator to the second quantum register yields a first quantum register with a quantum state of |(x1-x2)mod p> and a second quantum register with a quantum state of |(y1-y2)mod p>.
[0168] Performing the inverse modular multiplication operation on the first quantum register yields the quantum state |(x1-x2). -1 The first quantum register of mod p>;
[0169] Perform a modular multiplication operation on the first quantum register, the second quantum register, and the auxiliary quantum register with quantum state |0> to obtain the quantum state. The auxiliary quantum register, the The slope λ of the straight line defined by points P and Q.
[0170] Optionally, regarding the determination of the general point addition result of point P and point Q based on the slope, the processing unit 401 is specifically used for:
[0171] Based on the slope, the quantum state of the first quantum register is evolved into a quantum state including the coordinates of the point R, and based on the slope, the quantum state of the second quantum register is evolved into a quantum state including the coordinates of the point R;
[0172] The result of a general point addition operation between point P and point Q is determined based on the first quantum register and the second quantum register, which include the quantum state of the point R coordinates.
[0173] Optionally, the coordinates of point R are (x3, y3). In terms of evolving the quantum state of the first quantum register into a quantum state including the coordinates of point R based on the slope, the processing unit 401 is specifically used for:
[0174] Perform the inverse modular multiplication operation on the first quantum register to obtain the first quantum register with the quantum state |(x1-x2)mod p>;
[0175] The quantum state |(y1-y2)mod p〉 of the second quantum register is reset to |0>, and a square modulo operation is performed on the auxiliary quantum register and the second quantum register to obtain the quantum state |λ. 2 The second quantum register mod p>;
[0176] Performing a modulo subtraction operation on the first quantum register and the second quantum register yields the quantum state |(x1-x2-λ) 2 The first quantum register of )mod p>;
[0177] Perform a constant modulo addition operation with a constant value of 3x2 on the first quantum register to obtain the first quantum register with the quantum state |-(x3-x2)modp>.
[0178] Optionally, in resetting the quantum state |(y1-y2)mod p> of the second quantum register to |0>, the processing unit 401 is specifically used for:
[0179] Perform inverse variable modular multiplication on the auxiliary quantum register, the first quantum register, and the second quantum register to obtain the second quantum register with quantum state |0>.
[0180] Optionally, in terms of evolving the quantum state of the second quantum register into a quantum state including the coordinates of the point R based on the slope, the processing unit 401 is specifically configured to:
[0181] The quantum state |λ of the second quantum register 2The mod p> is reset to |0>, and a variable modular multiplication operation is performed on the auxiliary quantum register, the first quantum register and the second quantum register to obtain the second quantum register with the quantum state |(y2+y3)mod p>.
[0182] Optionally, in the process of setting the quantum state |λ of the second quantum register 2 Regarding the aspect of resetting mod p> to |0>, the processing unit 401 is specifically used for:
[0183] Perform an inverse variable square modulus operation on the second quantum register and the auxiliary quantum register to obtain a second quantum register with the quantum state |0>.
[0184] Optionally, in determining the general point addition result of point P and point Q based on the first quantum register and the second quantum register including the quantum state of point R, the processing unit 401 is specifically used for:
[0185] Performing the inverse modulo addition operation on the first quantum register yields a first quantum register with the quantum state |(x3-x2)mod p>.
[0186] Perform a constant modulo addition operation with a constant value of x2 on the first quantum register, and a constant modulo subtraction operation with a constant value of y2 on the second quantum register to obtain a first quantum register with a quantum state of |x3mod p> and a second quantum register with a quantum state of |y3mod p>.
[0187] The general point addition operation result of point P and point Q is determined based on |x3mod p> and |y3mod p>.
[0188] Optionally, the processing unit 401 is further configured to:
[0189] The quantum state |λmod p> of the auxiliary quantum register is reset to |0>.
[0190] Optionally, in resetting the quantum state |λmod p> to |0> of the auxiliary quantum register, the processing unit 401 is configured to:
[0191] Performing the inverse modular multiplication operation on the first quantum register yields the quantum state |(x3-x2). -1 The first quantum register of mod p>;
[0192] Perform inverse variable modular multiplication on the first quantum register, the second quantum register, and the auxiliary quantum register to obtain the auxiliary quantum register with quantum state |0>;
[0193] Perform the inverse modular multiplication operation on the first quantum register to obtain the first quantum register with the quantum state |(x3-x2)mod p>.
[0194] The device may further include a communication unit 402 and a storage unit 403. The communication unit 402 may be a touch screen or a receiver, and the storage unit 403 may be a memory for storing the program code and data of the electronic device.
[0195] Another embodiment of the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the method embodiments above when running.
[0196] Specifically, in this embodiment, the storage medium can be configured to store a computer program for performing the following steps:
[0197] Determine the quantum state corresponding to point P, and construct a constant modulo subtraction arithmetic unit based on point Q, wherein point P and point Q are any two points in an elliptic curve that do not coincide and are not symmetric about the x-axis except for the point at infinity;
[0198] The slope of the straight line determined by point P and point Q is determined based on the quantum state corresponding to point P and the constant modulo subtraction arithmetic operator.
[0199] The general point addition operation result of point P and point Q is determined based on the slope.
[0200] Specifically, in this embodiment, the storage medium may include, but is not limited to, USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks, and other media capable of storing computer programs.
[0201] Another embodiment of the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the method embodiments described above.
[0202] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.
[0203] Specifically, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0204] Determine the quantum state corresponding to point P, and construct a constant modulo subtraction arithmetic unit based on point Q, wherein point P and point Q are any two points in an elliptic curve that do not coincide and are not symmetric about the x-axis except for the point at infinity;
[0205] The slope of the straight line determined by point P and point Q is determined based on the quantum state corresponding to point P and the constant modulo subtraction arithmetic operator.
[0206] The general point addition operation result of point P and point Q is determined based on the slope.
[0207] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.
Claims
1. A general point-addition quantum operation method for elliptic curves, characterized in that, The method includes: Determine point P The corresponding quantum state is and and based on point Q Construction constant is A first constant modulo subtraction operator with modulus p and a constant... A modulus-p second constant modulo subtraction arithmetic unit is configured, and the auxiliary quantum register is initialized to... Point P and point Q are any two points on the elliptic curve that do not coincide and are not symmetric about the x-axis, except for the point at infinity; wherein, the and The data is stored in the first quantum register and the second quantum register, respectively. Applying the first constant-modulus subtraction operator to the first quantum register and applying the second constant-modulus subtraction operator to the second quantum register yields the quantum state as follows: The first quantum register and quantum state are The second quantum register; performing the inverse modular multiplication operation on the first quantum register, the resulting quantum state is The first quantum register; for the first quantum register, the second quantum register, and the quantum state as Performing a modular multiplication operation on the auxiliary quantum register yields the quantum state as The auxiliary quantum register, the The slope of the straight line defined by points P and Q ; Performing the inverse modular multiplication operation on the first quantum register yields the quantum state as follows: The first quantum register; the quantum state of the second quantum register Reset to And perform a squared modulo operation on the auxiliary quantum register and the second quantum register to obtain the quantum state as The second quantum register; performing a modulo subtraction operation on the first and second quantum registers to obtain the quantum state is The first quantum register; with respect to the first quantum register, a constant is... The constant modulus addition operation yields the quantum state as The first quantum register; wherein, P+Q=R; the coordinates of R are ; The quantum state of the second quantum register Reset to And perform a modular multiplication operation on the auxiliary quantum register, the first quantum register, and the second quantum register to obtain the quantum state as The second quantum register; performing the inverse modular addition operation on the first quantum register, the resulting quantum state is The first quantum register; The first quantum register is constant. The constant modulo addition operation, and the constant operation on the second quantum register. The constant modulus reduction operation yields the quantum state as The first quantum register and quantum state are The second quantum register; Based on the above and Determine the result of a general point addition operation between point P and point Q.
2. The method as described in claim 1, characterized in that, The quantum state of the second quantum register Reset to ,include: Performing inverse variable modular multiplication on the auxiliary quantum register, the first quantum register, and the second quantum register yields the quantum state as follows: The second quantum register.
3. The method as described in claim 1, characterized in that, The quantum state of the second quantum register Reset to ,include: Performing an inverse square modulus operation on the second quantum register and the auxiliary quantum register yields the quantum state as follows: The second quantum register.
4. The method as described in claim 1, characterized in that, The method further includes: The quantum state of the auxiliary quantum register Reset to .
5. The method as described in claim 4, characterized in that, The quantum state of the auxiliary quantum register Reset to ,include: Performing the inverse modular multiplication operation on the first quantum register yields the quantum state as follows: The first quantum register; Performing inverse variable modular multiplication on the first quantum register, the second quantum register, and the auxiliary quantum register yields the quantum state as follows: Auxiliary quantum register; Performing the inverse modular multiplication operation on the first quantum register yields the quantum state as follows: The first quantum register.
6. A general point-addition quantum computing device for elliptic curves, characterized in that, The device includes a processing unit for: Determine point P The corresponding quantum state is and and based on point Q Construction constant is A first constant modulo subtraction operator with modulus p and a constant... A modulus-p second constant modulo subtraction arithmetic unit is configured, and the auxiliary quantum register is initialized to... Point P and point Q are any two points on the elliptic curve that do not coincide and are not symmetric about the x-axis, except for the point at infinity; wherein, the and The data is stored in the first quantum register and the second quantum register, respectively. Applying the first constant-modulus subtraction operator to the first quantum register and applying the second constant-modulus subtraction operator to the second quantum register yields the quantum state as follows: The first quantum register and quantum state are The second quantum register; performing the inverse modular multiplication operation on the first quantum register, the resulting quantum state is The first quantum register; for the first quantum register, the second quantum register, and the quantum state as Performing a modular multiplication operation on the auxiliary quantum register yields the quantum state as The auxiliary quantum register, the The slope of the straight line defined by points P and Q ; Performing the inverse modular multiplication operation on the first quantum register yields the quantum state as follows: The first quantum register; the quantum state of the second quantum register Reset to And perform a squared modulo operation on the auxiliary quantum register and the second quantum register to obtain the quantum state as The second quantum register; performing a modulo subtraction operation on the first and second quantum registers to obtain the quantum state is The first quantum register; with respect to the first quantum register, a constant is... The constant modulus addition operation yields the quantum state as The first quantum register; wherein, P+Q=R; the coordinates of R are ; The quantum state of the second quantum register Reset to And perform a modular multiplication operation on the auxiliary quantum register, the first quantum register, and the second quantum register to obtain the quantum state as The second quantum register; performing the inverse modular addition operation on the first quantum register, the resulting quantum state is The first quantum register; The first quantum register is constant. The constant modulo addition operation, and the constant operation on the second quantum register. The constant modulus reduction operation yields the quantum state as The first quantum register and quantum state are The second quantum register; Based on the above and Determine the result of a general point addition operation between point P and point Q.
7. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1-5 when it is run.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method described in any one of claims 1-5.