Monday, February 3, 2020

Methods of Encryption


Symmetric Cryptography

In symmetric encryption, sender and receiver use two instances of the same key for encryption and decryption. Symmetric keys are also called "secret" keys, because those keys should be kept private and secret by both receiver and sender. If this key is stolen by malicious people, than messages can be decrypted.

Strong sides of symmetric cryptography is being fast. But there are bunch of negative sides of symmetric cryptography, It requires a secure way of delivering keys between sender and receiver. Each pair of users need a unique key and it becomes difficult to manage enormous number of keys.
It provides confidentiality but not authenticity and non-repudiation.

DES, 3DES, Blowfish, RC4 and AES are examples of symmetric cryptography.

Asymmetric Cryptography

In asymmetric cryptography each side has different set of keys which are public key and private key. Message is encrypted with one key and decrypted with another key. It is not possible to encrypt and decrypt with the same key.

User A can encrypt message using his/her own private key and User B can decrypt the message with User A's public key. In that case User B will be sure that this message is coming from User A. This provides authentication.

If confidentiality is very important, than User A can encrypt the message with User B's public key and User B decrypts it with using own private key. In that case only User B can decrypt the message because only he/she has his/her own private key.

It is important to understand that both public and private keys can be used both for encryption and decryption.

Strong sides of asymmetric encryption are that having a better key distribution system compared to symmetric systems and also ability to provide confidentiality, non-repudiation and authentication.

Of course it also has some weaknesses such as being slow becuase it includes mathematically much more intensive tasks.

RSA, ECC, Diffie-Hellma, El Gamal, DSA(Digital Signature Algorithm) are examples of asymmetric encryption.

TLS/SSL Vulnerabilities

POODLE:  The SSL 3.0 vulnerability is in the Cipher Block Chaining (CBC) mode. Block ciphers require blocks of fixed length. If data in th...