15.04.2018 Views

programming-for-dummies

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

456<br />

Cracking Encryption<br />

Hiding in plain sight with steganography<br />

One unusual <strong>for</strong>m of encryption involves hiding<br />

data within another chunk of data, such as<br />

hiding a text message inside an audio or<br />

graphic image. Hiding data within another <strong>for</strong>m<br />

of data is steganography. The idea is that no<br />

one can read your messages if he can’t find<br />

them in the first place.<br />

Steganography works on the principle that data<br />

in audio, video, and graphic files can be<br />

removed without noticeably affecting the quality<br />

of the original file. After removing chunks of<br />

in<strong>for</strong>mation from such a file, which leaves gaps<br />

in the original file, the next step is to insert the<br />

plaintext or ciphertext into these open gaps.<br />

If you insert plaintext into an audio, video, or<br />

graphic file, anyone can read your message if<br />

he knows how to find it. If you encrypt your<br />

message and then insert the ciphertext into a<br />

file, someone would need to know where to find<br />

your message and then know the password to<br />

decrypt that message. Steganography isn’t<br />

necessarily a <strong>for</strong>m of encryption so much as it’s<br />

a way to keep anyone from knowing you’re<br />

sending secret messages at all.<br />

Brute <strong>for</strong>ce attack<br />

Basically, a brute <strong>for</strong>ce attack tries every possible combination of ways a<br />

message can be scrambled. Think of a combination lock that opens only if<br />

you align the right number. If the combination lock offers 36 numbers, you<br />

can use a brute <strong>for</strong>ce attack and exhaustively try all 36 numbers until you<br />

find the one that opens the lock.<br />

Now consider a more complicated combination lock that not only displays<br />

36 numbers but <strong>for</strong>ces you to choose three different numbers in the correct<br />

order. You can still exhaustively try every possible number combination, but<br />

the time needed to do this is likely more than most people are willing to<br />

take, which effectively makes the lock secure.<br />

That’s the same idea behind encryption. Every <strong>for</strong>m of encryption can eventually<br />

be cracked with a brute <strong>for</strong>ce attack, but the time needed to exhaustively<br />

try every possibility takes too much time. It’s possible to crack even<br />

the toughest encryption algorithm with a brute <strong>for</strong>ce attack, but you might<br />

need a room full of million-dollar supercomputers running 24 hours a day <strong>for</strong><br />

the next million years to eventually crack the encryption. By making the<br />

costs in resources and time too high, encryption algorithms are essentially<br />

unbreakable through a brute <strong>for</strong>ce attack alone.<br />

A variation of the brute <strong>for</strong>ce attack is the Chinese lottery. The idea is that if<br />

you gave each person in China (with its billion+ population) a computer and<br />

assigned each computer a different range of brute <strong>for</strong>ce attacks on the same<br />

encrypted data, eventually one of them will crack the encryption and hence<br />

“win” the lottery.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!