I heard they are very similar, although there are subtle differences between the two.

  • 1
    $\begingroup$ What have you heard? Could you write it down so we can see you have heard correctly or not? Also, provide the links of hearing? $\endgroup$
    – kelalaka
    Feb 8, 2021 at 0:19
  • $\begingroup$ @kelalaka here:youtu.be/cpqwp2H0SNo?t=190 $\endgroup$ Feb 8, 2021 at 16:50
  • $\begingroup$ Clearly, We are not going to watch your video to find out the subtle differences for you. We already know. You should write down what this video talks about those subtle differences and point out your problems with those. Don't forget to mention the time position on the video. $\endgroup$
    – kelalaka
    Feb 8, 2021 at 17:33
  • $\begingroup$ @kelalaka The video itself doesn't mention the differences, it just points out that there are differences. Nevertheless, I already received my answer, so thank you all for the answers and contributions. $\endgroup$ Feb 8, 2021 at 21:30

3 Answers 3


The Vernam Cipher is a One-Time Pad that was used on a paper-tape teletype machine, with 5-bit characters. That is, it's a specific implementation of a One-Time Pad, described in US Patent 1,310,719.


Confusion arises because many people use the terms Vernam cipher and one-time pad interchangeably--but they are not the same thing.

When young Gilbert Vernam, an AT&T research engineer, got his patent in 1919 (for a "Secret Signaling System"), Vernam cipher meant a fast encryption method using an additive stream cipher that was machine-based and used Baudet with modulo 2 addition.

XOR was born.

According to this unclassified NSA historical account (p.2):

Gilbert S.Vernam, working on new developments in telegraphy, came up with a novel (and relatively simple) scheme for encrypting TTY. He mixed two Baudot-coded punched paper tapes (hole being a “+,” no hole a “-”): one tape contained the plaintext message and the other the “key.” These tapes were added “modulo 2” (“exclusive or”) in a mechanical tape reader producing an output cipher signal.

This was a huge improvement over the tedious codebooks and the German ADFGVX cipher, which was susceptible to cryptanalysis. Interestingly, in 1918, the U.S. Army was uninterested in Vernam's work.

But there were several problems no one understood at the time:

1.  The key had not been generated in a truly random manner
2.  The key was on a looped tape
3.  The key was reused

Not a one-time pad.

Enter Joseph Oswald Mauborgne--artist, cryptographer, and U.S. Army General-- the first person to send a radio signal from an aircraft to the ground. He had the realization that if the key had been generated in a random manner, then the ciphertext from Vernam's machine would be unbreakable.

Frank Miller, an American cryptographer, had already invented the one-time pad in 1882, but the glory seems to have landed on Gilbert Vernam instead of the two people who had actually figured it out. This reminds one of how Blaise de Vigenère had a cipher named after him that Giovan Battista Bellaso had invented much earlier.

Vernam cipher and the OTP are not the same thing. Moreover, when we say OTP that can refer to a physical object, usually one that is easy to hide and destroy.

These days, we mostly think of the OTP as a model for encryption systems.

  • $\begingroup$ This answer is better than mine. I can't change the accepted one, but all mine has that this doesn't is a link to the patent, which I clearly didn't read thoroughly. $\endgroup$ Feb 10, 2021 at 14:05
  • $\begingroup$ @SAIPeregrinus Thank you for saying that. It does not matter. $\endgroup$
    – Patriot
    Feb 10, 2021 at 14:08

I think he is looking for difference of one time pad in vernam cipher and One Time Password (the 4/6/8) digit number which is used for transaction authentication)

  • One Time Password:
  • In OTP, the user gives his password w (more precisely a secret pass-phrase of at least 10 characters) to the OTP generator. The generator generates a random seed s which consists of 1–16 lowercase alphanumerical characters. It then hashes w concatenated with s and reduces it to 64 bits using a standard function.

This produces a string S = H(w,s). (The purpose of the seed is to diversify the pass-phrase, since it may very well be the case that the same pass-phrase is used in different applications by a particular individual.)

The generator then computes ${p_i=H^{N-i}(S)}$ for i=0,...,N, and gives them to user with s.

The OTP generator also sends ${p_0=H^N(S)}$ and s to the server and discards everything from its memory. The server keeps last 64 bit one-time-password p , a sequence integer i, which is first set to 1, and also keeps s in memory with integritiy protection.

  • To simplify,See below image, here server generates till N+1 hash values.

How One Time password is generated.

Server generates ${H(x), H^2(x),…,H^n(x),H^{n+1}(x)}$, and stores only ${H^{n+1}(x)}$

  • The User is given ${H^n(x),…,H^2(x),H(x)}$, one at every requeest to server.
  • Now when user sends ${H^n(x)}$ , server checks creating ${H^{n+1}(x)}$ and matches with stored ${H^{n+1}(x)}$, and server updates stored value to ${H^n(x)}$ , next time user sends ${H^{n-1}(x)}$ and same procedure repeats.
  • Attacker can compromise Hash but user goes from right to left, so attacker can generate new Hash but can’t create old Hash.
  • Problem Here is after n one time password, sever-client has to try setup new password.
  • Vernam Cipher
  • It is a one time pad cipher, Here key and message of n bit length are XORed, and, number of messages are number of keys, say i, and probability of using any key with a message is ${1/2^i}$. Hence, only one unique key is associated from key space to unique message, That is why it is called One Time Pad cipher.
  • $\begingroup$ The OP has clearly written as OTP(one-time pad) and Vernam's Cipher? $\endgroup$
    – kelalaka
    Feb 8, 2021 at 11:48
  • $\begingroup$ This is incorrect. A OTP doesn't have a password. It has a randomly generated key exactly as long as the message. If you're expanding the key from anything shorter (your OTP generator, whatever that is) you have a stream cipher, not a OTP. $\endgroup$ Feb 8, 2021 at 23:02
  • $\begingroup$ @SAIPeregrinus, Please check tools.ietf.org/html/rfc2289 . Earlier it was published as Internet Document RFC 1760. Later it was transformed into an Internet standard: One-Time Password: RFC 2289. $\endgroup$
    – SSA
    Feb 9, 2021 at 9:22
  • $\begingroup$ Right. OTP = One Time Pad. One-Time Password is different, I've never seen anyone abbreviate it as OTP. Got confused. OP's question is about OTPs, not One-Time Passwords. $\endgroup$ Feb 10, 2021 at 14:03
  • $\begingroup$ @SAIPeregrinus, in rfc2289 -1.0 ABSTRACT , where it properly mentioned " This document describes a one-time password authentication system (OTP)." Also, I clearly mentioned, one time password scheme in my reply as, it was perplexing for me whether OP wants to compare one time pad cipher with one time password ! Hence I replied thinking that. So, what is the reason for down vote? $\endgroup$
    – SSA
    Feb 14, 2021 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.