For some reason I have been thinking a lot about encryption lately. I'm a CS major, but an encryption novice. The skeptic in me feels making a code that uses a fairly simple algorithm would be a lot harder to break than what I read about. I'm wondering if I could write a program to encode some text and submit it here to some experts to see if in fact it is trivial to break it?

What I'm thinking: I encode 5 messages, each message has between one and five plaintext sentences. My encoding algorithm is going to use several potential encoding algorithms, which the encrypted text will tell me which one is being used. The encrypted text will have many letters that are not part of the code, some of the letters will be pointers to indicate where the next letter of the code is, and the code will vary the number of letters representing a letter. For example:

Check to see if the 33rd letter is a 'b'. If so, check to see if the 12th letter is a 'w'. If so, check to see if the 3rd letter is a 'y'. If all those are true, I know I'm using 'algorithm number #3'. Now delete the 33rd, 12th, and 3rd letter from the message. Algorithm #3 states that now delete every 4th letter in the crypt. Now, the first letter of the plaintext is the 17th letter. The next letter, tells you how far left or right you go to find the second letter.. but every 2nd letter will take two letters to define what letter it is (basically sometimes the crypt is a 1 for 1 substitution table, sometimes it is a 2 for 1 table, sometimes its a 3 for 1 table, etc.

I don't know how easy that was to follow... but from what my small brain can think about I don't see how a super fast computer can just brute force try everything to decode with an algorithm with that sort of jumble. I'd love to be proven wrong.

Regards, Ernie

  • $\begingroup$ See What topics can I ask about here? in the Help Center. Also see Programming Puzzles & Code Golf Stack Exchange, and Usenet's rec.puzzles. $\endgroup$
    – user10496
    May 4, 2015 at 6:18
  • 1
    $\begingroup$ Nowadays we expect much more of ciphers. In particular they much not leak any information about the plaintext, apart from its length. It must be secure even if the attacker knows (or even chooses) part of the plaintext, etc. No attack must be significantly faster that brute-force. It shouldn't be limited to letters, but should work with arbitrary bytes. $\endgroup$ May 4, 2015 at 13:53
  • $\begingroup$ So from the replies I've gotten so far my opinion is reinforced. I just don't see what is overly complicated about making an encryption that is impractical to break. $\endgroup$ May 5, 2015 at 0:13
  • 1
    $\begingroup$ See Schneier's Law: "Anyone, from the most clueless amateur to the best cryptographer, can create an algorithm that he himself can't break. It's not even hard. What is hard is creating an algorithm that no one else can break, even after years of analysis." $\endgroup$ May 5, 2015 at 17:50


Browse other questions tagged .