The Naked Scientists

The Naked Scientists Forum

Author Topic: When to stop decoding  (Read 2723 times)

Offline syhprum

  • Neilep Level Member
  • ******
  • Posts: 3813
  • Thanked: 19 times
    • View Profile
When to stop decoding
« on: 04/05/2012 18:47:07 »
When I have an ecoded message that requires say a 56 bit key to decode I can set up a brute force program to run thru all possible keys quite simple so far but how do I know when it is cracked I can't print out all possible results and find one that looks right .


 

Offline CliffordK

  • Neilep Level Member
  • ******
  • Posts: 6321
  • Thanked: 3 times
  • Site Moderator
    • View Profile
Re: When to stop decoding
« Reply #1 on: 04/05/2012 21:53:58 »
Hmmm...
We'll hope this is for legal purposes.

256 = 7 x 1016 choices.

If you can do 3 billion (3GHZ) tests a second.
Then it would take about 8 months to go through all the choices.  Whew, I thought it would be longer, but I suppose that is why you chose not to do 64 bit or 128 bit encryption.  Still, you will need an efficient tight loop, and good parallel processing.

This is one of the reasons that most searches first begin with heuristic based searches.  Look for common names and dictionary words before slogging through brute force.  Also, if the code is made up of 7 bytes, you might restrict your search to printable characters.  Are there any characters that are not allowed by the encryption algorithm such as "return"?

This is one reason why it may be best to input codes in hex if octal or hex if possible.

Anyway, it would help to know a little about the document being decoded. 
If it is an MS Word document, perhaps look for particular characters in the header file.

If it is "text", then run the output through a spell checker.  Or, look for repeating characters such as a space that would repeat on regular intervals, usually less than every 10 characters or so.

If it is a hard drive, then look for specific system programs on the drive, or directory constructs.

Making a code within a code would make it much more difficult to crack.  And, of course, it helps to know the encryption algorithm.

Have Fun
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8127
  • Thanked: 53 times
    • View Profile
Re: When to stop decoding
« Reply #2 on: 04/05/2012 22:15:26 »
There are various "brute force" calculators online, which estimate how long it would take to crack passwords by trying every possible combination of characters permitted ...
e.g. ... https://www.grc.com/haystack.htm [this one runs in your browser, so doesn't send passwords over the internet ] 

... a 56 bit key ... brute force program to run thru all possible keys

seems that would take a typical PC the best part of a year (working 24/7) to try all the permutations.

Some keys include a check digit, if you know how that is derived the crack would not take as long.


http://howsecureismypassword.net/  [another program which runs in the browser via javascript]
« Last Edit: 04/05/2012 22:51:58 by RD »
 

Offline syhprum

  • Neilep Level Member
  • ******
  • Posts: 3813
  • Thanked: 19 times
    • View Profile
Re: When to stop decoding
« Reply #3 on: 05/05/2012 07:10:24 »
I wonder how they did it at Bletchly before the days of spell checkers ?
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8127
  • Thanked: 53 times
    • View Profile
Re: When to stop decoding
« Reply #4 on: 05/05/2012 07:19:30 »
I wonder how they did it at Bletchly before the days of spell checkers ?

they did have electromechanical computers ... http://en.wikipedia.org/wiki/Bombe
 

Online evan_au

  • Neilep Level Member
  • ******
  • Posts: 4104
  • Thanked: 245 times
    • View Profile
Re: When to stop decoding
« Reply #5 on: 13/07/2012 13:16:44 »
Letters in encrypted text are random, while letters and words in a natural language have a characteristic distribution (somewhat different for different languages): http://en.wikipedia.org/wiki/Zipf%27s_law#Motivation

At Bletchley Park, apart from having some very bright mathematicians (like Alan Turing):
  • The early Enigma machines had a weakness that they could never encrypt a letter as itself. If you had a large block of text encrypted with a single key, you could rule out any encryption keys that decrypted any letter as itself: http://en.wikipedia.org/wiki/Cryptanalysis_of_the_Enigma#The_Enigma_machines
  • Sometimes a marine buoy would be destroyed intentionally, which would be reported by a standard, short message. This "known plaintext" attack often allowed the cryptanalysts to work out the encryption keys for the day.

Note: Modern encryption codes will happily encrypt a byte as itself, so that method won't work any more.
 
 

Offline nicephotog

  • Sr. Member
  • ****
  • Posts: 387
  • Thanked: 7 times
  • H h H h H h H h H h
    • View Profile
    • Freeware Downloads
Re: When to stop decoding
« Reply #6 on: 27/07/2012 04:25:47 »
Chinese calligraphy would be a better example of how to tackle cracking messages. Alike above, cryption does not mean a letter a function, only patterns and sequence. Chinese "words" are often enough unique as much a set of symbols. And something similar to first 600 units of count are a calligraphic word character each.
 

The Naked Scientists Forum

Re: When to stop decoding
« Reply #6 on: 27/07/2012 04:25:47 »

 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums