You are on page 1of 20

---Overview of Asymmetric key

Cryptography---

Asymmetric key cryptography, also


known as public key cryptography,
is a cryptographic system that
uses a pair of keys to encrypt and
decrypt data. The two keys are
mathematically related, but one is
kept secret (the private key)
while the other is shared publicly
(the public key).

The public key is used to encrypt


data, which can only be decrypted
using the corresponding private
key. This means that anyone can
encrypt data using the recipient's
public key, but only the recipient
can decrypt it using their private
key.
Asymmetric key cryptography is
widely used in various
applications, including secure
communication, digital signatures,
and secure electronic
transactions. It offers several
advantages over symmetric key
cryptography, such as easier key
distribution, greater security,
and non-repudiation.

One of the most widely used


asymmetric key cryptography
algorithms is the RSA algorithm,
which is named after its inventors
Ron Rivest, Adi Shamir, and
Leonard Adleman. Another commonly
used algorithm is the Elliptic
Curve Cryptography (ECC)
algorithm, which is based on the
mathematics of elliptic curves.

------Asymmetric Key
Algorithm------

An asymmetric key algorithm, also


known as public-key cryptography,
is a type of cryptographic
algorithm that uses a pair of
related keys, a public key and a
private key, for encryption and
decryption. The public key is
freely available and can be
distributed widely, while the
private key is kept secret and
known only to the owner.

Asymmetric key algorithms are


based on mathematical functions
that are relatively easy to
compute in one direction, but
difficult to compute in the
opposite direction. For example,
it may be easy to multiply two
large prime numbers together, but
difficult to determine the two
original prime numbers that were
used.

Asymmetric key algorithms are used


for a variety of purposes,
including secure communication,
digital signatures, and key
exchange. One of the most commonly
used asymmetric key algorithms is
RSA, which was invented in 1977 by
Ron Rivest, Adi Shamir, and
Leonard Adleman. Other popular
algorithms include Diffie-Hellman,
Elliptic Curve Cryptography (ECC),
Digital Signature Algorithm (DSA),
and ElGamal.
--- diff type of Asymmetric Key
Algorithm-------

There are several asymmetric key


algorithms used in cryptography,
each with its own strengths and
weaknesses. Here are some of the
most commonly used ones:

RSA: RSA (Rivest-Shamir-Adleman)


is the most widely used asymmetric
key algorithm. It is based on the
mathematical complexity of
factoring large integers into
their prime factors. RSA is used
in digital signatures, key
exchanges, and encryption of data.

Diffie-Hellman: Diffie-Hellman is
a key exchange algorithm used to
establish a shared secret between
two parties over an insecure
channel. It is based on the
difficulty of calculating discrete
logarithms in a finite field.

Elliptic Curve Cryptography (ECC):


ECC is an alternative to RSA that
provides similar security with
shorter keys. It is based on the
mathematics of elliptic curves and
is used in digital signatures, key
exchanges, and encryption.

Digital Signature Algorithm (DSA):


DSA is a US government standard
for digital signatures. It is
based on the mathematics of
modular exponentiation and is used
for secure communication and
digital signature verification.
ElGamal: ElGamal is an encryption
algorithm based on the
Diffie-Hellman key exchange. It is
used for digital signatures, key
exchanges, and encryption.

Asymmetric key algorithms are an


essential part of modern
cryptography, enabling secure
communication and digital
signatures. The choice of
algorithm depends on the specific
application and the desired level
of security.

------Digital Signature in
Asymmetric key algorithms-------

Digital signatures are a key


feature of asymmetric key
algorithms, allowing for the
authentication and integrity of
digital documents. A digital
signature is a mathematical
technique that provides proof of
the authenticity of a digital
document or message and ensures
that it has not been altered in
transit.

To create a digital signature, the


sender uses their private key to
generate a unique digital
fingerprint, also known as a hash,
of the document or message. This
hash is then encrypted with the
sender's private key, creating the
digital signature. The signature
can then be attached to the
document or message and sent to
the recipient.
When the recipient receives the
document or message with the
digital signature, they can use
the sender's public key to decrypt
the signature and verify the
authenticity of the document. If
the digital signature matches the
document, then it has not been
altered in transit and is
considered authentic.

Digital signatures are commonly


used in e-commerce, online
banking, and other applications
where secure communication is
critical. They provide a way to
verify the identity of the sender
and ensure that the message has
not been tampered with. They also
provide non-repudiation, meaning
that the sender cannot later deny
having sent the message since the
digital signature proves their
identity.

---------RSA in Asymmetric key


algorithms-----

RSA is one of the most widely used


