This cipher encrypts binary data. The algorithm is simple. Just use XOR. This cipher has perfect secrecy, meaning that a cipher text only attack is impossible.

Pros

The One Time Pad is the gold standard for perfect secrecy. However, it

Cons

Extremely long keys. The Key has to be as long as the message. This renders the encryption basically unusable because, you must first transmit a key that is as long as the message. That key must also be encrypted, thus defeating the purpose. It’s very difficult to use in practice.

Since OTP has perfect secrecy, it cannot be broken by Cipher only attacks. But this isn’t the only type of attack. There are other attack types that it is vulnerable to.

Key

  • Given m and c, It is simple to compute the key (k). It is m XOR c.

How to Use

Sources: