Your Info

Sign by Danasoft - Get Your Sign

Wednesday, 5 February 2014

Learn What is Cryptography

Cryptography has been around almost as long as language. People have been communicating for thousands of years and have been trying to keep information secret for just as long. Many cryptography methods have been in use for years, and still hold precedence today while leaps in technology have brought forth new methods. My hope is to instill a basic understanding of cryptography and to help people interested in the subject establish a base to witch they can move forward from.


For starters, there are some basic terms that are universal to anything related to cryptography and should thus be memorized.

Plain-text is a unencrypted message,
My name is Bob]

Cypher text is plaintext after it has been encrypted,
yM eman si boB]

A Key is what the receiver of the message uses to decrypt the message

While its obvious what I've done to the sentence, the difference is clear. One is readable while the other appears to be garble.

Plain and cypher text are universal when it comes to encryption, and are the basis for a encrypted message. One must become the other and then reversed to read the message.

Now on to cyphers; Cyphers can be divided into two main categories, with many sub categories within. The main two are Traditional and Modern cyphers. Traditional cyphers are basic, and have been around for a long time, while modern cyphers utilize the advancements in technology, mainly computers, making them much more advanced.

Traditional cyphers come in two main flavors: Substitution and Transposition. Both involve taking plaintext and mixing it up to create cypher-text. A very basic example would be pig latin. you are taking a message and saying it backwards, ie the example i gave earlier.


With Substitution, you take plaintext, and substitute characters within the message for others, thus scrambling it. Only the person receiving the message has the key and can unencrypted it. Substitution is specific in that when you scramble the message your moving individual characters around, or changing them out for new characters. With transposition your utilizing the same methods as with substitution but your scrambling sections of the message, instead of individual characters. The block of plaintext could be any where from a couple characters long to several sentences or more. Both still utilize the same method for the overall encryption and thus have the same weakness.

Frequency Analysis

Lets say for a moment that you receive an assignment to decode some cypher-text. You start looking at the message, and as notice that some characters appear more often then others. Frequency analysis, basically the use of statistics, involves taking these re-occurring characters and assigning new characters to them based on statistical data.

Lets take the word Experience. I'll encrypt the word and now we have GZRGTKGPEG. If we look at the word it becomes obvious once broken down that the letter g occurs the most out of the other characters with a total use of 4 times. Using statistics, if G is the most common occurring letter in the word, then we could associate this with E and substitute them.

EXRETKEPEE

Now looking at the alphabet you will see that G is two places to the right of E. We'll move the rest of the letters two characters back to get the original word Experience. This is Frequency Analysis in a nut shell. Using modern computer programs this basic technique can be applied to large quantities of cypher text, or can be used to create complex encryptions by layering the movement of characters of blocks of characters. While these can become incredibly complex they can still all be broken the same way given enough time and resources.

While Traditional cyphers can be very complex the weaknesses in there use led to the creation of Modern cyphers witch we will now take a look at.

Modern cyphers can be broken down into two main sub categories as well as several other types not related to the basic system used by the main two.
These two typed are Private Key (symmetric key) and Public Key (asymmetric key) encryptions. Well go through them in this order.

Private Key is simply a password system that keeps the key secret. The same key can be used to encrypt and decrypt, and is less complex then a public key system.
If Bob encrypts a message with Key A and sends it to Tom, Tom will use his copy of key A to decrypt it. The key must be secret to maintain the security of the cypher.

Public Key (asymmetric key) is a system that used a public key in conjunction with private keys. It utilizes a different key to encrypt and decrypt. Bobs company makes a key for encrypting messages that is commonly used, but when Bob sends the message to Tom, Tom uses his private key to decrypt it. If one key is compromised, the other part remains secret, thus maintaining security. This system can become very complex.

Since we covered the basics for Encryption, ill now talk a little about some basic methods for cracking cyphers, such as the ones above.

We already covered Statistical Analysis earlier but it is far from the only way to crack cypher text. Another common method involves Brute Forcing. This involves using a program to make repeated attempts to crack a cypher until it succeeds. This however takes time.

An exercise. is a scenario involving a simple cypher. Bob has a message for Tom. He used key A to encrypt it. Tom has key A as well making this a private key. The cypher-text looks like this:

7 14 7 18 10 3 16 22 21 7 3 22 7 24 7 20 1 22 11 15 7 22 10 7 1 9 7 22 10 11 9 10
The key: 1 = A

Its pretty simple from this point, as obviously you'll notice that every number represents the spot of a letter in the 26 letter alphabet.
Decrypted it looks like this:

GNGRJCPVU GCV GXGTA VKOG VJGA IGV JKIJ

