In brief encryption is the process of encoding plain text messages to a form that cannot be easily understood by unauthorized people. Simply conversion of data into a form , this form called Ciphertext . Encryption is an old art used in ancient wars to secret information in the case of the capture of the messenger.
One of the most famous Ciphertext is message to Julius ( Caesar of Rome)
the story of this message doesn’t matter
The decryption algorithm is very simple. It is to take each character and shift it five character up in English alphabet.. So easy isn’t it?
then, divide it into words >> “enemy falling back breakthrough imminent Lucius”.
Note : it is odd that a message to a Roman general would have been written in English.
when shifting by 13 character up or down is called ROT13[Caesar cipher technique].
Computer encryption is based on the science of cryptography ,where the main goal is to keep information “secret” , there are two main types of encryption : symmetric encryption and asymmetric.
Is also called secret key encryption. Each computer has a code used to encrypt the information before sending it via the internet to the other computer. This process requires that the sender and the receiver have encryption key , the same key for encrypting and for decryption.
It also has 2 types: Stream ciphers encrypt the bits of a message one at a time like RC4 algorithm, Blocking ciphers take a chunk of bits and encrypt them as a single unit like AES algorithm.
- Simple: easy to carry out.
- Fast: Symmetric key encryption is much faster than public key encryption, often by 100 to 1,000 times.
- Uses less computer resources.
- Need for secure channel for secret key exchange.
- Too many keys that has to generate a different key for each process.
called public-key encryption. more secure than the secret key encryption. this type uses two keys, a private key and a public key for encryption and decryption. The public key is available to all which can encrypt the message by it, unlike the private key which is with the receiver of Ciphertext and used to decrypt it.
- comfort that the private key is only known by the owner and a public key is available to everyone.
- Slow: Public key encryption is slow compared to symmetric encryption.
- Uses more resources.
- Loss of private key may be irreparable.
Differs from encryption [ encrypt and then decrypt ] is to convert a message into irreversible value that can’t be back to the original message. Mostly called one way encryption.
hashing used to verify data. we can use hashing algorithms like Message Digest 5 (MD5) and Secure Hashing Algorithm (SHA).
on a Linux
$ echo -n CATreloaded team | md5sum
$ echo -n CATreloaded team | sha1sum
and also used in password verification, verifying the integrity of files or messages and Pseudo random generation and key derivation.
A wild example for hash cracking is iCrackHash which is a search engine for hashes and passwords, it detects the hash type in a simple way. https://github.com/lnxg33k/iCrackHash .