In easy steps, this is how it works:

  1. Convert txt to numbers. mod 1-26.
  2. Generate random numbers (by my other cipher) equal to plain txt.
  3. Write random numbers under txt numbers.

Like this:

txt = LOI - txt number = 12 15 09 - random number = 73 96 14

Encryption system, random numbers under txt numbers

12 15 09 --> txt number  
73 96 14 --> random number  
85 01 13 --> encrypted number
  • 1+7=8 , 2+3=5 , 1+9=0 not '10' if the result two digit take the 2nd digit 5+6=1 , and so on.
  • If the result two digit '10,11,12,13,...,19' take the second digit '0,1,...,9'
  • Last step will convert the numbers to letter and numbers.

Like this:

 8 5 0 11 3 --> HE0KC or 8 5 0 1 1 3 --> HE0AAC
  • Revers the steps to get the plain text, If the encrypted number smaller than the random number that mean we take the second digit 5+6=1 Reverse 1-6=5 because 5+6=11 2nd digit = 1.

So, is it secure or not?

  • $\begingroup$ Are your random numbers uniformly distributed between 00 and 99? In that case this part of the system should be secure but inefficient (ciphertext is twice the size of the plaintext). Simple modular addition is better. Essentially an inferior method for combining a keypad with a message, similar to stream ciphers/one-time-pads. $\endgroup$ Nov 29, 2012 at 9:57
  • $\begingroup$ Your real problem is "By my other cipher", because I'm 99% sure that the other cipher sucks, and obviously you need to generate a new pad for each message. Like with most stream ciphers, pad reuse is absolutely fatal. $\endgroup$ Nov 29, 2012 at 9:59
  • $\begingroup$ Please have a look at the FAQ. There is a specific part that states that your type of question is offtopic. Thus I will have to close it. Do not let this discourage you, however. We love good, on topic questions here. $\endgroup$
    – mikeazo
    Nov 29, 2012 at 12:21

1 Answer 1


The description isn't very clear but from what I understand it's a one time pad with a weird encoding of your input : If you take and encoded input you know that every even position is either $0$, $1$ or $2$ and if it is $2$ then the subsequent digit is between $0$ and $5$.

That being said the whole security of your scheme relies on using a solid random number generator and your step 2 isn't very reassuring.

Two references you might want to look at : Stream ciphers and One time pad.

Last but not least, if this is for another purpose than for your education/amusement try using something that has been done by professionals. Secure crypto looks hard and it's harder than it looks

  • $\begingroup$ "Secure crypto looks hard and it's harder than it looks" -- spot on. $\endgroup$
    – Savara
    Nov 29, 2012 at 10:39
  • $\begingroup$ @Alexandre, All of this is for fun, and I bit someone that I can make good Hand cipher with a good Random Generator, If this is the wrong place to share my Ideas let me know ^_^ $\endgroup$
    – illsecure
    Nov 29, 2012 at 15:58
  • 1
    $\begingroup$ @illsecure Have you read the FAQ? Specifically, 3rd and 4th points. It answers your question quite unequivocally. $\endgroup$
    – Thomas
    Dec 1, 2012 at 10:47

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