I was just watching the BBC show Sherlock, S3E3: His Last Vow and I got to the part where John and Sherlock are breaking into the penthouse office. The technique Sherlock employs to get into the office is corrupting a standard magnetic keycard and relying on the fact that it would not read as the wrong card. This question is twofold because I haven't found an answer to either part in my research.
First: Magnetic keycards function by lining up a bunch of tiny iron magnets, polarized to be pointing either one way or the other (I'll just call them up and down) in a strip. This strip then encodes a sequence of ups and downs that is unique to the keycard and can be read by a card reader. There is a widely disputed question as to whether or not these magnetic strips can be corrupted by being near external magnetic fields, such as a phone. Assuming they can be corrupted in this way, what is the mechanism of corruption? What does it actually mean for a magstrip to be "corrupted"?
Second: This question relies strongly on the answer to the first and is more tied in with the show I was watching. If a keycard is corrupted, would a keycard reader read the card as corrupted or just as the wrong card? If I were to assume the simplest mechanism I can think of for corrupting a keycard, which would have the external magnetic field flip random bits in the sequence, it would seem that there would be no noticeable difference between a corrupted and a non-corrupted keycard.
One way there might exist a difference is if all keycards for a specific reader possessed a very similar sequence that only differed by a few bits for each card. Then a card could be considered corrupted if the sequence that should be common to each card was different. But then, why not just use a card from a completely different reader to get the same effect of swiping a corrupted card?
The only other explanation I can think of is that the corruption manifests itself in some other way that makes it obvious that there is in fact corruption of the magstrip.
Thanks to anyone who can offer me helpful resources or explanations.