Results 1 to 2 of 2

Thread: Decryption Help

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Decryption Help

    I don't know where to post this, and this forum seemed to be the best place.

    I have a project for school, where basically, I'm given a file that's a dictionary of 1,000 words, and after that, contains N number of lines of text that's encrypted. All of the encrypted sentences only use the words found in the dictionary, and each sentence uses a different encryption scheme.

    It's my task, obviously, to try to decrypt these sentences.

    So I'm looking for some ideas about how to do it.

    One method I've already tried is to run some simple statistics on the dictionary, and tally up how many times each letter of the alphabet occurs, then do the same thing with my encrypted sentence.

    So I would know that e appears 867 times in the dictionary and has the highest occurance, and z appears 8 times as the highest occurance in the sentence, I replace z with e, and everything else with dashes (-). Then I compare each word in the sentence to the dictionary, to make sure they still match. If everything's good, I go on to the next letter.

    The problem arises when a replacement is made in the sentence, and every word still matches the dictionary, but is in correct.

    I've also tried converting each word to numbers, such as:

    zfzrqatx would be
    1213456

    And look for patterns in the dictionary that match that number scheme, but if each word in the sentence is three letters long, this method isn't going to be very efficient, either.

    So any suggestions, help, or examples would be welcome.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571

    Re: Decryption Help

    Is every 'encryption scheme' a simple letter replacement?

    If so, what you are suggesting sounds right...
    Try every letter to letter correspondance, but 'cleverly' chose which order to try it in.

    So, you would make a recursive function that takes the encrypted string and the letter matching you've guessed so far. You would then, using the dictionary and letter frequencies, guess the next combination. If your guess is wrong, the function will return some value, so you know your guess was wrong and can 'undo' it, to try something else.

    Sound ok?
    sql_lall

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width