Vernam cipher patent, Figure 1. This drawing shows Gilbert Vernam's original concept for a teletype encryption machine that combines plaintext characters "(C)" with characters on a key paper tape "(D)" using an XOR function. The XOR takes place at relays "19" through "25". If both the "C" and "D" contacts are open, no voltage is applied to the relay coil. If both "C" and "D" contacts are closed, voltage is applied to both ends of the relay coil, so the relay contacts stay open. If just one of contacts "C" and "D" are closed, current flows through the relay coil, closing its contact.