08-03-2011, 02:15 PM
1.DOC (Size: 131 KB / Downloads: 184)
CRYPTOGRAPHY
INTRODUCTION:
The Explosive growth in computer systems and their interconnection via networks has increased the dependence of both organizations and individuals on the information stored and communicated. This in turn, has lead to a heightened awareness of the need to protect data and resources from disclosures, to guarantee the authenticity of data and messages and to protect the systems from network based attacks.
Secondly, the disciplines of cryptography and network security have matured, leading to the development of practical, readily available applications to enforce network security.
In distributed systems or in networks, the communication can be possible by carrying data between terminal user and computer and between computer and computer. Network security measures are needed to protect data during their transmission and this can be achieved through cryptography.
AN OVERVIEW OF CRYPTOGRAPHY:
The word cryptography means “secret writing”. However, the term today refers to the science and of transforming messages to make them secure and immune to attacks.
The original message before being transformed is called plaintext. After the message is transformed, it is called cipher text. An encryption algorithm transforms the plaintext to cipher; a decryption algorithm transforms the cipher text back to plaintext. The sender uses an encryption algorithm, and the receiver uses a decryption algorithm
These encryption and decryption algorithms are called as ciphers (categories of algorithm). One cipher can serve millions of communicating pairs.
A Key is value that the cipher, as an algorithm, operates on. To encrypt a message we need an encryption algorithm, an encryption key, and the plain text. These create the cipher text. To decrypt a message, we need a decryption algorithm, a decryption algorithm and the cipher text. So these reveal the original plaintext.
In Cryptography, the encryption/decryption algorithms are public; anyone can access them. The keys are secret. So they need to be protected.
Cryptography algorithms can be divided into two groups.
• Symmetric-key cryptography (or secret key) algorithm
• Public-key cryptography (or asymmetric key) algorithm
Symmetric–key cryptography:
The symmetric-key cryptography algorithms are so named because the same key can be used in both directions. Here, the same key is used by both sender/receiver. The sender uses this key and an encryption algorithm to encrypt data. The receiver uses the same key and a decryption algorithm to decrypt data.
In Symmetric-key cryptography, the algorithm used for decryption is the inverse of the algorithm used for encryption.
Advantages:
• Symmetric key algorithms are efficient.
• It takes less time to encrypt a message using symmetric key algorithm than to encrypt a message using a public key algorithm.
• The key is usually small.
• It is used to encrypt and decrypt long messages.
Disadvantages:
• Each pair of users must have a unique symmetric key.
For n people, n*(n-1)/2 symmetric keys are used.
Ex: For 1 million people to communicate, 500 billion symmetric keys are needed.
• The distribution of keys between two can be difficult.
TRADITIONAL CIPHER:
Ciphers that involved either substitution or transposition are referred to as traditional ciphers.
SUBSTITUTION CIPHER:
A cipher using the substitution method substitutes one symbol with another. If the symbols in the plain text are alphanumeric characters, we replace one character with another.
Ex: we replace characters A with D, B with E and so on. If symbols are digits (0 to 9), we can replace 1 with 5, 2 with 6 and so on.
Concentrating on the alphabetic characters, substitution can be categorized as either
1) Mono alphabetic or
2) Poly alphabetic substitution.
MONO ALPHABETIC SUBSTITUTION:
In this substitution, a character in the plain text is always changed to same character in the cipher text.
The first recorded cipher text is Caesar cipher. The cipher shifts each character down by three.
In the above figure, the encryption algorithm is “shift key characters down” and the decryption algorithm is “shift key characters up”. The key here is 3. The encryption and decryption algorithms are the inverses of each other and the key is same for both the algorithms.
Here, we replaced character Y with B. This can be possible not by simply adding the key to the character. Since Y=24, which means that 24+3 is 1, not 27 i.e., modulo of 26. Therefore character with value 1, B is given to Y.
In mono alphabetic substitution, a character in the plain text and a character in the cipher text is always one- one.
ADVANTAGE:
• It is very simple.
DISADVANTAGES:
• The code can be attacked easily. The reason is that method cannot hide the natural frequencies of characters in the language being used. So the attacker can easily break the code.
POLY ALPHABETIC SUBSTITUTION:
In poly alphabetic substitution, each occurrence of a character can have a different substitute. The relationship between a character in the plaintext to a character in the cipher text is one-to-many character A can be changed to D in the beginning of the text, but it could be changed to N at the middle. Let us define our key as “ take the position of the character in the text, divide the by 10, and let the remainder be the shift value.” With this scenario, the character at position 1 will be shifted one character, the character at position 2 will be shifted two characters, and the character in position 14 will be shifted four characters [14 mod 10 is 4]. An example of poly alphabetic substitution is the vigenere cipher. In one version of the cipher, the character in the cipher text is chosen from a two-dimensional table (26*26), in which each row is a permutation of 26 characters (A to Z). To change a character, the algorithm finds the character to be encrypted in the first row. It finds the position of the character in the text (mod 26) and uses it as the row number. The algorithm then replaces the character with the character found in the table.
A cipher text created by poly alphabetic substitution is harder to attack successfully than a cipher text created by mono alphabetic substitution. A good poly alphabetic substitution may smooth out the frequencies; each character in the cipher text may occur almost the same number of times. However, attacking the code is not difficult; although the encryption changes the frequencies of the characters, the character relationships are still preserved. A good trail-and-error attack can break the code.
TRANSPOSITIONAL CIPHER:
In a transpositional cipher, the characters retain their plaintext from but change their positions to create the cipher text. The text is organized into a two-dimensional table, and the columns are interchanged according to a key. For example, we can organize the plaintext into an 8-column table and then reorganize the columns according to a key that indicates the interchange rule. The key defines which columns should be swapped. Transpositional cryptography is not very secure either. The character frequencies are preserved, and the attacker can find the plaintext through trail and error.