12-07-2013, 12:50 PM
ENCRYTION/ DECRYPTION ALGORITHM
ENCRYTION DECRYPTION.doc (Size: 129.5 KB / Downloads: 16)
INTRODUCTION
Encryption is the process of transforming plaintext data into ciphertext in order to conceal its meaning and so preventing any unauthorized recipient from retrieving the original data. Hence, encryption is mainly used to ensure secrecy. Companies usually encrypt their data before transmission to ensure that the data is secure during transit. The encrypted data is sent over the public network and is decrypted by the intended recipient. Encryption work by running the data (represented as numbers) through a special encryption formula (called a key). Both the sender and the receiver know this key which may be used to encrypt and decrypt the data.
HOW ENCRYPTION WORKS
The encryption process involves taking each character of data and comparing it against a key. For example, one could encrypt the string “THE SKY IS HIGH” of data in any number of ways, for example, one may use a simple letter-number method.
In this method, each letter in the alphabet corresponds to a particular number. If one uses a straight alphabetic to number encryption(A=1,B=2,C=3), this data is translated into the following numbers: 20 8 5 19 11 25 9 19 8 9 7 8. This series of numbers is then transmitted over a network, and the receiver can decrypt the string using the same key in reverse. From left to right, the number 20 translates to the letter T, 8 to H, 5 to E, and so on. Eventually, the receiver gets the entire message: “THE SKY IS HIGH”. shows public key– encrypted communication between two units, User X and User Y.
METHODS OF ENCRYPTION
There are a variety of different types of encryption methods, they can be classified according to the way in which the plaintext is processed, or according to the type of operations used for transforming plaintext to ciphertext.
Basically the two methods of producing ciphertext are stream cipher and block cipher.The two methods are similar except for the amount of data each encrypts on each pass..
DECRYPTION
A decryption device that decrypts a ciphertext outputted from an encryption device, comprising: data receiving means for receiving the ciphertext, first verification data, and second verification data that have been outputted from the encryption device, wherein the ciphertext is generated by encrypting a plaintext using a predetermined encryption algorithm, wherein the first verification data is generated by performing a first message digest algorithm for the plaintext.
The second verification data is generated by performing a second message digest algorithm for the ciphertext; decryption means for decrypting the received ciphertext using a decryption algorithm that decrypts ciphertexts encrypted by the predetermined encryption algorithm to generate a decrypted plaintext.
RC4 ALGORITHM
RC4 is a stream cipher, symmetric key algorithm.This algorithm produces a stream of pseudo-random values. The input stream is XORed with these values, bit by bit. The encryption and decryption process is the same as the data stream is simply XORed with the generated key sequence. If it is fed in an encrypted message, it will produce the decrypted message output . The RC4 encryption algorithm is shown in Fig