# Cryptography

Cryptography is the science and art of encoding and decoding data in order to attribute the properties of secrecy to the data. The data to be encoded is termed as plain text. The encoded data is known as cipher text. Thus, the process of encoding and decoding can also be termed as encryption and decryption respectively. The system for encrypting or decrypting is called a Cryptosystem and the persons who design such systems are classified as Cryptanalysis deals with the techniques of breaking the codes in order to extract the plaintext from the cipher without the consent of the sender or recipient. The persons who are adept at cryptanalysis are called as The essence of using cryptography in this world is to validate the following three conditions: - Secrecy: The data transmitted must be secret and any eavesdropper should not be able to understand it.
- Authenticity: The recipient must be guaranteed that the transmitted data is from an authentic sender and is not from any other person.
- Integrity: The transmitted data must be tamper resistant and any eavesdropper should not be able to meddle with the cipher.
The security of a cryptographic algorithm Classification of cryptographic algorithms - Symmetric Algorithms
- Block algorithms: These algorithms operate on a block of data each time in order to convert it into a block cipher. A typical block size would be 64 bytes.
- Stream algorithms: These algorithms operate on a stream of data at a single bit or a single byte at a time.
- Asymmetric Algorithms
Symmetric algorithms, are those where the encryption key and the decryption key are the same or are calculated from each other. If the algorithm uses a single key for both encryption and decryption, then it is called as a single-key algorithm. Asymmetric algorithms are those that use different keys for encryption and decryption and one key cannot be computed from the other key. They are also called public-key algorithms due to the fact that the encryption key can be made public. The recipient has the private key with which only she can decrypt the cipher. Building Blocks of an Algorithm The basic building blocks of an algorithm consist of activities such as: - Substitution Cipher:
- Transposition Cipher:
- Exclusive-OR Cipher:
This is a cipher where each character of the plain text is substituted for a preconceived cipher character. Substitution falls under the confusion scheme with the purpose of frustrating the eavesdropper. This is a cipher where the order of the characters of a fixed block plain text is shuffled in a predetermined fashion. Transposition falls under the diffusion scheme, which removes the redundancies in the cipher. This is a cipher formed by a simple bit-wise XOR operation on the plain text and the keyword. Key Length A bruteforce attack should be made as complex as possible. This is achieved by increasing the length of the key. If the key size is 60 bits, then there are 264 possible keys, which would require considerable processing time in order to test all the keys. If the key size is increased to 128 bits, then the number of possible keys is 2128 and this huge figure makes it very difficult to find the right key. As technology grows, computing power also increases. Therefore, care must be taken to consider the technological growth and the key-size should be aptly decided so that the algorithm will remain strong into the future. --NEXT--> Algorithm Modes |