Skip to main content

What is Cryptography?

 

What is Cryptography?



Cryptography is protecting the confidentiality and integrity of the information without being vulnerable to attackers or threats. It is an encryption technique when ensures the data is only visible to the sender and recipient and no middle man can steal the data and snoop for information.

There are three most common types of cryptographic techniques in general. They are –

  • Symmetric key cryptography Here the sender and receiver share a similar key and it can be used for both encryption and decryption.
  • Hash functions – There is no key used, rather a hash value is used to encrypt text, contents, and passwords.
  • Public key cryptography  In this two different keys such as a public key for encryption and a private key for decryption is used. Only the private key is kept as secret.


Encryption Tools and Techniques:

There are few tools available for encryption technique. They include –

  • Triple DES – Replaces Data encryption standard(DES) algorithm, uses 3 individual keys with 56 bit.
  • RSA – Public encryption algorithm to protect the data over internet. It is an asymmetric key encryption algorithm which uses public and private key.
  • Blowfish – It splits the message into 64 bits and encrypts them, is used in certain payment gateways. It is fast, effective and flexible.
  • Twofish – Keys in this algorithm are 256 bits in length and it is a symmetric key encryption technique.
  • AES – Advanced encryption standard, trusted by many standard organizations. It can encrypt is 128 bit, 192 bit as well as 256-bit.

There are five essential pieces of privacy in the internet to be maintained. They are email, file, voice, chat, and traffic privacy. Few custom software and applications are available for encryption technique, which includes –

  • LastPass – Password manager and used to generate strong and secure passwords.
  • BitLocker – Integrated in Windows OS, it is a full-disk encryption tool that uses AES for encryption.
  • Veracrypt – Similar to Bitlocker, but used in cross platforms like Windows, Linux, OS X and so on.
  • DiskCryptor – Free encryption tool, used to even hide system partitions and ISO images.
  • HTTPS Everywhere – Makes sure the websites go through an authentication process while connecting to a secure website.
  • VPN’s – Tor browser, Express VPN, Cyber ghost, and several other tools are available for VPN’s.  It is used to ensure that the web traffic and data remain encrypted.
  • Using online proxy servers we can hide the IP address and surf anonymously.

Join the best Ethical Hacking course online and give a head-start to your career as a professional Ethical Hacker!

Secure Hashing Algorithm:

A hash is a mathematical function which is used by computer since they are convenient to compute a hash. They identify, compare or run calculations against files and strings of data. Hashing algorithms are used in databases, also used to store passwords.

S.no.SHA-1SHA-2
1SHA-1 is a 160-bit hash.SHA-2 is a 256 hash.
2Developed in 1993.Developed after 2009.
3Vulnerable to brute force attacksBrute force attacks are prevented in SHA-2.

Properties of Hash function:

A hash function with the following properties is considered desirable. They include –

  • Pre-image resistance – This property is known for hard computation to reverse the hash.
  • Second pre-image resistance – This property gives input and hash and it is hard to find the same input and hash.
  • Collision resistance – This property makes it difficult to find two unique inputs of any length that result in the same hash.


Cryptography attacks:

The cryptographic attacks performed by a hacker can be either an active or passive attack. There are different methodologies of cryptographic attacks −

  • Ciphertext Only Attacks (COA) − The attacker deciphers the plain text using ciphertext. The encryption key is determined from this attack.
  • Known Plaintext Attack (KPA) − Few parts of the plain text are known, the remaining few parts are deciphered using ciphertext.
  • Chosen Plaintext Attack (CPA) − The choice of the plain word is chosen by the attacker itself. RSA is vulnerable to this type of attack.
  • Brute Force Attack (BFA) − A long process where the attacker tries to decrypt all the possible combinations of the key.
  • Birthday Attack − Variant of brute force, used against hash function.
  • Side Channel Attack (SCA) − Used to find the vulnerabilities and exploit the system.
  • Timing Attacks − They try to find the duration of the encryption to find the strength of the encryption.
  • Power Analysis Attacks − They try and find the power consumption used to encrypt the system.

Comments

Popular posts from this blog

Data Structure Multiple Choice Questions and Answers

  Data Structure Multiple Choice Questions and Answers Our 1000+ multiple choice questions and answers (MCQs) on "Data Structure - I" (along with 1000+ MCQs on "Data Structure - II (Algorithms)") focus on all areas of Data Structure covering 200+ topics. One can read MCQs on Data Structure - II (Algorithms)                 Array and Array Operations This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Array and Array Operations”. 1. Which of these best describes an array? a) A data structure that shows a hierarchical behavior b) Container of objects of similar types c) Arrays are immutable once initialised d) Array is not a data structure View Answer Answer: b Explanation: Array contains elements only of the same type. 2. How do you initialize an array in C? a) int arr[3] = (1,2,3); b) int arr(3) = {1,2,3}; c) int arr[3] = {1,2,3}; d) int arr(3) = (1,2,3); View Answer Answer: c Explanation: This is the syntax to initialize an array i

HackerRank Tuples Solution in Python

  HackerRank Tuples Solution in Python Task Given an integer,n, and n  space-separated integers as input, create a tuple, t, of those n integers. Then compute and print the result of hash(t). Note:   hash()  is one of the functions in the  __builtins__  module, so it need not be imported. Input Format The first line contains an integer,n, denoting the number of elements in the tuple. The second line contains n space-separated integers describing the elements in tuple t . Output Format Print the result of  hash(t) . Sample Input 0 2 1 2 Sample OUTPUT- 3713081631934410656 n = int(input()) int_list = [int(i) for i in input().split()] int_tuple = tuple(int_list) print(hash(int_tuple))