Crack the cryptographic (SHA ) security code with the IBM 5-qubit computer
Security code MQ equations
In the document Solving binary MQ with Grover’s algorithm (B. Westerbaan ), an algorithm is given for cracking a security code. A system of m quadratic equitations with n variables in the so-called convenient form is given as a toy model for a code. We will crack the second part of the code this is the binary equation q0(1+q1) = 1 with q0= 0 and q1=0.
Implementation of the code on the quantum computer
The X gate flips from 1 to 0, it is a NOT (classical ) gate..
The NOT gate will give X|x>=|1+x> on the computational basis
We need a CNOT gate for the XOR function. We can make 1 + q1 with the CNOT and NOT gate, The next step is to uncompute the answer with a self-inverse circuit because it is no longer needed. After the Toffoligate we have q0(1+q1)
Attached is a 2 bit oracle with does the job. In the IBM user guide, a 2 bits Grover search algorithm is given. We can crack the code with Grover!