0% found this document useful (0 votes)
1 views5 pages

Cryptography

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 5

Cryptography and its Types

1. 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).
2. 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.
3. 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.

Features Of Cryptography are as follows:


4. Confidentiality:
Information can only be accessed by the person for whom it is intended and no other
person except him can access it.
5. Integrity:
Information cannot be modified in storage or transition between sender and intended
receiver without any addition to information being detected.
6. Non-repudiation:
The creator/sender of information cannot deny his or her intention to send
information at later stage.
7. Authentication:
The identities of sender and receiver are confirmed. As well as destination/origin of
information is confirmed.

Image Steganography in Cryptography


The word Steganography is derived from two Greek words- ‘stegos’ meaning ‘to cover’ and
‘grayfia’, meaning ‘writing’, thus translating to ‘covered writing’, or ‘hidden writing’.
Steganography is a method of hiding secret data, by embedding it into an audio, video, image
or text file. It is one of the methods employed to protect secret or sensitive data from malicious
attacks.

DNA Cryptography
Cryptography is the branch of science which deals with the encoding of information for the
purpose of hiding messages. It plays a vital role in the infrastructure of communication security.

One Time Password (OTP) algorithm in Cryptography


Authentication, the process of identifying and validating an individual is the rudimentary step
before granting access to any protected service (such as a personal account).
The two main methods for delivery of the OTP is:

8. SMS Based:
This is quite straightforward. It is the standard procedure for delivering the OTP via a
text message after regular authentication is successful. Here, the OTP is generated on
the server side and delivered to the authenticator via text message. It is the most
common method of OTP delivery that is encountered across services.
9. Application Based:
This method of OTP generation is done on the user side using a specific smartphone
application that scans a QR code on the screen. The application is responsible for the
unique OTP digits. This reduces wait time for the OTP as well as reduces security risk
as compared to the SMS based delivery.

The most common way for the generation of OTP defined by The Initiative For Open
Authentication (OATH) is the Time Based One Time Passwords (TOTP), which is a Time
Synchronized OTP. In these OTP systems, time is the cardinal factor to generate the unique
password.

Time Based One Time Passwords (TOTP)


The code generated is 20 bytes long and is thus truncated to the desired length suitable for the
user to enter. Here dynamic truncation is used. For the 20-byte code
“0215a7d8c15b492e21116482b6d34fc4e1a9f6ba”, each character occupies 4 bits. The entire
string is taken as 20 individual one byte sting. We look at the last character, here a. The decimal
value of which is taken to determine the offset from which to begin truncation. Starting from
the offset value, 10 the next 31 bits are read to obtain the string “6482b6d3″. The last thing left
to do, is to take our hexadecimal numerical value, and convert it to decimal, which gives
1686288083.

Shamir’s Secret Sharing Algorithm | Cryptography


Cryptography is a technique of securing information and communications through the use of
codes so that only those people for whom the information is intended can understand it and
process it. Thus, preventing unauthorized access to information.

For example: Let the secret code S = 65, N = 4, K = 2.


10. Initially, in order to encrypt the secret code, we build a polynomial of degree (K – 1).
11. Therefore, let the polynomial be y = a + bx. Here, the constant part ‘a’ is our secret
code.
12. Let b be any random number, say b = 15.
13. Therefore, for this polynomial y = 65 + 15x, we generate N = 4 points from it.
14. Let those 4 points be (1, 80), (2, 95), (3, 110), (4, 125). Clearly, we can generate the
initial polynomial from any two of these 4 points and in the resulting polynomial, the
constant term a is the required secret code.

In order to reconstruct the given polynomial back, the Lagrange basis Polynomial is used.

Knapsack Encryption Algorithm in Cryptography


Knapsack Encryption Algorithm is the first general public key cryptography algorithm. It is
developed by Ralph Merkle and Mertin Hellman in 1978. As it is a Public key cryptography, it
needs two different keys.
For the easy knapsack, we will choose a Super Increasing knapsack problem. Super increasing
knapsack is a sequence in which every next term is greater than the sum of all preceding terms.

Example –
{1, 2, 4, 10, 20, 40} is a super increasing as1<2, 1+2<4, 1+2+4<10,
1+2+4+10<20 and 1+2+4+10+20<40.

Symmetric Encryption Cryptography in Java


Cryptography is the study of different techniques to secure data from an unauthorized entity. In
computer science, we try to develop strategies and practices for protecting sensitive data.
Before getting into the concept, lets first understand a few key terms involved in cryptography.
They are:

• Plain text: The plain text is the original message or data that is hidden from view
through a cryptographic encryption algorithm.
• Cipher text: It is the output of Encryption operation when given key and plain text. It is
also the data fed to a Decryption function.
• Key: The key is a piece of data or correlated pair of data when input with plain text into
an encryption function yields ciphertext. The key must be secured as the algorithm is
publicly available.
• Salt: A salt is a random piece of data when added to a hashing function, provides even
more entropy in the output, making attacks to happen less likely. A good cryptographic
hash should always use salt.

Asymmetric Encryption Cryptography in Java


Cryptography is the study of different techniques to secure data from an unauthorized entity. In
computer science, we try to develop strategies and practices for protecting sensitive data.
Asymmetric Encryption also called as private/public key Encryption is a mathematical relation
between two keys, one for encryption and the other for decryption.
For example,
if there are two keys “K1” and “K2”, then if key “K1” is used for encryption and “K2” is used for
decryption. If “K1” is used for decryption, then “K2” is used for encryption.

You might also like