ONE TIME PAD CODE

3.7K 24 2
                                    

ONE TIME PAD CODE

Plaintext and Keyword should have the same number of letters.

Ex.:

Plaintext: BRAVERY (7 Letters)
Keyword: SOCIETY (7 Letters)

How to encypt?

¤Find the value of the keyword and plaintext in the alphabets. THEN ADD.

= B(2) R(18) A(1) V(22) E(5) R(18) Y(25)
+ S(19) O(15) C(3) I(9) E(5) T(20) Y(25)
________________________________

Therefore:
2+19 = 21
18+15 = 33
1+3 = 4
22+9 = 31
5+5 = 10
18+20 = 38
25 + 25 = 50

NOTE: If the sum is MORE THAN 26. Then, subtact it with 26.

Therefore:

2+19 = 21 (U)
18+15 = 33 - 26 = 7 (G)
1+3 = 4 (D)
22+9 = 31 - 26 = 5  (E) (Y)
5+5 = 10 (J)
18+20 = 38 - 26 = 12 (L)
25+25 = 50 - 26 = 24 (X)
~~~~~~~~~~~~~~~~~~~~~~
Plaintext: BRAVERY
Keyword: SOCIETY
Ciphertext: UGDEJLX

How to Decrypt?

"Subtract the number of the 1st sum of the Ciphertext and the keyword.

So,

CIPHERTEXT (-) KEYWORD

= 21 | 33 | 4 | 31 | 10 | 38 | 50
- 19 | 15 | 3 | 9 | 5 | 20 | 25
________________________________
= 2 | 18 | 1 | 22 | 5 | 18 | 25

Therefore:

CIPHERTEXT (-) KEYWORD = PLAINTEXT

Codes And CiphersWhere stories live. Discover now