Cryptography is responsible of taking text or a file, known as plaintext, and convert it to ciphertext so that only authorized people know how to turn it back into plaintext.

Encryptation definition:

Encryptation definition:

C = E (P, Ke)

where:

C = ciphertext

E = encryption algorithm (function)

P = plaintext

Ke = encryption key

Ciphertext is obtained by using the encryption algorithm E, with the plaintext P and the encryption key (secret) Ke as parameters.

Kerckhoffs’s principle states that all the algorithms must be publics and the secret must be only in the keys.

Decryption definition:

P = D (C, Kd)

where:

D = Decryption algorithm

Kd = decryption key

To obtain the plaintext P from ciphertext C and the decryption key Kd you have to run the decryption algorithm D and the decryption key Kd as parameters.

**Secret-key Cryptography (symmetric encryption)**

An algorithm in which each letter is replaced by a different letter. For example, all As are replaced by Zs, all Bs by Ys, all Cs by Xs and so on.

Plaintext: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Ciphertext: Z Y X W V U T S R Q P O N M L K J I H G F E D C B A

This system is called monoalphabetic sustitution, where the key is the string of 26-letters alphabet. In the above example the encryption key is ZYXWVUTSRQPONMLKJIHFEDCBA, the plaintext HELLO would become the ciphertext SVOOL.

Advantages:

- High speed

- The size of the message decreases

- High speed

- The size of the message decreases

Disadvantages

- It is necessary that the receiver knows the decryption key

- It is necessary that the receiver knows the decryption key

- Is not possible use unsafe media for keys communication.

Uses different keys for encryption and decryption, and if you choose a good encryption key is almost impossible to find the decryption key.

This cryptography works so that everyone chooses a pair (public key, private key) and publish the public key which is the encryption key and the private key is the decryption key. To post a message, someone encrypts the message with the recipient’s public key, only the recipient has the private key so he is the only one who can decrypt the message.

**Public-key cryptography (Asymmetric encryption)**

Uses different keys for encryption and decryption, and if you choose a good encryption key is almost impossible to find the decryption key.

This cryptography works so that everyone chooses a pair (public key, private key) and publish the public key which is the encryption key and the private key is the decryption key. To post a message, someone encrypts the message with the recipient’s public key, only the recipient has the private key so he is the only one who can decrypt the message.

Provides

- Confidentiality
- Integrity

- Authentication
- Digital Signature

Here we add some pseudocode of how this can work

a = “xxx”; b = encrypt_algorithm ke = encrypt_key t_ecrypt = b ( a, ke) t_encrypt = send ( ) receive ( t_encrypt) kd = decrypt_key if (kd == true){ t_decrypt = b (t_encrypt, kd) a = t_decrypt } else { print “you need the key to decrypt” }

References

Operating systems (Andrew S. Tanenbaum)

+1 N3T

ResponderEliminarWhat are the main types of cryptography schemes ? What type of applications do make use of this method ? What is the logic used behind converting the text into cipher text ? The above information just gave me a basic idea about this process but I wish to learn more about it.

ResponderEliminardigital signature software