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

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))

How to check if the given number is Even or odd-

1. How to check if the given number is Even or odd- We can determine whether a number is even or odd. This can be tested using different methods. The test can be done using simple methods such as testing the number’s divisibility by 2. If the remainder is zero, the number is even. If the remainder is not zero, then the number is odd. The following algorithm describes how a C program can test if a number is even or odd. CODE:- #include <stdio.h> int   main () { int num;//variable declaration printf("Enter any num: ");// take input from user  scanf("%d",&num);// declare input if(num%2==0) { printf("The num %d is even",num); } else { printf("The num %d is odd",num); } return 0; }     ALGORITHM:- Step 1.   Start Step 2 .   Enter a number. Step 3.   If...

Binary to Decimal conversion program

  3. Binary to Decimal conversion program using C language:- The C program converts binary number to decimal number that is equivalent. A decimal number can be attained by multiplying every digit of binary digit with a power of 2 and totaling each multiplication outcome. The power of the integer starts from 0 and counts to n-1 where n is assumed as the overall number of integers in a binary number. Ex:-   ( 101100001 ) 2 =( 353 )10                                                  ALGORITHMS:- Step 1:  Start Step 3:  The user is asked to enter a binary number as an input Step 4:  Store the quotient and remainder of the binary number in the variable rem Step 5:  Multiply every digit of the entered binary number beginning from the last with the powers of 2 correspondingly Step 6:  Repeat the above step...