Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Concepts of deciphering codes

  1. May 2, 2006 #1
    Can anyone explain the concepts of deciphering codes such as these?

  2. jcsd
  3. May 3, 2006 #2


    User Avatar
    Gold Member

    That would entirely depend upon how it's encrypted. The best approach (that I'm aware of) for transposition codes is to look for the most common character first. Generally, in English, that will be an 'e'. Repeating sequences are the next thing that I look for. If there are a lot of instances of ' w9t ' , for instance, it's reasonable to suspect that it represents ' the '. That's reinforced if you have already assigned 'e' to 't'. You then go back and replace every 'w' in the text with a 't', and every '9' with an 'h'. Your instance doesn't show word breaks, though, so it's a bit harder. Some patterns within other words then make themselves apparent, so you can exptrapolate what a particular word might be. Fill it out, and then copy the new letters that you get from that into the other words.
    While I don't know, I assume that computer code-breaking takes the same basic approach, but is also capable of deducing whether or not some complex mathematical manipulation has been used in encoding it.
    Another encryption method could have each letter stand for a number. The first two or three digits can stand for the page number in a pre-selected book, the next two the line number, the next two the word number, and the last 1 or 2 the letter number within that word. The interceptor would have to know the specific edition of the specific book in order to figure it out.
    One that I came up with myself involves a simple transposition code ('a' = 'g', etc.), but every fifth word is English, interspersed with French, German, Spanish, Cockney rhyming slang, whatever. The tricky part is using words in each language that don't include 'special' characters not used in English. I also avoid using common words such as 'the', or 'it'.
    I've never put it to the test, since I just thought it up while typing this post, but I suspect that it would be fairly effective unless attacked by a professional cryptographer. :biggrin:
    Last edited: May 3, 2006
  4. May 5, 2006 #3
    That isnt a question of cryptography, its called cryptanalysis i beleive.

    Cryptography deals with generating and using Cryptographic methods. Cryptanalysis is a study of breaking and circumventing such methods, though i beleive it is said that you have to know both to be a good cryptographer.

    I only know that i know neither.
  5. May 6, 2006 #4


    User Avatar
    Gold Member

    Pardon the terminology slip-up. I should have known better. :redface:
  6. May 6, 2006 #5
    Danger: Sorry, wasnt aimed at you, just a pointer to the OP

    I find the historical background of cryptanalysis the most facinating because it conveyed to me a sense of emergency and neccesity in both developing and cracking codes and ciphers for various ( usually military or political ) reasons.

    Ive read a couple of popular science type books on codes and cryptography as well as some basic practical cryptographic texts.

    You also get to learn the the basic ideas around the subject from some of the earliest ciphers and codes, most of which are like those you play with as child with secret writings etc, through to the mind boggling specialist field it has become today.

    I found it intresting because electronic communication, computers, coding, electronics and maths all come together with cryptography and cryptanalysis in a historical context. Infact understanding simple morse code as a form of communication and the history behind the Enigma machine and breaking such codes is a great way to learn about modern digital computers i think.

    Secret writings go back as far as writing itself, but think it really gets intresting at times of war. I dont know anything about the real hardcore modern cryptography though, i just have a passing intrest in the history of communication.
    Last edited: May 6, 2006
  7. May 6, 2006 #6


    User Avatar
    Gold Member

    What astonishes me is the unmitigated audacity of the US government in trying to make a branch of mathematics illegal. I refer to the 'public key' encryption which even the NSA's computer power can't crack. While they have no jurisdiction over me anyhow, I wouldn't put up with it if I was a US citizen. If I want to encrypt something in any manner whatsoever, I'll damned well do it and they can get stuffed. :grumpy:
  8. May 6, 2006 #7
    This is not really relavent to the thread, but is with respect to danger's post.

    In some ways I agree with you, although, I am quite prepared to settle for slightly weaker encryption if it means that terrorists are caught more easily, so I am inclined to side with the government (providing that it is a democratic and generally responsible government), having said that, I think that the US government isn't solving the problem in the right way.
    After all, the government of any country has a responsiblity to protect its citizens, and the only way to protect them from terrorism is to collect information.
  9. May 6, 2006 #8


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    There's no way, by looking at a string of characters, to tell what the ecryption algorithm is. And even if you know what the algorithm is, decryption typically needs a key.

    Some of the cruder (ie: centuries old) encryption schemes can be decryted reasonable easily given a long enough string. For a string of about 50-odd characters, only the most basic ciphers can be cracked without significant computation. In this particular case, you can see if it's a monoalphabetic substitution cipher by doing a frequency analysis (as Danger suggested) and following up from there. But before that, perhaps you'd want to check even more basic ciphers like a shift or scroll cipher. Really, the options you choose depend on the context.

    Anything more sophisticated than that will need a computer (you could crack other substitution ciphers, book ciphers or maybe a Vigenere cipher without a computer, if you have a lot of time on your hands).
  10. May 7, 2006 #9


    User Avatar
    Science Advisor
    Homework Helper

    Only the NSA knows what the NSA can break. It would seem reasonable they are capable of breaking codes somewhat more secure than whatever the current legal cutoff is, so you really have no idea if you are safe from "them" (tinfoil hat on standby).

    Some more detail on breaking a substitution cipher (though as mentioned you can't tell this is what the OP's ciphertext is) http://www.simonsingh.net/The_Black_Chamber/crackingsubstitution.html
  11. May 8, 2006 #10


    User Avatar
    Gold Member

    You're right about that, of course, but the reason that they gave for trying to classify the concept was that they can't. (That's not to say that they're telling the truth, though, which is never a sure thing.)
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Concepts of deciphering codes
  1. Concept of Entropy (Replies: 6)

  2. Capacitor Codes (Replies: 2)