One-time pad cipher
In cryptography, the one-time pad is an encryption technique that cannot be cracked, but requires the use of a one-time pre-shared key the same size as, or longer than, the message being sent. In this technique, a plaintext is paired with a random secret key.
Example
Plaintext: C R I M E S
One-Time Pad: M U R D E RUna alamin mo kung pang ilan yung letter for example is yung C sa plaintext tapos M sa one time pad. Yung C is 3rd letter sa alphabet so 3 siya. Next yung M is 13th letter sa alphabet so magiging 13. Next ipag aadd mo yung 3 and 13. So 3+13=16. Next na gagawin mo is minus one ( kailangan po siya haha ). So 16-1=15 and yung 15th letter sa alphabet is O so yun yung letter sa ciphertext.
How about kung plaintext yung kukunin?
Start natin sa O. Una kukunin kung pang ilan si O which is 15 then mag aadd ng 1. The sum is 16 after that i miminus mo siya sa one pad which is yung M na pang 13th letter yung sagot is 3 which is yung C.Next what if yung sum ng letters ay lumagpas ng 26?
For example is yung S sa plaintext at R sa One Time Pad. Yung S is 19 at R is 18 then add uli magiging 37. Next minus one uli magiging 36. Para malaman yung letter bibilangin mo yung 27,28... Starting from A uli. For example A is 27 B is 28 and so on. So ang sagot is 10th letter na which is J.Paano naman kukunin yung plaintext niyan?
First aalamin mo uli kung pang ilan yung letter yung J is 10 then i miminus mo lang siya sa one time pad letter na R which is 18 na ang kakalabasan is -8. After that iba naman pagbilang mo dahil may negative sign "-" mag sstart ka ng -1 sa Z up to -26 na A. So tama lang siya ang kinalabasan ay -8 which is letter S.________________________________________________.
Author notes:hiiiii sa inyo bwahaha ang kyut nyo pero mas kyut ako.Vote and comment pls
Follow nyo ko :(
-meOowkyut💋