# Quantum cryptography: encryptions

I am studying quantum cryptography and I have a very basic question. Suppose A and B share a secret key k, where k=0 or 1. A wants to send one qubit to B. What A does is, if k=1, she 'flips' the qubit (i.e. applies the Pauli X matrix), otherwise she leaves the qubit as it is. She sends this to B. Now B, knowing the value of k, either flips it or leaves it as it is.

I am wondering why this protocol is insecure. How can an eavesdropper E cause problems?

-
I don't think they can – namehere Dec 3 '12 at 10:15
How is this different from a classical protocol in which the parties flip a classical bit depending on the value of $k$? What is the goal of the protocol? – Juan Miguel Arrazola Dec 3 '12 at 23:15

Suppose the qubit is in the $\sigma_x$ basis. In other words, its state is $$| \pm \rangle = \frac{1}{\sqrt{2}} \left(|0\rangle \pm |1\rangle\right).$$ Then we have $\sigma_x | + \rangle = | + \rangle$ and $\sigma_x | - \rangle = - | -\rangle$, so Eve could measure the qubit in the $\sigma_x$ basis and obtain its state without disturbing it. You could fix this by applying one of the three Pauli matrices or the identity matrix, each with probability $1/4$.
I think you mean $\sigma_x$ instead of $\sigma_z$? – Juan Miguel Arrazola Dec 3 '12 at 23:08