[go: up one dir, main page]

0% found this document useful (0 votes)
34 views8 pages

Cryptography and Network Security

The document discusses asymmetric key algorithms and their applications including secure communication, digital signatures, and key exchange. It then describes the RSA algorithm and how it uses public and private key pairs to encrypt and decrypt messages. The document also discusses how symmetric and asymmetric algorithms can be used together for encryption.

Uploaded by

Pratham Rai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views8 pages

Cryptography and Network Security

The document discusses asymmetric key algorithms and their applications including secure communication, digital signatures, and key exchange. It then describes the RSA algorithm and how it uses public and private key pairs to encrypt and decrypt messages. The document also discusses how symmetric and asymmetric algorithms can be used together for encryption.

Uploaded by

Pratham Rai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

TECHNO INTERNATIONAL NEWTOWN

NAME – SHOVAN MAJI


ROLL NO – 18700220041
STREAM – INFORMATION TECHNOLOGY
SECTION – B
YEAR – 4TH
SUBJECT – Cryptography and Network Security
SUBJECT CODE – PEC-IT801B

TECHNICAL REPORT FOR CA2


INTRODUCTION
Asymmetric key algorithms, also known as public-key cryptography, are a
fundamental concept in modern cryptography. Unlike symmetric key
algorithms, which use the same key for both encryption and decryption,
asymmetric key algorithms use two mathematically related keys: a public key
and a private key.
The public key is widely distributed and is used for encryption or verifying
digital signatures, while the private key is kept secret and is used for decryption
or creating digital signatures. This two-key system enables a wide range of
secure communication protocols and applications.

OVERVIEW OF ASYMMETRIC KEY ALGORITHM


Asymmetric key cryptography, also known as public-key cryptography, is a
cryptographic system that uses pairs of keys: public keys, which may be
disseminated widely, and private keys, which are known only to the owner. The
generation of such key pairs depends on cryptographic algorithms that are
designed to be computationally infeasible to reverse. It is computationally easy
for a user to generate a public and private key-pair and to use it for encryption
and decryption.
The public key can be freely distributed and is used to encrypt messages or
verify digital signatures, while the private key is kept secret and is used for
decryption or creating digital signatures. The use of asymmetric key
cryptography enhances security and confidentiality by ensuring that even if the
public key is known, it is computationally infeasible to determine the private
key.

APPLICATION OF ASYMMETRIC KEY ALGORITHM


Secure Communication: Asymmetric key cryptography is used to
establish secure communication channels over insecure networks, such
as the internet. It is used to encrypt data in transit, ensuring that only
the intended recipient can decrypt and access the information.
Digital Signatures: Asymmetric key cryptography is used to create digital
signatures, which are used to verify the authenticity and integrity of
digital documents. A digital signature created with a private key can be
verified using the corresponding public key, providing assurance that the
document has not been tampered with and was signed by the expected
party.
Key Exchange: Asymmetric key cryptography is used in key exchange
protocols, such as Diffie-Hellman key exchange, which allows two parties
to establish a shared secret key over an insecure channel. This shared
secret key can then be used for symmetric encryption, enhancing the
security of the communication.
Authentication: Asymmetric key cryptography is used for user
authentication, such as in digital certificates. A digital certificate contains
a public key and information about the certificate holder, and is used to
verify the identity of the certificate holder in online transactions.

RSA ALGORITHM
The RSA algorithm is an asymmetric cryptography algorithm; this means that it
uses a public key and a private key (i.e two different, mathematically linked
keys). As their names suggest, a public key is shared publicly, while a private
key is secret and must not be shared with anyone.

The RSA algorithm is named after those who invented it in 1978: Ron Rivest,
Adi Shamir, and Leonard Adleman.

Key Generation:
• Step 1: Choose two distinct prime numbers, p and q.
• Step 2: Compute their product, n = p * q. The value of n is used as the
modulus for both the public and private keys.
• Step 3: Compute Euler's totient function, φ(n) = (p-1)(q-1), which
represents the count of numbers less than n that are coprime with n.
• Step 4: Choose an integer e such that 1 < e < φ(n) and e is coprime with
φ(n). This integer serves as the public exponent.
• Step 5: Compute the modular multiplicative inverse d of e modulo φ(n).
In other words, find d such that (d * e) mod φ(n) = 1. This d is the private
exponent.
Encryption and Decryption:
• Encryption: To encrypt a message m, the sender uses the recipient's
public key (n, e) to compute c ≡ m^e (mod n). The ciphertext c is then
transmitted to the recipient.
• Decryption: The recipient, who possesses the private key (d), computes
m ≡ c^d (mod n) to recover the original message.

Key Length:
• The security of RSA depends on the length of the modulus (n) and the
choice of prime numbers (p and q).
• As computing power increases, longer key lengths are recommended to
maintain security against brute-force attacks.
Advantages:
• RSA offers strong security guarantees based on the difficulty of factoring
large numbers, making it suitable for various cryptographic applications.
• It provides a versatile solution for secure communication, digital
signatures, and key exchange.
Application :
• Secure Communication: RSA is used for secure transmission of data
over insecure networks, ensuring confidentiality.
• Digital Signatures: RSA allows for the creation and verification of
digital signatures, providing authentication and non-repudiation.
• Key Exchange: RSA facilitates secure key exchange between parties
without the need for a pre-shared secret.

SYMMETRIC AND ASYMMETRIC KEY CRYPTOGRAPHY TOGETHER


