Data Encryption and Compression Unit-2
Data Encryption and Compression Unit-2
Asymmetric key encryption is an encryption technique using a pair of public and private keys
to encrypt and decrypt plain-text and cipher-text correspondingly when communicating.
Comparatively, asymmetric key encryption takes longer time than symmetric key encryption.
It is also called public-key cryptography. Here, public keys are public and published and
shared widely with everyone.
.
No. Linear Cryptanalysis Differential Cryptanalysis
RSA algorithm is a public key encryption technique and is considered as the most secure way
of encryption. It was invented by Rivest, Shamir and Adleman in year 1978 and hence
name RSA algorithm.
Algorithm
The RSA algorithm holds the following features −
● RSA algorithm is a popular exponentiation in a finite field over integers including
prime numbers.
● The integers used by this method are sufficiently large making it difficult to solve.
● There are two sets of keys in this algorithm: private key and public key.
You will have to go through the following steps to work on RSA algorithm −
Step 1: Generate the RSA modulus
The initial procedure begins with selection of two prime numbers namely p and q, and then
calculating their product N, as shown −
N=p*q
Here, let N be the specified large number.
Step 2: Derived Number (e)
Consider number e as a derived number which should be greater than 1 and less than (p-1)
and (q-1). The primary condition will be that there should be no common factor of (p-1) and
(q-1) except 1
Step 3: Public key
The specified pair of numbers n and e forms the RSA public key and it is made public.
Step 4: Private Key
Private Key d is calculated from the numbers p, q and e. The mathematical relationship
between the numbers is as follows −
ed = 1 mod (p-1) (q-1)
The above formula is the basic formula for Extended Euclidean Algorithm, which takes p and
q as the input parameters.
Cryptography Digital signatures
Digital signatures are the public-key primitives of message authentication. In the physical
world, it is common to use handwritten signatures on handwritten or typed messages. They
are used to bind signatory to the message.
Similarly, a digital signature is a technique that binds a person/entity to the digital data. This
binding can be independently verified by receiver as well as any third party.
Digital signature is a cryptographic value that is calculated from the data and a secret key
known only by the signer.
In real world, the receiver of message needs assurance that the message belongs to the sender
and he should not be able to repudiate the origination of that message. This requirement is
very crucial in business applications, since likelihood of a dispute over exchanged data is
very high.
Model of Digital Signature
As mentioned earlier, the digital signature scheme is based on public key cryptography. The
model of digital signature scheme is depicted in the following illustration −
The following points explain the entire process in detail −
● Each person adopting this scheme has a public-private key pair.
● Generally, the key pairs used for encryption/decryption and signing/verifying are
different. The private key used for signing is referred to as the signature key and the
public key as the verification key.
● Signer feeds data to the hash function and generates hash of data.
● Hash value and signature key are then fed to the signature algorithm which produces
the digital signature on given hash. Signature is appended to the data and then both
are sent to the verifier.
● Verifier feeds the digital signature and the verification key into the verification
algorithm. The verification algorithm gives some value as output.
● Verifier also runs same hash function on received data to generate hash value.
● For verification, this hash value and output of verification algorithm are compared.
Based on the comparison result, verifier decides whether the digital signature is valid.
● Since digital signature is created by ‘private’ key of signer and no one else can have
this key; the signer cannot repudiate signing the data in future.
● Step-2: Choose two numbers n and m. Multiply all the values of the private key by
the number n and then find modulo m. The value of m must be greater than the sum of
all values in the private key, for example, 110. The number n should have no common
factor with m, for example, 31.
● Now take an example for understanding the process of encryption and decryption.