Cryptography is derived from the Greek words: kryptós, "hidden", and gráphein, "to write" - or "hidden writing". Cryptography is the science of using mathematics to encrypt and decrypt data. Cryptography enables you to store sensitive information or transmit it across insecure networks (like the Internet) so that it cannot be read by anyone except the intended recipient. While cryptography is the science of securing data, cryptanalysis is the science of analyzing and breaking secure communication. Classical cryptanalysis involves an interesting combination of analytical reasoning, application of mathematical tools, pattern finding, patience, determination, and luck. Cryptanalysts are also called attackers. Cryptology embraces both cryptography and cryptanalysis.

Encryption and Decryption

Plain-text and Cipher-text

The original message, before being transformed, is called plaintext. After the message is transformed, it is called ciphertext. An encryption algorithm transforms the plain text into cipher text; a decryption algorithm transforms the cipher text back into plain- text. The sender uses an encryption algorithm, and the receiver uses a decryption algorithm.


We refer to encryption and decryption algorithms as ciphers. The term cipher is also used to refer to different categories of algorithms in cryptography. This is not to say that every sender-receiver pair needs its very own unique cipher for secure communication. On the contrary, one cipher can serve millions of communicating pairs.


A key is a number (or a set of numbers) 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 ciphertext. To decrypt a message, we need a decryption algorithm, a decryption key, and the cipher text. These reveal the original plain text.


Symmetric-key Cryptography

In conventional cryptography, also called secret-key or symmetric-key encryption, one key is used both for encryption and decryption. The Data Encryption Standard (DES) is an example of a conventional cryptosystem that is widely employed by the Federal Government. The figure below shows an illustration of the conventional encryption process.


Conventional encryption has benefits. It is very fast. It is especially useful for encrypting data that is not going anywhere. However, conventional encryption alone as a means for transmitting   secure   data   can   be   quite expensive simply due to the difficulty of secure key distribution.

For a sender and recipient to communicate securely using conventional encryption, they must agree upon a key and keep it a secret between themselves. If they are in different physical locations, they must trust a courier, the Bat Phone, or some other secure communication medium to prevent the disclosure of the secret key during transmission. Anyone who overhears or intercepts the key in transit can later read, modify, and forge all information encrypted or authenticated with that key.

Asymmetric-Key Cryptography

Public key cryptography is an asymmetric scheme that uses a pair of keys for encryption: a public key, which encrypts data, and a corresponding private, or secret key for decryption. You publish your public key to the world while keeping your private key secret. Anyone with a copy of your public key can then encrypt information that only you can read. It is computationally infeasible to deduce the private key from the public key. Anyone who has a public key can encrypt information but cannot decrypt it. Only the person who has the corresponding private key can decrypt the information.


The Essential steps in Asymmetric-key cryptography are the following:

  1. Each user generates a pair of keys to be used for the encryption and decryption of messages.
  2. Each user places one of the keys in a public register or other accessible files. This is the public key. The companion key is kept private. Each user maintains a collection of public keys obtained from others 
  3. If Bob wishes to send a private message to Alice, Bob encrypts the message using Alice's public key
  4. When Alice receives the message, she decrypts it using her private key. No other recipient can decrypt the message because only Alice knows Alice's private key.

With this approach, all the participants have access to public keys, and private keys are generated locally by each participant and therefore need never be distributed. As long as a user protects his or her private key, incoming communication is secure. At any time, a user changes the private key and publishes the companion public key to replace the old public key.