15.04.2018 Views

programming-for-dummies

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

458<br />

Cracking Encryption<br />

Think of a dictionary attack as a smarter and faster version of a brute <strong>for</strong>ce<br />

attack. The odds of someone choosing a password, like S&$J#, is much less<br />

than someone choosing a password of SONYA, which is why dictionary<br />

attacks are so often successful.<br />

Plaintext and ciphertext attacks<br />

The easiest way to defeat any <strong>for</strong>m of encryption is to steal the original<br />

plaintext message. Although this lets you read a single message, it doesn’t<br />

help you read any additional messages encrypted with the same password.<br />

However, after you have the plaintext version of a message along with the<br />

encrypted version of that same message, you can deduce the password used<br />

to encrypt that message.<br />

Comparing the plaintext version of a message with its encrypted version is a<br />

plaintext attack. Because it’s rarely possible to retrieve the plaintext of an<br />

entire message, a more common code-breaking technique is to examine the<br />

ciphertext <strong>for</strong> patterns with frequency analysis.<br />

The idea behind frequency analysis is that certain letters (such as e) or<br />

words (such as and) are more likely to appear in a message. A poor encryption<br />

algorithm encrypts the letter e and the word and with identical characters<br />

in different parts of the encrypted message. From this simple clue, it’s<br />

possible to gradually deduce the encrypted symbols that represent the<br />

second-most-frequently used letters and words.<br />

Although no <strong>for</strong>m of encryption is unbreakable, the goal of every encryption<br />

algorithm is to resist all known <strong>for</strong>ms of attack so as to make cracking the<br />

encryption unfeasible due to the lack of time or resources. As computers get<br />

faster and more powerful, today’s encryption algorithms will only get weaker<br />

and easier to crack. By the time that occurs, mathematicians and computer<br />

scientists will have created newer and better encryption algorithms until<br />

those age and become easily broken all over again.

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

Saved successfully!

Ooh no, something went wrong!