Combining symmetric and asymmetric key cryptography provides a strong and
effective method for protecting data and facilitating secure communication.
With this hybrid model, the advantages of each cryptography technique to
efficiently handle different security requirements.

Key Exchange:
• Symmetric cryptography excels in encrypting large volumes of data
efficiently. However, the challenge lies in securely exchanging the
symmetric keys between parties.
• Asymmetric cryptography addresses this challenge by providing a secure
mechanism for key exchange. Parties can use asymmetric encryption to
securely transmit symmetric keys.

Hybrid Encryption:
• In a hybrid encryption scheme, asymmetric encryption is used for key
exchange, while symmetric encryption is used for encrypting the actual
data.
• The sender generates a symmetric key for encrypting the message and
encrypts this symmetric key using the recipient's public key.
• The recipient decrypts the symmetric key using their private key and
uses it to decrypt the encrypted message.
• This approach combines the efficiency of symmetric encryption with the
security of asymmetric encryption.

Secure Communication:
• By combining symmetric and asymmetric cryptography, secure
communication channels can be established.
• Asymmetric encryption is used for initial key exchange and
authentication, while symmetric encryption is employed for encrypting
the actual data transmission.

Examples:
Transport Layer Security (TLS): TLS protocols often use a hybrid
approach, where asymmetric encryption is used for key exchange (e.g.,
RSA or Diffie-Hellman) and symmetric encryption (e.g., AES) is used for
data transmission.
Pretty Good Privacy (PGP): PGP combines symmetric and asymmetric
encryption for secure email communication, file encryption, and digital
signatures.
DIGITAL SIGNATURE
Digital signatures are a cryptographic technique used to verify the authenticity
and integrity of digital messages or documents. They provide a way for the
recipient of a message to ensure that the message was created by a known
sender and that it has not been altered in transit.
Working of Digital Signature :
• Key Generation: The sender generates a key pair consisting of a private
key and a public key. The private key is kept secret, while the public key is
shared with others.
• Signing: To sign a message, the sender uses a cryptographic algorithm to
create a unique digital signature based on the message and their private
key. The signature is appended to the message.
• Verification: The recipient of the message uses the sender's public key to
verify the digital signature. They apply the same cryptographic algorithm
to the message and the signature, using the public key. If the result
matches the signature, the message is considered authentic and has not
been altered.

Important Features of Digital Signature :


• Authentication: They verify the identity of the sender, ensuring that the
message was sent by the claimed sender.
• Integrity: They ensure that the message has not been altered or
tampered with during transmission.
• Non-repudiation: They prevent the sender from denying that they sent
the message, as they are the only ones with access to the private key
used to create the signature.

Basic Concepts of Message Digest and Hash Function


Message Digest:
A message digest is a numeric representation of a message computed by a
cryptographic hash algorithm or a function. Regardless of the size of the
message, the message digest produces a numeric representation of a fixed
size when hashed. It is used to ensure and verify that a message is genuine.
Properties of Message Digest :

• A message digest has a fixed numeric size. If you count the number of
characters in the hashes provided in the image above, you see that
they both have 32 characters. Each hash algorithm produces a hash
of a fixed numeric size. MD5 hashes have 32 characters, while SHA1
hashes have 40 characters.
• It is impossible for two messages to have the same message digest.
• The message digest hashing algorithm is a one-way cryptographic
function. This means that it cannot be reversed and it is almost
impossible to get the original message from the hash.

Usage of Message Digest :

Message digests are used to protect, verify, and ensure the integrity of a
message. They are designed to identify and discover changes made to the
message. They are used in different fields to protect copyrights and prove
ownership.

1. Data Integrity Verification: Message digests are used to verify that data
has not been altered or corrupted during transmission or storage. By
comparing the digest of received data with the original digest, one can
determine if the data has been tampered with.
2. Digital Signatures: In digital signatures, a message digest of the
document or message is created and then encrypted with the sender's
private key. The recipient can decrypt the digest using the sender's
public key and compare it with a newly computed digest of the received
message to verify the sender's identity and the integrity of the message.
3. Password Storage: Message digests are often used to securely store
passwords. Instead of storing the actual passwords, systems store the
message digests of passwords. When a user enters a password, the
system computes the message digest of the entered password and
compares it with the stored digest.
4. File Integrity Checking: Message digests can be used to verify the
integrity of files. By computing the message digest of a file and
comparing it with a previously computed digest, one can verify that the
file has not been modified or corrupted.
5. Cryptographic Protocols: Message digests are used in various
cryptographic protocols, such as SSL/TLS, to ensure the integrity and
authenticity of data exchanged over insecure channels.

Hash Function:
Definition: A hash function is a mathematical algorithm that takes an input (or
message) of arbitrary size and produces a fixed-size output, known as the hash
value or hash digest.

• Properties:

• Deterministic: For a given input, a hash function always produces the


same output.
• Fast Computation: Hash functions are computationally efficient, allowing
for quick generation of hash values.
• Fixed Output Size: Regardless of the input size, hash functions produce
hash values of fixed length.
• Pre-image Resistance: Given a hash value, it should be computationally
infeasible to find the original input.
• Collision Resistance: It should be computationally infeasible to find two
different inputs that produce the same hash value.

CONCLUSION
These cryptographic concepts form the foundation of secure communication,
data protection, and trust in digital transactions. Understanding and
implementing these concepts are essential for safeguarding sensitive
information and ensuring the security of digital systems in various domains,
including cybersecurity, finance, and ecommerce.

You might also like