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?