Encryption and Decryption

As a web developer or programmer, one must get acquaintance with encryption. Encryption is the process of converting information so the information can only be read by the intended recipient and incomprehensible to anyone or in the other words, you make a new code to cover the real information which makes the information becomes private to be understood. The opposite action of encryption is decryption. Decryption is the process of transforming encrypted information so that it is intelligible again. A cryptographic algorithm, also called a cipher, is a mathematical function used for encryption or decryption. In most cases, two related functions are employed, one for encryption and the other for decryption.

The ability to keep information encrypted is not depended on the cryptographic algorithm; however it is because of a number called a key that must be used with the algorithm, in order to produce an encrypted result or to decrypt previously encrypted information. It will be difficult to decrypt some information without having the correct key. In fact, it can be impossible to decrypt without any correct key.

There are two types of key encryption, symmetric-Key Encryption and public-Key Encryption.

Symmetric-Key Encryption

Encryption key can be calculated from the decryption key and vice versa with symmetric-key encryption. The same key is used for both encryption and decryption with most symmetric algorithms. By using key encryption, users do not need to experience any significant time delay as implementations of symmetric-key encryption can be highly efficient.

There is also a degree of authentication which causes symmetric key cannot be decrypted by other symmetric key. It is important to be remembered that symmetric key encryption will be effective only if the symmetric key is kept secret by the two parties involved, the confidentially and authentication of your information can be called into doubt if there is another party figures out of the key. People who can decrypt the message can send information as if they came from one of the two parties who were originally using the key. Symmetric-key encryption is widely used for authentication, tamper detection, and encryption over TCP/IP networks.

Public-Key Encryption

Public-key encryption requires a pair of keys-a public key and a private key-associated with an entity that needs to authenticate its identity electronically or to sign or encrypt data. Each public key is published, and the corresponding private key is kept secret.  The only way to encrypt your data is through your private key only. In general, to send encrypted data to someone, you encrypt the data with that person’s public key, and the person receiving the encrypted data decrypts it with the corresponding private key.

Public key encryption is usually not suitable for large amounts for data since public-key encryption requires more computation compared with symmetric-key encryption. However, it’s possible to use public-key encryption to send a symmetric key, which can then be used to encrypt additional data. This is the approach used by the SSL protocol.

Mario:
Related Post