Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
What is Cryptography?
3.
Types of Cryptography
3.1.
Private Key or Symmetric Key Cryptography
3.2.
Public Key or Asymmetric Key Cryptography
3.3.
Hash Functions
4.
Why to Use Cryptography?
4.1.
Confidentiality
4.2.
Authentication
4.3.
Integrity
4.4.
Non-Repudiation
5.
Frequently Asked Questions
5.1.
What is cryptography?
5.2.
Name some cryptography algorithms.
5.3.
Can someone hack encrypted data?
5.4.
Why is encryption important?
5.5.
What are the main goals of cryptography?
6.
Conclusion
Last Updated: Mar 27, 2024

What is Cryptography and Why Do We Use It?

Author Ayushi Goyal
0 upvote

Introduction

In this growing business world, secure communication is essential. It is required to safeguard data from unauthorized access. Cryptography helps protect sensitive data by encrypting it.

Introduction

In the article, we will discuss what cryptography is and why do we use it. We will also explore features and different types of cryptography methods.

What is Cryptography?

Cryptography is the art of securing Data and Information. It helps transform data in a form that an unauthorized recipient cannot understand. In cryptography, a human-readable message is known as plaintext. This plaintext goes through a series of mathematical operations. After that, it is transferred into an encrypted text known as ciphertext. In cryptography, this whole process is known as encryption. This is how we use cryptography to send information to the world. 

About Cryptography

Cryptographic systems need some method to encrypt and decrypt the message. Let's discuss different types of cryptography.

Types of Cryptography

There are three main types of cryptography techniques:

Types of Cryptography

Private Key or Symmetric Key Cryptography

In this type, the sender and receiver use a standard key to encrypt and decrypt messages. The symmetric key Cryptography technique is faster and simpler. In this, the problem is the exchange of keys securely. Types of public key cryptography algorithms are:
 

Stream Ciphers: It works on a single bit or byte at any time. These ciphers work on substitution techniques. Stream ciphers are faster than block ciphers. 
 

Block Ciphers: They work on a fixed-size block of data simultaneously. The message is broken down into a number of blocks, and each block is treated separately.

Public Key or Asymmetric Key Cryptography

This type of technique uses a different pair of keys to encrypt and decrypt messages. A public key for encryption and a private key for decryption. Even though everyone knows the public key, only authorized users can decode it. The person who knows the private key is the only authorized one. Some of the common public key cryptography algorithms are:

RSA: It is abbreviated after the names of its mathematician developers Rivest, Adi Shamir, and Leonard Adleman. It is used to encrypt data and digital signatures. It uses a large number of prime numbers for encrypting, making it tough to break. 
 

DSA: It is abbreviated as Digital Signature Algorithm. It was introduced in 1991. It uses electronic signatures for message authentication. It is based on discrete logarithms and modular exponentiation. 

Hash Functions

No key is used in the hash function algorithm. It gives a hash value of fixed length as output. Many operating systems also use hash functions to encrypt passwords.

Why to Use Cryptography?

Cryptography is widely used for protecting data to prevent cybercrime. The reason why to use cryptography is the main feature of cryptography. These are:

Confidentiality

Confidentiality

Confidentiality requires information to be secured from unauthorized access. This is achieved by encrypting data using only a key known to the sender and receiver. Various cryptographic algorithms are used to encrypt the data to maintain confidentiality policy. 

Authentication

Authentication

From the message, the receiver should be able to verify the sender's identity, origin, or path. Authentication also involves validating recipient expectations by the sender. After authentication from both sender's and the receiver's side, further communication can begin.  

Integrity

Integrity

Integrity refers to the quality of honestness that the message sent and received is the same. Integrity policy ensures that the data is not altered during transmission. This helps prevent adding malicious information. It's vital to ensure that any message sent is not modified in any way.

Non-Repudiation

Non-Repudiation

This policy is widely used in information security. This helps in validating message origin and integrity. Non-repudiation ensures that the recipients won't deny validating any information. This policy is like signing a legal document or a contract using digital signatures. 

We already discussed what is cryptography and, why to use cryptography?. Let's now discuss some frequently asked questions related to our topic.

Frequently Asked Questions

What is cryptography?

Cryptography is the process of coding data or information. Only intended users can understand or decode the encrypted data. 

Name some cryptography algorithms.

AES(Advanced Encryption Standard), DES(Data Encryption Standard), Blowfish, and RSA(Rivest-Shamir-Adleman) are some of the most used cryptography algorithms.

Can someone hack encrypted data?

Yes, attackers can hack encrypted data. However, depending on the encryption level applied, the difficulty level increased.

Why is encryption important?

It aims at protecting private and sensitive data. It also helps in the security of communication between client and servers.

What are the main goals of cryptography?

Confidentiality, integrity, authentication, and non-repudiation are the four main goals of cryptography.

Conclusion

In this blog, we discussed what is cryptography and why to use cryptography. We also explored the main types and features of cryptography. 

For more information on cryptography, you may refer to the following articles-

Refer to our guided paths on Coding Ninjas Studio to learn more about DSA, Competitive Programming, JavaScript, System Design, etc. Enroll in our courses and refer to the mock test and problems available. Take a look at the interview experiences and interview bundle for placement preparations.

Happy Coding! 

Live masterclass