Still looks like garble, but if we use statistical analysis we can crack the cypher text and get Bobs important message.
A quick google search will reviel that the most common letter in the english languadge is E . A quick look at the cypher text will show that G is the most common occurring letter in the sentence. Thus we'll start by swamping G for E:

ENERJCPVU ECV EXETA VKOE VJEA IEV JKIJ

Still garble but were moving in the right direction. Once agin a google search will show that the next most common letter statistical is T.
After scanning our cypher-text we see that V is the second most common letter there so once agin we start swapping:

ENERJCPTU ECT EXETA TKOE TJEA IET JKIJ

The pattern witch you might have already guessed is each character moved 2 spaces to the right. A becomes C, etc.... With that knowledge we can now finish the decoding process.

ELEPHANTS EAT EVERY TIME THEY GET HIGH

Now our cypher-text has been decrypted into readable plaintext and Bobs message to Tom becomes understandable. Not sure of the meaning tho, maby Bob was on something at the time but that aside, this shows how to types of encryptions can be used in conjunction. While this was a very simple cypher, something much more complex can be constructed using the same means, and that same cypher can be broken using Frequency Analysis, and by looking for patters. While everything taught here is at a very basic level it can be taken to great complexities when dealing with real world use.

I hope this has taught you something of the basics of cryptography. Once i get the time i plan on making more of these, with the next one dealing with a common but more complex cypher common to computer use. This is of course the Hash Algorithm.


I I've been already explaining the Basics of Cryptography, so that every beginner can know about it. Here is one more article i am going to write on "Cryptography". Lets start:

What is encryption

Encryption is the technique of converting data from a plain text into what is called cipher text. Cipher text is information that has been encrypted using an algorithm or cipher into a character string. This data can be converted back into its original form or reverse the process is called decryption. To recover the original data that was once in plain text you need the decryption key, the decryption key will undo the process which encrypting the data has done. A decryption key is what determines the output of either the cipher or algorithm.


History


Cryptography in greek means: "hidden secret". Cryptography was originally created to encrypt secret data to protect unwanted eyes from seeing the original piece of text. This is still what encryption is mainly used for today. The development of digital computers and electronics after WWII made possible much more complex ciphers. Furthermore, computers allowed for the encryption of any kind of data representable in any binary format, unlike classical ciphers which only encrypted written language texts; this was new and significant.


Types of encryption


There are many types of encryption techniques. Here I will be going over:

  • DES
  • MD5
  • NTLM
  • LM

Encryption can be broken through techniques of cracking such as:

  • Bruteforce
  • Dictionary attack
  • More..

DES: DES stands for Data Encryption Standard. It was selected by the NBS(National Bureau of Standards). In 1974 it was created by the IBM team.


MD5: MD5 stands for Message-Digest algorithm 5. MD5 has a 128-bit hash value. MD5 was designed by Ron Rivest in 1991 to replace an earlier hash function, MD4. In 1996, a flaw was found with the design of MD5. While it was not a clearly fatal weakness, cryptographers began recommending the use of other algorithms, such as SHA-1.


NTLM: NTLM stands for NT Lan Manager. During protocol negotiation, the internal name is nt lm 0.12. The version number 0.12 has not been explained. It is the successor of LANMAN (Microsoft LAN Manager), an older Microsoft authentication protocol, and attempted to be backwards compatible with LANMAN. NTLM was followed by NTLMv2, at which time the original was renamed to NTLMv1.

LM: LM stands for Lan Manger. LAN Manager hash is one of the formats that Microsoft LAN Manager and Microsoft Windows versions previous to Windows Vista use to store user passwords that are fewer than 15 characters long. This type of hash is the only type of encryption used in Microsoft LAN Manager (hence the name) and versions of Windows up to Windows Me.


Cryptanalysis


Cryptanalysis is the art of analyzing a cryptographic scheme. There are a wide variety of cryptanalytic attacks, and they can be classified in any of several ways. A common distinction turns on what an attacker knows and what capabilities are available.


Cracking techniques

There are some different types of cracking techniques. I will discuss in the paper. First being brute force.

Brute forcing is a strategy used to break the encryption of data. It involves traversing the search space of possible keys until the correct key is found. The selection of an appropriate key length depends on the practical feasibility of performing a brute force attack. By obfuscating the data to be encoded, brute force attacks are made less effective as it is more difficult to determine when one has succeeded in breaking the code.

Dictionary attack: A dictionary attack uses a brute-force technique of successively trying all the words in an exhaustive list (from a pre-arranged list of values). In contrast with a normal brute force attack, where a large proportion key space is searched systematically, a dictionary attack tries only those possibilities which are most likely to succeed, typically derived from a list of words in a dictionary.

Hope all your concepts about cryptography are clear now.