examplePgP.pl Ideas: 1. A secret message, in TXT form is encoded as a sequence of bytes (ASCII 1 per char., UNICODE: 4 per char.) 2. Write down the bytes, then pretend it's a number. 3. Choose two small prime numbers (in real applications prime numbers are very big). Do modular (reminder) operations on it: the result is a number [almost] impossible to relate to the original, called the code. 4. Send the code over internet etc. 5. At the receiving end, do the 'reverse' math, find out the original number 6. Finally, back from number to caracters. Example: p=29 q=11 z:280 n:319 e: 187 Secret message (String to be encrypted): casa ASCII: c -> 99 a -> 97 s -> 115 a -> 97 casa -> 99,9711,597.0 String encryption encriptedchar=ascii(char) ^ d % n c -> 99 -> 220 [ascii(char) ^ d :970299] a -> 97 -> 14 [ascii(char) ^ d :912673] s -> 115 -> 202 [ascii(char) ^ d :1520875] a -> 97 -> 14 [ascii(char) ^ d :912673] Decryption: ascii(char)=encriptedchar ^ e % n 220 -> 99 -> c [encriptedchar ^ e1079049365620500206177454447370164274259844086615781832667125980874694377662434538824118767417050682145918199589099669040732839892594398686250999985150002126296700564277375885891186134475738679797126282957248841933578530717431447571062313339124061306880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000] 14 -> 97 -> a [encriptedchar ^ e21180815237031669287179835434694911613556109012832165327800723838112800649474752403915594780573717825851305098814909086968271859138427024641989993325636108387351688278296624359909959794193516286504624208194991816704] 202 -> 115 -> s [encriptedchar ^ e126097386807449131210994752051371752208872730343533136140344453425121962209212528302751109097420023477736204707923884279606843143197159913011171501604932188539767371680527025261015596495321601446830711220036902795756259235934471222714976915667177576157446081970444917887068491170039933072134812543579442457983046137130376961893184860963480408168053813748002012947026806443968731276823062118095366127356034310182072605035813434032128] 14 -> 97 -> a [encriptedchar ^ e21180815237031669287179835434694911613556109012832165327800723838112800649474752403915594780573717825851305098814909086968271859138427024641989993325636108387351688278296624359909959794193516286504624208194991816704]