Home > College Algebra > Ciphers > One-Time Pad Cipher / Vernam Cipher (encoder / decoder) example

63. One-Time Pad Cipher / Vernam Cipher (encoder / decoder) example ( Enter your problem )

1. Examples





1. One-Time Pad Cipher / Vernam Cipher encoder

Text : ABCD efghi
Key : keyonetwothree
Alphabet : abcdefghijklmnopqrstuvwxyz


Solution:
The One-Time Pad (OTP) cipher / Vernam cipher, is an encryption technique that is probably unbreakable and required key which length must be greater than or equal to message length.

Alphabet = abcdefghijklmnopqrstuvwxyz

Letterabcdefghijklmnopqrstuvwxyz
Number012345678910111213141516171819202122232425

Each letter is shifted down based on the key letter
PlaintextABCD efghi
Text Value
(2)
012345678
Keykeyo netwo
Key Value
(4)
1042414134192214
Addition
(2) + (4) Mod 26
10526=0171792529=322
CiphertextKFAR rjzdw

So finally
Plaintext : ABCD efghi
Key : keyonetwothree
Ciphertext : KFAR rjzdw

2. One-Time Pad Cipher / Vernam Cipher encoder

Text : hello world
Key : fourfivesix
Alphabet : abcdefghijklmnopqrstuvwxyz


Solution:
The One-Time Pad (OTP) cipher / Vernam cipher, is an encryption technique that is probably unbreakable and required key which length must be greater than or equal to message length.

Alphabet = abcdefghijklmnopqrstuvwxyz

Letterabcdefghijklmnopqrstuvwxyz
Number012345678910111213141516171819202122232425

Each letter is shifted down based on the key letter
Plaintexthello world
Text Value
(2)
74111114221417113
Keyfourf ivesi
Key Value
(4)
514201758214188
Addition
(2) + (4) Mod 26
121831=528=21930=435=92129=311
Ciphertextmsfct ejvdl

So finally
Plaintext : hello world
Key : fourfivesix
Ciphertext : msfct ejvdl





This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here





Share this solution or page with your friends.
 
 
Copyright © 2026. All rights reserved. Terms, Privacy
 
 

.