asymmetric key algorithms, named
after its inventors Ron Rivest,
Adi Shamir, and Leonard Adleman.
RSA is based on the difficulty of
factoring large integers into
their prime factors. The security
of RSA lies in the fact that
factoring large numbers is
computationally difficult,
especially when the numbers are
very large, such as those used in
RSA.
In RSA, each user generates a pair
of keys - a public key and a
private key. The public key is
shared with others and is used for
encryption, while the private key
is kept secret and is used for
decryption.

To encrypt a message using RSA,


the sender uses the recipient's
public key to encrypt the message,
creating a ciphertext that only
the recipient can decrypt using
their private key. To decrypt the
message, the recipient uses their
private key to decrypt the
ciphertext, recovering the
original plaintext.

RSA is also used for digital


signatures, where the sender uses
their private key to sign a
message, creating a digital
signature that can be verified by
anyone using the sender's public
key. The digital signature
provides authenticity and
non-repudiation of the message,
ensuring that it has not been
altered in transit and that the
sender cannot later deny sending
it.

RSA is a widely used asymmetric


key algorithm due to its security,
efficiency, and versatility. It is
used in many applications,
including secure communication,
digital signatures, and key
exchange.
--------Symmetric &
Asymmetric key Cryptography
together------

Symmetric and asymmetric key


cryptography are often used
together in modern cryptography
systems to take advantage of the
strengths of both approaches.

Symmetric key cryptography is


efficient and fast, making it
ideal for encrypting large amounts
of data. However, the challenge
with symmetric key cryptography is
that the same key must be used for
encryption and decryption, so a
secure way of distributing the key
is required.

Asymmetric key cryptography, on


the other hand, solves the key
distribution problem by allowing
for the use of a public key for
encryption and a private key for
decryption. This enables secure
communication without the need for
a shared secret key. However,
asymmetric key cryptography is
slower and less efficient than
symmetric key cryptography,
particularly when encrypting large
amounts of data.

In a typical use case, symmetric


key cryptography is used to
encrypt the data, while asymmetric
key cryptography is used to
securely distribute the symmetric
key. For example, a sender might
encrypt a message using a
symmetric key, then use the
recipient's public key to encrypt
the symmetric key and send it
along with the message. The
recipient can then use their
private key to decrypt the
symmetric key, and then use the
symmetric key to decrypt the
message.
This approach provides the
benefits of both symmetric and
asymmetric key cryptography - fast
and efficient encryption of large
amounts of data with symmetric key
cryptography, and secure key
distribution using asymmetric key
cryptography.

Overall, the combination of


symmetric and asymmetric key
cryptography provides a powerful
and flexible approach to modern
cryptography systems.

------Basic concepts of Message


Digest in Asymmetric Key
Algorithm-----

A message digest, also known as a


hash value or a checksum, is a
fixed-length string of characters
that is generated by applying a
mathematical function to a message
or data. The resulting message
digest is unique to the original
message and can be used to verify
the integrity and authenticity of
the message.

Message digests are widely used in


various areas of computing, such
as digital signatures, password
storage, and data verification.
One of the key properties of a
good message digest algorithm is
that it should be computationally
infeasible to generate two
different messages that have the
same message digest, known as a
collision. This property ensures
that the message digest is unique
to the original message and cannot
be used to create a fraudulent
message that generates the same
message digest.

Message digest algorithms


typically take input data of any
length and produce a fixed-length
output, which is a unique
representation of the original
data. Popular message digest
algorithms include SHA (Secure
Hash Algorithm) and MD (Message
Digest) algorithms, such as
SHA-256 and MD5. These algorithms
are widely used in various
applications to ensure the
integrity and authenticity of data
and messages.

----------Basic concepts of
Hash Function-----

A hash function is a mathematical


function that takes an input (or
message) of arbitrary size and
produces a fixed-size output,
known as a hash value or message
digest. The output of a hash
function is typically a string of
characters that is unique to the
input message, meaning that any
change in the input message will
result in a completely different
hash value.

Hash functions are widely used in


cryptography for a variety of
purposes, such as digital
signatures, password storage, and
message authentication. One
important property of a hash
function is that it is
deterministic, meaning that the
same input message will always
produce the same output hash
value. This makes hash functions
useful for verifying the integrity
of data, as any change in the
input message will result in a
completely different hash value.

Another important property of a


hash function is that it should be
computationally infeasible to
generate two different messages
that have the same hash value,
known as a collision. This
property ensures that the hash
value is unique to the original
message and cannot be used to
create a fraudulent message that
generates the same hash value.

Popular hash functions used in


cryptography include SHA (Secure
Hash Algorithm) and MD (Message
Digest) algorithms, such as
SHA-256 and MD5. These algorithms
are widely used in various
applications to ensure the
integrity and authenticity of data
and messages.

---------end-----------

You might also like