https://[Log in to view URL]

Cryptography is technique of securing information and communications through use
of codes so that only those person for whom the information is intended can
understand it and process it. Thus preventing unauthorized access to information. 
The prefix “crypt” means “hidden” and suffix graphy means “writing”.

In Cryptography the techniques which are use to protect information are obtained
from mathematical concepts and a set of rule based calculations known as algorithms 
to convert messages in ways that make it hard to decode it. These algorithms are
used for cryptographic key generation, digital signing, verification to protect
data privacy, web browsing on internet and to protect confidential transactions
such as credit card and debit card transactions.

Techniques used For Cryptography:
In today’s age of computers cryptography is often associated with the process where
an ordinary plain text is converted to cipher text which is the text made such that
intended receiver of the text can only decode it and hence this process is known as
encryption. The process of conversion of cipher text to plain text this is known as
decryption.


Confidentiality:
Information can only be accessed by the person for whom it is intended and no 
other person except him can access it.

Integrity:
Information cannot be modified in storage or transition between sender and intended
receiver without any addition to information being detected.

Non-repudiation:
The creator/sender of information cannot deny his intention to send information
at later stage.

Authentication:
The identities of sender and receiver are confirmed. As well as destination/origin
of information is confirmed.

Types Of Cryptography:
In general there are three types Of cryptography:


Symmetric Key Cryptography:
It is an encryption system where the sender and receiver of message use a single
common key to encrypt and decrypt messages. Symmetric Key Systems are faster and
simpler but the problem is that sender and receiver have to somehow exchange key
in a secure manner. The most popular symmetric key cryptography system is Data
Encryption System(DES).

Hash Functions:
There is no usage of any key in this algorithm. A hash value with fixed length is
calculated as per the plain text which makes it impossible for contents of plain
text to be recovered. Many operating systems use hash functions to encrypt 
passwords.

Asymmetric Key Cryptography:
Under this system a pair of keys is used to encrypt and decrypt information.
A public key is used for encryption and a private key is used for decryption.
Public key and Private Key are different. Even if the public key is known by
everyone the intended receiver can only decode it because he alone knows the
private key.

Feature	        Hash functions	Symmetric algorithms	Asymmetric algorithms

Number of Keys	    0	                1	                    2

Length of keys 
recommended by NIST	256 bits	    128 bits	            2048 bits

Example	        SHA-256, SHA3-256, 	AES or 3DES         	RSA, DSA, ECC
                    SHA-512
                    
SHA-1 or Secure Hash Algorithm 1 is a cryptographic hash function which takes an
input and produces a 160-bit (20-byte) hash value. This hash value is known as 
a message digest. This message digest is usually then rendered as a hexadecimal 
number which is 40 digits long. It is a U.S. Federal Information Processing
Standard and was designed by the United States National Security Agency. 
SHA-1 is now considered insecure since 2005. Major tech giants browsers like
Microsoft, Google, Apple and Mozilla have stopped accepting SHA-1 SSL certificates
by 2017. To calculate cryptographic hashing value in Java, MessageDigest Class is 
used, under the package java.security. MessageDigest Class provides following
cryptographic hash function to find hash value of a text as follows:

MD2
MD5
SHA-1
SHA-224
SHA-256
SHA-384
SHA-512

These algorithms are initialized in static method called getInstance().
After selecting the algorithm the message digest value is calculated and the
results are returned as a byte array. BigInteger class is used, to convert the
resultant byte array into its signum representation. This representation is then 
converted into a hexadecimal format to get the expected MessageDigest. Examples:

Input : hello world 
Output : 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed
Input : GeeksForGeeks 
Output : addf120b430021c36c232c99ef8d926aea2acd6b


Advanced Encryption Standard (AES) is a specification for the encryption of 
electronic data established by the U.S National Institute of Standards and 
Technology (NIST) in 2001. AES is widely used today as it is a much stronger 
than DES and triple DES despite being harder to implement.
for more information connect down
https://[Log in to view URL]


RSA algorithm is an asymmetric cryptography algorithm. Asymmetric actually means
that it works on two different keys i.e. Public Key and Private Key. As the name
describes that the Public Key is given to everyone and the Private key is kept
private.

An example of asymmetric cryptography : 

A client (for example browser) sends its public key to the server and requests
some data.
The server encrypts the data using the client’s public key and sends the encrypted
data.
The client receives this data and decrypts it.
Since this is asymmetric, nobody else except the browser can decrypt the
data even if a third party has the public key of the browser.

The idea! The idea of RSA is based on the fact that it is difficult to factorize
a large integer. The public key consists of two numbers where one number is a 
multiplication of two large prime numbers. And private key is also derived from 
the same two prime numbers. So if somebody can factorize the large number, the 
private key is compromised. Therefore encryption strength totally lies on the key
size and if we double or triple the key size, the strength of encryption increases
exponentially. RSA keys can be typically 1024 or 2048 bits long, but experts
believe that 1024-bit keys could be broken in the near future. But till now it
seems to be an infeasible task.

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: