Now-a-days, the computer network has changed the mode of people's communication. People can easily transfer the various information through the network. However, because of the openness of the network, people have to take more and more attention on security and confidentiality of information. Data encryption is widely use to ensure security of the data. So encryption implies a way or procedure to hide some secrets by either applying some mathematical or logical functions to a plain text to produce a text that will be difficult for some outsider to decrypt.