SlideShare a Scribd company logo
Cryptography
All details of cryptography and all the topics of cryptography was explained
Definition
• 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 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.
Features Of Cryptography are as follows:
1.Confidentiality: Information can only be accessed by the person for whom it
is intended and no other person except him can access it.
2.Integrity: Information cannot be modified in storage or transition between
sender and intended receiver without any addition to information being
detected.
3.Non-repudiation: The creator/sender of information cannot deny his
intention to send information at later stage.
4.Authentication: The identities of sender and receiver are confirmed. As well
as destination/origin of information is confirmed.
Types of
Cryptography
1. Symmetric
Cryptography
2. Asymmetric
Cryptography
3. Hash Function
Symmetric
Cryptography
Asymmetric
Cryptography
All details of cryptography and all the topics of cryptography was explained
Characteristics of
Public Encryption key:
• Public key Encryption is important because it is
infeasible to determine the decryption key given
only the knowledge of the cryptographic
algorithm and encryption key.
• Either of the two keys (Public and Private key)
can be used for encryption with other key used
for decryption.
• Due to Public key cryptosystem, public keys can
be freely shared, allowing users an easy and
convenient method for encrypting content and
verifying digital signatures, and private keys can
be kept secret, ensuring only the owners of the
private keys can decrypt content and create
digital signatures.
Example
• Public keys of every user are
present in the Public key Register.
If B wants to send a confidential
message to C, then B encrypt the
message using C Public key.
When C receives the message
from B then C can decrypt it using
its own Private key. No other
recipient other than C can decrypt
the message because only C
know C’s private key.
Basis Private Key Encryption Public-Key Encryption
Required for Work:
•Same algorithm with the same key is
used for encryption and decryption.
•The sender and receiver must share
the algorithm and key.
•One algorithm is used for encryption
and a related algorithm decryption with
pair of keys, one for encryption and
other for decryption.
•Receiver and Sender must each have
one of the matched pair of keys (not
identical) .
Required for Security:
•Key must be kept secret.
•If the key is secret, it is very
impossible to decipher message.
•Knowledge of the algorithm plus
samples of ciphertext must be
impractical to determine the key.
•One of the two keys must be kept
secret.
•If one of the key is kept secret, it is very
impossible to decipher message.
•Knowledge of the algorithm plus one of
the keys plus samples of ciphertext must
be impractical to determine the other
key.
Key Terms
• Cryptography : Cryptography is the
process of hiding or coding information
so that only the person a message was
intended for can read it.
• PlainText : plaintext is usually ordinary
readable text before it is encrypted into
ciphertext.
• Ciphertext : Ciphertext is encrypted text
transformed from plaintext using an
encryption algorithm. Ciphertext can't be
read until it has been converted into
plaintext
• Cipher : A cipher is an algorithm for
encrypting and decrypting data.
• Key : key is a string of characters used
within an encryption algorithm for
altering data so that it appears random.
• Cryptanalysis : Cryptanalysis is the
study of the cryptographic algorithm and
the breaking of those secret codes. The
person practicing Cryptanalysis is called
a Cryptanalyst.
All details of cryptography and all the topics of cryptography was explained
Hash
Functions
• 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.
• Hash functions are extremely useful and appear in almost
all information security applications.
• A hash function is a mathematical function that converts a
numerical input value into another compressed numerical
value. The input to the hash function is of arbitrary length
but output is always of fixed length.
• Values returned by a hash function are called message
digest or simply hash values. The following picture
illustrated hash function
All details of cryptography and all the topics of cryptography was explained
Features of Hash Functions
Fixed Length Output (Hash Value)
• Hash function coverts data of arbitrary length to a fixed length. This
process is often referred to as hashing the data.
• In general, the hash is much smaller than the input data, hence hash
functions are sometimes called compression functions.
• Since a hash is a smaller representation of a larger data, it is also referred
to as a digest.
• Hash function with n bit output is referred to as an n-bit hash function.
Popular hash functions generate values between 160 and 512 bits
Efficiency of Operation
• Generally for any hash function h with input x, computation of h(x) is a
fast operation.
• Computationally hash functions are much faster than a symmetric
encryption.
Properties of Hash Functions
• Pre-Image Resistance
• This property means that it should be computationally hard to
reverse a hash function.
• In other words, if a hash function h produced a hash value z, then
it should be a difficult process to find any input value x that hashes
to z.
• This property protects against an attacker who only has a hash
value and is trying to find the input.
• Second Pre-Image Resistance
• This property means given an input and its hash, it should be hard
to find a different input with the same hash.
• In other words, if a hash function h for an input x produces hash
value h(x), then it should be difficult to find any other input value y
such that h(y) = h(x).
• This property of hash function protects against an attacker who
has an input value and its hash, and wants to substitute different
value as legitimate value in place of original input value.
• Collision Resistance
• This property means it should be hard to find two different inputs of any length
that result in the same hash. This property is also referred to as collision free
hash function.
• In other words, for a hash function h, it is hard to find any two different inputs x
and y such that h(x) = h(y).
• Since, hash function is compressing function with fixed hash length, it is
impossible for a hash function not to have collisions. This property of collision
free only confirms that these collisions should be hard to find.
• This property makes it very difficult for an attacker to find two input values with
the same hash.
• Also, if a hash function is collision-resistant then it is second pre-image
resistant.
Applications of Hash Functions
Password Storage
• Hash functions provide protection to password storage.
• Instead of storing password in clear, mostly all logon processes store the
hash values of passwords in the file.
• An intruder can only see the hashes of passwords, even if he accessed the
password. He can neither logon using hash nor can he derive the password
from hash value since hash function possesses the property of pre-image
resistance.
Data Integrity Check
• Data integrity check is a most common application of the
hash functions. It is used to generate the checksums on
data files. This application provides assurance to the user
about correctness of the data.
• The integrity check helps the user to detect any changes made to original
file. It however, does not provide any assurance about originality. The
attacker, instead of modifying file data, can change the entire file and
compute all together new hash and send to the receiver. This integrity check
application is useful only if the user is sure about the originality of file.
Popular Hash Functions
Message Digest (MD)
• MD5 was most popular and widely used hash function for quite some years.
• The MD family comprises of hash functions MD2, MD4, MD5 and MD6. It was
adopted as Internet Standard RFC 1321. It is a 128-bit hash function.
• MD5 digests have been widely used in the software world to provide
assurance about integrity of transferred file. For example, file servers often
provide a pre-computed MD5 checksum for the files, so that a user can
compare the checksum of the downloaded file to it.
• In 2004, collisions were found in MD5. An analytical attack was reported to
be successful only in an hour by using computer cluster. This collision attack
resulted in compromised MD5 and hence it is no longer recommended for
use.
• Secure Hash Function (SHA)
• Family of SHA comprise of four SHA algorithms; SHA-0, SHA-1, SHA-2, and
SHA-3. Though from same family, there are structurally different.
• The original version is SHA-0, a 160-bit hash function, was published by the
National Institute of Standards and Technology (NIST) in 1993. It had few
weaknesses and did not become very popular. Later in 1995, SHA-1 was
designed to correct alleged weaknesses of SHA-0.
• SHA-1 is the most widely used of the existing SHA hash functions. It is
employed in several widely used applications and protocols including Secure
Socket Layer (SSL) security.
• In 2005, a method was found for uncovering collisions for SHA-1 within
practical time frame making long-term employability of SHA-1 doubtful.
• SHA-2 family has four further SHA variants, SHA-224, SHA-256, SHA-384, and
SHA-512 depending up on number of bits in their hash value. No successful
attacks have yet been reported on SHA-2 hash function.
• Though SHA-2 is a strong hash function. Though significantly different, its
basic design is still follows design of SHA-1. Hence, NIST called for new
competitive hash function designs.
• In October 2012, the NIST chose the Keccak algorithm as the new SHA-3
standard. Keccak offers many benefits, such as efficient performance and
good resistance for attacks.
Applications
Of
Cryptography
• Computer passwords: Cryptography is widely
utilized in computer security, particularly when
creating and maintaining passwords. When a
user logs in, their password is hashed and
compared to the hash that was previously
stored. Passwords are hashed and encrypted
before being stored. In this technique, the
passwords are encrypted so that even if a
hacker gains access to the password database,
they cannot read the passwords.
• Digital Currencies: To safeguard transactions
and prevent fraud, digital currencies like
Bitcoin also use cryptography. Complex
algorithms and cryptographic keys are used to
safeguard transactions, making it nearly hard
to tamper with or forge the transactions.
• Secure web browsing: Online browsing security
is provided by the use of cryptography, which
shields users from eavesdropping and man-in-
the-middle assaults. Public key cryptography is
used by the Secure Sockets Layer (SSL) and
Transport Layer Security (TLS) protocols to
encrypt data sent between the web server and
the client, establishing a secure channel for
communication.
• Electronic signatures: Electronic signatures
serve as the digital equivalent of a handwritten
signature and are used to sign documents.
Digital signatures are created using cryptography
and can be validated using public key
cryptography. In many nations, electronic
signatures are enforceable by law, and their use
is expanding quickly.
• Authentication: Cryptography is used for
authentication in many different situations,
such as when accessing a bank account,
logging into a computer, or using a secure
network. Cryptographic methods are employed
by authentication protocols to confirm the
user’s identity and confirm that they have the
required access rights to the resource.
• Cryptocurrencies: Cryptography is heavily
used by cryptocurrencies like Bitcoin and
Ethereum to safeguard transactions, thwart
fraud, and maintain the network’s integrity.
Complex algorithms and cryptographic keys
are used to safeguard transactions, making it
nearly hard to tamper with or forge the
transactions.
• End-to-End Encryption: End-to-
end encryption is used to protect
two-way communications like
video conversations, instant
messages, and email. Even if the
message is encrypted, it assures
that only the intended receivers
can read the message. End-to-end
encryption is widely used in
communication apps like
WhatsApp and Signal, and it
provides a high level of security
and privacy for users.
Adventages
• Access Control: Cryptography can be
used for access control to ensure that
only parties with the proper
permissions have access to a resource.
Only those with the correct decryption
key can access the resource thanks to
encryption.
• Secure Communication: For secure
online communication, cryptography
is crucial. It offers secure mechanisms
for transmitting private information
like passwords, bank account
numbers, and other sensitive data
over the internet.
Adventages
• Protection against attacks: Cryptography aids
in the defence against various types of assaults,
including replay and man-in-the-middle attacks.
It offers strategies for spotting and stopping
these assaults.
• Compliance with legal
requirements: Cryptography can assist firms in
meeting a variety of legal requirements,
including data protection and privacy legislation.
GAK – Government
Access to Keys
GAK means that software
companies will give copies of all
keys to the government
The government promises that they
will hold on to the keys in a secure
way, and will only use them when a
court issues a warrant to do so
To the government, this issue is
similar to the ability to wiretap
phones
All details of cryptography and all the topics of cryptography was explained
Substitutio
n Cipher:
Substitution Ciphers are further divided
into Mono-alphabetic Cipher and Poly-
alphabetic Cipher.
• Mono-alphabetic Cipher –
In mono-alphabetic ciphers, each symbol in
plain-text is mapped to one cipher-text symbol.
No matter how many times a symbol occurs in
the plain-text, it will correspond to the same
cipher-text symbol. For example, if the plain-text
is ‘follow’ and the mapping is :f -> g
• o -> p
• l -> m
• w -> x
• The cipher-text is ‘gpmmpx’.
All details of cryptography and all the topics of cryptography was explained
Caesar Cipher
• It is a mono-alphabetic cipher wherein each letter of the
plaintext is substituted by another letter to form the
ciphertext. It is a simplest form of substitution cipher
scheme.
• This cryptosystem is generally referred to as the Shift
Cipher. The concept is to replace each alphabet by another
alphabet which is ‘shifted’ by some fixed number between 0
and 25.
• For this type of scheme, both sender and receiver agree on
a ‘secret shift number’ for shifting the alphabet. This
number which is between 0 and 25 becomes the key of
encryption.
Process of Shift Cipher
• In order to encrypt a plaintext letter, the sender positions
the sliding ruler underneath the first set of plaintext letters
and slides it to LEFT by the number of positions of the secret
shift.
• The plaintext letter is then encrypted to the ciphertext letter
on the sliding ruler underneath. The result of this process is
depicted in the following illustration for an agreed shift of
three positions. In this case, the plaintext ‘tutorial’ is
encrypted to the ciphertext ‘WXWRULDO’. Here is the
ciphertext alphabet for a Shift of 3 −
•On receiving the ciphertext, the receiver who also knows the secret shift,
positions his sliding ruler underneath the ciphertext alphabet and slides it to
RIGHT by the agreed shift number, 3 in this case.
•He then replaces the ciphertext letter by the plaintext letter on the sliding ruler
underneath. Hence the ciphertext ‘WXWRULDO’ is decrypted to ‘tutorial’. To
decrypt a message encoded with a Shift of 3, generate the plaintext alphabet
using a shift of ‘-3’ as shown below −
• Caesar Cipher is not a secure cryptosystem because there
are only 26 possible keys to try out. An attacker can carry
out an exhaustive key search with available limited
computing resources.
Simple Substitution Cipher
• It is an improvement to the Caesar Cipher. Instead of
shifting the alphabets by some number, this scheme uses
some permutation of the letters in alphabet.
• With 26 letters in alphabet, the possible permutations are
26! (Factorial of 26) which is equal to 4x1026
. The sender and
the receiver may choose any one of these possible
permutation as a ciphertext alphabet. This permutation is
the secret key of the scheme.
• Write the alphabets A, B, C,...,Z in the natural order.
• The sender and the receiver decide on a randomly selected
permutation of the letters of the alphabet.
• Underneath the natural order alphabets, write out the
chosen permutation of the letters of the alphabet. For
encryption, sender replaces each plaintext letters by
substituting the permutation letter that is directly beneath it
in the table. This process is shown in the following
illustration. In this example, the chosen permutation is K,D,
G, ..., O. The plaintext ‘point’ is encrypted to ‘MJBXZ’.
All details of cryptography and all the topics of cryptography was explained
All details of cryptography and all the topics of cryptography was explained
All details of cryptography and all the topics of cryptography was explained
Data
Encryption
Standard
(DES)
1 Fiestal Round
Round
Function
Key Generation
2DES ( Double DES)
All details of cryptography and all the topics of cryptography was explained
Tripple DES
(3DES)
Advanced
Encryption
Standard
All details of cryptography and all the topics of cryptography was explained
Digital Signature
• A digital signature is a mathematical technique used to
validate the authenticity and integrity of a message,
software, or digital document.
All details of cryptography and all the topics of cryptography was explained
Steps in Creating Digital
Signature
• Message digest is computed by
applying hash function on the
message and then message digest is
encrypted using private key of sender
to form the digital signature. (digital
signature = encryption (private key of
sender, message digest) and message
digest = message digest
algorithm(message)
• Digital signature is then transmitted
with the message.(message + digital
signature is transmitted)
• Receiver decrypts the digital
signature using the public key of
sender.(This assures authenticity, as
only sender has his private key so
only sender can encrypt using his
private key which can thus be
decrypted by sender’s public key).
• The receiver now has the message
digest.
• The receiver can compute the
message digest from the message
(actual message is sent with the
digital signature).
• The message digest computed by
receiver and the message digest (got
by decryption on digital signature)
need to be same for ensuring
integrity.
Public Key Infrastructure
• PKI (public key infrastructure) is the underlying framework that enables entities -- users
and servers -- to securely exchange information using digital certificates. The entities that
facilitate and use PKI typically involve general internet users, web clients or browsers,
and company servers.
• It is a standard followed for managing, storing and revoking the digital certificate.
Architecture of PKI
• Certificate repository
• Entity
• Registration authority (RA)
• Certification authority (CA)
• Certificate Authority : In cryptography, a certificate authority or certification authority is
an entity that stores, signs, and issues digital certificates. A digital certificate certifies the
ownership of a public key by the named subject of the certificate.
• Entity : An Entity is a user of PKI certificates and/or the end user system that is the
subject of a certificate, such as an e-mail client, a web server, a web browser, or a VPN-
gateway.
• Registration Authority : A registration authority (RA) is an authority in a network that
verifies user requests for a digital certificate and tells the certificate authority (CA) to
issue it
• The main goal of a CA is to verify the authenticity and trustworthiness of a website,
domain and organization so users know exactly who they're communicating with online
and whether that entity can be trusted with their data.
• When a CA issues a digital certificate for a website, users know they are connected with
an official website, not a fake or spoofed website created by a hacker to steal their
information or money.
Digital Certificate
• Digital certificate is issued by a
trusted third party which proves
sender’s identity to the receiver and
receiver’s identity to the sender.
• A digital certificate is a certificate
issued by a Certificate Authority (CA)
to verify the identity of the certificate
holder. The CA issues an encrypted
digital certificate containing the
applicant’s public key and a variety of
other identification information.
• Digital certificate is used to attach
public key with a particular individual
or an entity.
Digital certificate
contains:
1.Name of certificate holder.
2.Serial number which is used to
uniquely identify a certificate, the
individual or the entity identified by
the certificate
3.Expiration dates.
4.Copy of certificate holder’s public key.
(used for decrypting messages and
digital signatures)
5.Digital Signature of the certificate
issuing authority.
Applications of
Cryptography
•SSL
•PGP
•Ipsec
IP Security (IPSec)
• IP Sec (Internet Protocol Security) is an
Internet Engineering Task Force (IETF)
standard suite of protocols between two
communication points across the IP
network that provide data
authentication, integrity, and
confidentiality. It also defines the
encrypted, decrypted, and authenticated
packets. The protocols needed for secure
key exchange and key management are
defined in it.
Uses of IPSec
• To encrypt application layer data.
• To provide security for routers sending
routing data across the public internet.
• To provide authentication without
encryption, like to authenticate that the
data originates from a known sender
Components of IP Security
1.Encapsulating Security Payload
(ESP)
2.Authentication Header (AH)
IP Security Architecture
• IPSec (IP Security) architecture uses two protocols to secure
the traffic or data flow. These protocols are ESP
(Encapsulation Security Payload) and AH (Authentication
Header). IPSec Architecture includes protocols, algorithms,
DOI, and Key Management. All these components are very
important in order to provide the three main services:
• Confidentiality
• Authenticity
• Integrity
All details of cryptography and all the topics of cryptography was explained
Secure Socket Layer (SSL)
• SSL, or Secure Sockets Layer, is an encryption-based Internet
security protocol. It was first developed by Netscape in 1995
for the purpose of ensuring privacy, authentication, and
data integrity in Internet communications. SSL is the
predecessor to the modern TLS encryption used today.
• A website that implements SSL/TLS has "HTTPS" in its URL
instead of "HTTP."
All details of cryptography and all the topics of cryptography was explained
How does SSL/TLS work?
• In order to provide a high degree of privacy, SSL encrypts
data that is transmitted across the web. This means that
anyone who tries to intercept this data will only see a
garbled mix of characters that is nearly impossible to
decrypt.
• SSL initiates an authentication process called a handshake
between two communicating devices to ensure that both
devices are really who they claim to be.
• SSL also digitally signs data in order to provide data
integrity, verifying that the data is not tampered with
before reaching its intended recipient.
All details of cryptography and all the topics of cryptography was explained
Why is SSL/TLS important?
• Originally, data on the Web was transmitted in plaintext that anyone could read
if they intercepted the message. For example, if a consumer visited a shopping
website, placed an order, and entered their credit card number on the website,
that credit card number would travel across the Internet unconcealed.
• SSL was created to correct this problem and protect user privacy. By encrypting
any data that goes between a user and a web server, SSL ensures that anyone
who intercepts the data can only see a scrambled mess of characters. The
consumer's credit card number is now safe, only visible to the shopping website
where they entered it.
• SSL also stops certain kinds of cyber attacks: It authenticates web servers, which
is important because attackers will often try to set up fake websites to trick
users and steal data. It also prevents attackers from tampering with data in
transit, like a tamper-proof seal on a medicine container.
All details of cryptography and all the topics of cryptography was explained
PGP
• PGP stands for Pretty Good Privacy (PGP) which is invented by Phil Zimmermann.
• PGP was designed to provide all four aspects of security, i.e., privacy, integrity,
authentication, and non-repudiation in the sending of email.
• PGP uses a digital signature (a combination of hashing and public key encryption) to
provide integrity, authentication, and non-repudiation. PGP uses a combination of
secret key encryption and public key encryption to provide privacy. Therefore, we can
say that the digital signature uses one hash function, one secret key, and two private-
public key pairs.
• PGP is an open source and freely available software package for email security.
• PGP provides authentication through the use of Digital Signature.
• It provides confidentiality through the use of symmetric block encryption.
• It provides compression by using the ZIP algorithm, and EMAIL compatibility using the
radix-64 encoding scheme.
Following are the steps taken by PGP to create secure e-mail
at the sender site:
• The e-mail message is hashed by using a hashing function to
create a digest.
• The digest is then encrypted to form a signed digest by using
the sender's private key, and then signed digest is added to
the original email message.
• The original message and signed digest are encrypted by
using a one-time secret key created by the sender.
• The secret key is encrypted by using a receiver's public key.
• Both the encrypted secret key and the encrypted combination
of message and digest are sent together.
PGP at the Sender site (A)
Following are the steps taken to show how PGP uses hashing and
a combination of three keys to generate the original message:
• The receiver receives the combination of encrypted secret key and
message digest is received.
• The encrypted secret key is decrypted by using the receiver's
private key to get the one-time secret key.
• The secret key is then used to decrypt the combination of message
and digest.
• The digest is decrypted by using the sender's public key, and the
original message is hashed by using a hash function to create a
digest.
• Both the digests are compared if both of them are equal means
that all the aspects of security are preserved.
PGP at the Receiver site (B)

More Related Content

PPTX
Digital Signature Message Digest Network Security
PPTX
Information and network security 37 hash functions and message authentication
PDF
Information Security 06- Hashing and Digital Signatures.pdf
PPTX
Network security
PPTX
Cryptography.pptx basics and detailed toptics also
PDF
Information Security 05- Encryption.pdfn
PDF
Public Key Encryption & Hash functions
PDF
BAIT1103 Chapter 2
Digital Signature Message Digest Network Security
Information and network security 37 hash functions and message authentication
Information Security 06- Hashing and Digital Signatures.pdf
Network security
Cryptography.pptx basics and detailed toptics also
Information Security 05- Encryption.pdfn
Public Key Encryption & Hash functions
BAIT1103 Chapter 2

Similar to All details of cryptography and all the topics of cryptography was explained (20)

PDF
Basic Cryptography.pdf
PPTX
Homomorphic encryption
PDF
PresentationonCRYPTOGRAPHYppt.pdf
PPTX
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
PDF
Unit 3_Hash function and MD5 working.pdf
PPT
secure hash function for authentication in CNS
PPTX
Module (Blockchain & Cryptocurrency).pptx
PPTX
CISSP - Chapter 3 - Cryptography
PPTX
Basics of Cryptography presentation.pptx
PPTX
big data and Iot , its security part ,hoe yoy help this
PDF
Hash Functions in Software Security.p df
PPTX
IS413 Topic 5.pptx
PPTX
groupWork.pptx
PPTX
PPTX
Enhancing lan using cryptography and other modules
PPT
Message authentication and hash function
PDF
HASH FUNCTIONS.pdf
DOC
Encryption
PPTX
Cryptographic Chronicles: Unveiling Definitions, Algorithms, Attacks, and App...
PPTX
Cryptography and Network Security Principles.pptx
Basic Cryptography.pdf
Homomorphic encryption
PresentationonCRYPTOGRAPHYppt.pdf
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
Unit 3_Hash function and MD5 working.pdf
secure hash function for authentication in CNS
Module (Blockchain & Cryptocurrency).pptx
CISSP - Chapter 3 - Cryptography
Basics of Cryptography presentation.pptx
big data and Iot , its security part ,hoe yoy help this
Hash Functions in Software Security.p df
IS413 Topic 5.pptx
groupWork.pptx
Enhancing lan using cryptography and other modules
Message authentication and hash function
HASH FUNCTIONS.pdf
Encryption
Cryptographic Chronicles: Unveiling Definitions, Algorithms, Attacks, and App...
Cryptography and Network Security Principles.pptx
Ad

Recently uploaded (20)

DOCX
573137875-Attendance-Management-System-original
PPT
Mechanical Engineering MATERIALS Selection
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Well-logging-methods_new................
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
additive manufacturing of ss316l using mig welding
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPT
Project quality management in manufacturing
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
573137875-Attendance-Management-System-original
Mechanical Engineering MATERIALS Selection
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Well-logging-methods_new................
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
additive manufacturing of ss316l using mig welding
Embodied AI: Ushering in the Next Era of Intelligent Systems
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
R24 SURVEYING LAB MANUAL for civil enggi
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Project quality management in manufacturing
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Ad

All details of cryptography and all the topics of cryptography was explained

  • 3. Definition • 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”.
  • 4. • 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.
  • 5. Features Of Cryptography are as follows: 1.Confidentiality: Information can only be accessed by the person for whom it is intended and no other person except him can access it. 2.Integrity: Information cannot be modified in storage or transition between sender and intended receiver without any addition to information being detected. 3.Non-repudiation: The creator/sender of information cannot deny his intention to send information at later stage. 4.Authentication: The identities of sender and receiver are confirmed. As well as destination/origin of information is confirmed.
  • 6. Types of Cryptography 1. Symmetric Cryptography 2. Asymmetric Cryptography 3. Hash Function
  • 10. Characteristics of Public Encryption key: • Public key Encryption is important because it is infeasible to determine the decryption key given only the knowledge of the cryptographic algorithm and encryption key. • Either of the two keys (Public and Private key) can be used for encryption with other key used for decryption. • Due to Public key cryptosystem, public keys can be freely shared, allowing users an easy and convenient method for encrypting content and verifying digital signatures, and private keys can be kept secret, ensuring only the owners of the private keys can decrypt content and create digital signatures.
  • 11. Example • Public keys of every user are present in the Public key Register. If B wants to send a confidential message to C, then B encrypt the message using C Public key. When C receives the message from B then C can decrypt it using its own Private key. No other recipient other than C can decrypt the message because only C know C’s private key.
  • 12. Basis Private Key Encryption Public-Key Encryption Required for Work: •Same algorithm with the same key is used for encryption and decryption. •The sender and receiver must share the algorithm and key. •One algorithm is used for encryption and a related algorithm decryption with pair of keys, one for encryption and other for decryption. •Receiver and Sender must each have one of the matched pair of keys (not identical) . Required for Security: •Key must be kept secret. •If the key is secret, it is very impossible to decipher message. •Knowledge of the algorithm plus samples of ciphertext must be impractical to determine the key. •One of the two keys must be kept secret. •If one of the key is kept secret, it is very impossible to decipher message. •Knowledge of the algorithm plus one of the keys plus samples of ciphertext must be impractical to determine the other key.
  • 13. Key Terms • Cryptography : Cryptography is the process of hiding or coding information so that only the person a message was intended for can read it. • PlainText : plaintext is usually ordinary readable text before it is encrypted into ciphertext. • Ciphertext : Ciphertext is encrypted text transformed from plaintext using an encryption algorithm. Ciphertext can't be read until it has been converted into plaintext • Cipher : A cipher is an algorithm for encrypting and decrypting data.
  • 14. • Key : key is a string of characters used within an encryption algorithm for altering data so that it appears random. • Cryptanalysis : Cryptanalysis is the study of the cryptographic algorithm and the breaking of those secret codes. The person practicing Cryptanalysis is called a Cryptanalyst.
  • 16. Hash Functions • 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.
  • 17. • Hash functions are extremely useful and appear in almost all information security applications. • A hash function is a mathematical function that converts a numerical input value into another compressed numerical value. The input to the hash function is of arbitrary length but output is always of fixed length. • Values returned by a hash function are called message digest or simply hash values. The following picture illustrated hash function
  • 19. Features of Hash Functions Fixed Length Output (Hash Value) • Hash function coverts data of arbitrary length to a fixed length. This process is often referred to as hashing the data. • In general, the hash is much smaller than the input data, hence hash functions are sometimes called compression functions. • Since a hash is a smaller representation of a larger data, it is also referred to as a digest. • Hash function with n bit output is referred to as an n-bit hash function. Popular hash functions generate values between 160 and 512 bits
  • 20. Efficiency of Operation • Generally for any hash function h with input x, computation of h(x) is a fast operation. • Computationally hash functions are much faster than a symmetric encryption.
  • 21. Properties of Hash Functions • Pre-Image Resistance • This property means that it should be computationally hard to reverse a hash function. • In other words, if a hash function h produced a hash value z, then it should be a difficult process to find any input value x that hashes to z. • This property protects against an attacker who only has a hash value and is trying to find the input.
  • 22. • Second Pre-Image Resistance • This property means given an input and its hash, it should be hard to find a different input with the same hash. • In other words, if a hash function h for an input x produces hash value h(x), then it should be difficult to find any other input value y such that h(y) = h(x). • This property of hash function protects against an attacker who has an input value and its hash, and wants to substitute different value as legitimate value in place of original input value.
  • 23. • Collision Resistance • This property means it should be hard to find two different inputs of any length that result in the same hash. This property is also referred to as collision free hash function. • In other words, for a hash function h, it is hard to find any two different inputs x and y such that h(x) = h(y). • Since, hash function is compressing function with fixed hash length, it is impossible for a hash function not to have collisions. This property of collision free only confirms that these collisions should be hard to find. • This property makes it very difficult for an attacker to find two input values with the same hash. • Also, if a hash function is collision-resistant then it is second pre-image resistant.
  • 24. Applications of Hash Functions Password Storage • Hash functions provide protection to password storage. • Instead of storing password in clear, mostly all logon processes store the hash values of passwords in the file. • An intruder can only see the hashes of passwords, even if he accessed the password. He can neither logon using hash nor can he derive the password from hash value since hash function possesses the property of pre-image resistance.
  • 25. Data Integrity Check • Data integrity check is a most common application of the hash functions. It is used to generate the checksums on data files. This application provides assurance to the user about correctness of the data.
  • 26. • The integrity check helps the user to detect any changes made to original file. It however, does not provide any assurance about originality. The attacker, instead of modifying file data, can change the entire file and compute all together new hash and send to the receiver. This integrity check application is useful only if the user is sure about the originality of file.
  • 27. Popular Hash Functions Message Digest (MD) • MD5 was most popular and widely used hash function for quite some years. • The MD family comprises of hash functions MD2, MD4, MD5 and MD6. It was adopted as Internet Standard RFC 1321. It is a 128-bit hash function. • MD5 digests have been widely used in the software world to provide assurance about integrity of transferred file. For example, file servers often provide a pre-computed MD5 checksum for the files, so that a user can compare the checksum of the downloaded file to it. • In 2004, collisions were found in MD5. An analytical attack was reported to be successful only in an hour by using computer cluster. This collision attack resulted in compromised MD5 and hence it is no longer recommended for use.
  • 28. • Secure Hash Function (SHA) • Family of SHA comprise of four SHA algorithms; SHA-0, SHA-1, SHA-2, and SHA-3. Though from same family, there are structurally different. • The original version is SHA-0, a 160-bit hash function, was published by the National Institute of Standards and Technology (NIST) in 1993. It had few weaknesses and did not become very popular. Later in 1995, SHA-1 was designed to correct alleged weaknesses of SHA-0. • SHA-1 is the most widely used of the existing SHA hash functions. It is employed in several widely used applications and protocols including Secure Socket Layer (SSL) security. • In 2005, a method was found for uncovering collisions for SHA-1 within practical time frame making long-term employability of SHA-1 doubtful.
  • 29. • SHA-2 family has four further SHA variants, SHA-224, SHA-256, SHA-384, and SHA-512 depending up on number of bits in their hash value. No successful attacks have yet been reported on SHA-2 hash function. • Though SHA-2 is a strong hash function. Though significantly different, its basic design is still follows design of SHA-1. Hence, NIST called for new competitive hash function designs. • In October 2012, the NIST chose the Keccak algorithm as the new SHA-3 standard. Keccak offers many benefits, such as efficient performance and good resistance for attacks.
  • 30. Applications Of Cryptography • Computer passwords: Cryptography is widely utilized in computer security, particularly when creating and maintaining passwords. When a user logs in, their password is hashed and compared to the hash that was previously stored. Passwords are hashed and encrypted before being stored. In this technique, the passwords are encrypted so that even if a hacker gains access to the password database, they cannot read the passwords. • Digital Currencies: To safeguard transactions and prevent fraud, digital currencies like Bitcoin also use cryptography. Complex algorithms and cryptographic keys are used to safeguard transactions, making it nearly hard to tamper with or forge the transactions.
  • 31. • Secure web browsing: Online browsing security is provided by the use of cryptography, which shields users from eavesdropping and man-in- the-middle assaults. Public key cryptography is used by the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols to encrypt data sent between the web server and the client, establishing a secure channel for communication. • Electronic signatures: Electronic signatures serve as the digital equivalent of a handwritten signature and are used to sign documents. Digital signatures are created using cryptography and can be validated using public key cryptography. In many nations, electronic signatures are enforceable by law, and their use is expanding quickly.
  • 32. • Authentication: Cryptography is used for authentication in many different situations, such as when accessing a bank account, logging into a computer, or using a secure network. Cryptographic methods are employed by authentication protocols to confirm the user’s identity and confirm that they have the required access rights to the resource. • Cryptocurrencies: Cryptography is heavily used by cryptocurrencies like Bitcoin and Ethereum to safeguard transactions, thwart fraud, and maintain the network’s integrity. Complex algorithms and cryptographic keys are used to safeguard transactions, making it nearly hard to tamper with or forge the transactions.
  • 33. • End-to-End Encryption: End-to- end encryption is used to protect two-way communications like video conversations, instant messages, and email. Even if the message is encrypted, it assures that only the intended receivers can read the message. End-to-end encryption is widely used in communication apps like WhatsApp and Signal, and it provides a high level of security and privacy for users.
  • 34. Adventages • Access Control: Cryptography can be used for access control to ensure that only parties with the proper permissions have access to a resource. Only those with the correct decryption key can access the resource thanks to encryption. • Secure Communication: For secure online communication, cryptography is crucial. It offers secure mechanisms for transmitting private information like passwords, bank account numbers, and other sensitive data over the internet.
  • 35. Adventages • Protection against attacks: Cryptography aids in the defence against various types of assaults, including replay and man-in-the-middle attacks. It offers strategies for spotting and stopping these assaults. • Compliance with legal requirements: Cryptography can assist firms in meeting a variety of legal requirements, including data protection and privacy legislation.
  • 36. GAK – Government Access to Keys GAK means that software companies will give copies of all keys to the government The government promises that they will hold on to the keys in a secure way, and will only use them when a court issues a warrant to do so To the government, this issue is similar to the ability to wiretap phones
  • 38. Substitutio n Cipher: Substitution Ciphers are further divided into Mono-alphabetic Cipher and Poly- alphabetic Cipher. • Mono-alphabetic Cipher – In mono-alphabetic ciphers, each symbol in plain-text is mapped to one cipher-text symbol. No matter how many times a symbol occurs in the plain-text, it will correspond to the same cipher-text symbol. For example, if the plain-text is ‘follow’ and the mapping is :f -> g • o -> p • l -> m • w -> x • The cipher-text is ‘gpmmpx’.
  • 40. Caesar Cipher • It is a mono-alphabetic cipher wherein each letter of the plaintext is substituted by another letter to form the ciphertext. It is a simplest form of substitution cipher scheme. • This cryptosystem is generally referred to as the Shift Cipher. The concept is to replace each alphabet by another alphabet which is ‘shifted’ by some fixed number between 0 and 25. • For this type of scheme, both sender and receiver agree on a ‘secret shift number’ for shifting the alphabet. This number which is between 0 and 25 becomes the key of encryption.
  • 41. Process of Shift Cipher • In order to encrypt a plaintext letter, the sender positions the sliding ruler underneath the first set of plaintext letters and slides it to LEFT by the number of positions of the secret shift. • The plaintext letter is then encrypted to the ciphertext letter on the sliding ruler underneath. The result of this process is depicted in the following illustration for an agreed shift of three positions. In this case, the plaintext ‘tutorial’ is encrypted to the ciphertext ‘WXWRULDO’. Here is the ciphertext alphabet for a Shift of 3 −
  • 42. •On receiving the ciphertext, the receiver who also knows the secret shift, positions his sliding ruler underneath the ciphertext alphabet and slides it to RIGHT by the agreed shift number, 3 in this case. •He then replaces the ciphertext letter by the plaintext letter on the sliding ruler underneath. Hence the ciphertext ‘WXWRULDO’ is decrypted to ‘tutorial’. To decrypt a message encoded with a Shift of 3, generate the plaintext alphabet using a shift of ‘-3’ as shown below −
  • 43. • Caesar Cipher is not a secure cryptosystem because there are only 26 possible keys to try out. An attacker can carry out an exhaustive key search with available limited computing resources.
  • 44. Simple Substitution Cipher • It is an improvement to the Caesar Cipher. Instead of shifting the alphabets by some number, this scheme uses some permutation of the letters in alphabet. • With 26 letters in alphabet, the possible permutations are 26! (Factorial of 26) which is equal to 4x1026 . The sender and the receiver may choose any one of these possible permutation as a ciphertext alphabet. This permutation is the secret key of the scheme.
  • 45. • Write the alphabets A, B, C,...,Z in the natural order. • The sender and the receiver decide on a randomly selected permutation of the letters of the alphabet. • Underneath the natural order alphabets, write out the chosen permutation of the letters of the alphabet. For encryption, sender replaces each plaintext letters by substituting the permutation letter that is directly beneath it in the table. This process is shown in the following illustration. In this example, the chosen permutation is K,D, G, ..., O. The plaintext ‘point’ is encrypted to ‘MJBXZ’.
  • 58. Digital Signature • A digital signature is a mathematical technique used to validate the authenticity and integrity of a message, software, or digital document.
  • 60. Steps in Creating Digital Signature • Message digest is computed by applying hash function on the message and then message digest is encrypted using private key of sender to form the digital signature. (digital signature = encryption (private key of sender, message digest) and message digest = message digest algorithm(message) • Digital signature is then transmitted with the message.(message + digital signature is transmitted)
  • 61. • Receiver decrypts the digital signature using the public key of sender.(This assures authenticity, as only sender has his private key so only sender can encrypt using his private key which can thus be decrypted by sender’s public key). • The receiver now has the message digest. • The receiver can compute the message digest from the message (actual message is sent with the digital signature). • The message digest computed by receiver and the message digest (got by decryption on digital signature) need to be same for ensuring integrity.
  • 62. Public Key Infrastructure • PKI (public key infrastructure) is the underlying framework that enables entities -- users and servers -- to securely exchange information using digital certificates. The entities that facilitate and use PKI typically involve general internet users, web clients or browsers, and company servers. • It is a standard followed for managing, storing and revoking the digital certificate.
  • 63. Architecture of PKI • Certificate repository • Entity • Registration authority (RA) • Certification authority (CA)
  • 64. • Certificate Authority : In cryptography, a certificate authority or certification authority is an entity that stores, signs, and issues digital certificates. A digital certificate certifies the ownership of a public key by the named subject of the certificate. • Entity : An Entity is a user of PKI certificates and/or the end user system that is the subject of a certificate, such as an e-mail client, a web server, a web browser, or a VPN- gateway.
  • 65. • Registration Authority : A registration authority (RA) is an authority in a network that verifies user requests for a digital certificate and tells the certificate authority (CA) to issue it • The main goal of a CA is to verify the authenticity and trustworthiness of a website, domain and organization so users know exactly who they're communicating with online and whether that entity can be trusted with their data. • When a CA issues a digital certificate for a website, users know they are connected with an official website, not a fake or spoofed website created by a hacker to steal their information or money.
  • 66. Digital Certificate • Digital certificate is issued by a trusted third party which proves sender’s identity to the receiver and receiver’s identity to the sender. • A digital certificate is a certificate issued by a Certificate Authority (CA) to verify the identity of the certificate holder. The CA issues an encrypted digital certificate containing the applicant’s public key and a variety of other identification information. • Digital certificate is used to attach public key with a particular individual or an entity.
  • 67. Digital certificate contains: 1.Name of certificate holder. 2.Serial number which is used to uniquely identify a certificate, the individual or the entity identified by the certificate 3.Expiration dates. 4.Copy of certificate holder’s public key. (used for decrypting messages and digital signatures) 5.Digital Signature of the certificate issuing authority.
  • 69. IP Security (IPSec) • IP Sec (Internet Protocol Security) is an Internet Engineering Task Force (IETF) standard suite of protocols between two communication points across the IP network that provide data authentication, integrity, and confidentiality. It also defines the encrypted, decrypted, and authenticated packets. The protocols needed for secure key exchange and key management are defined in it.
  • 70. Uses of IPSec • To encrypt application layer data. • To provide security for routers sending routing data across the public internet. • To provide authentication without encryption, like to authenticate that the data originates from a known sender
  • 71. Components of IP Security 1.Encapsulating Security Payload (ESP) 2.Authentication Header (AH)
  • 72. IP Security Architecture • IPSec (IP Security) architecture uses two protocols to secure the traffic or data flow. These protocols are ESP (Encapsulation Security Payload) and AH (Authentication Header). IPSec Architecture includes protocols, algorithms, DOI, and Key Management. All these components are very important in order to provide the three main services: • Confidentiality • Authenticity • Integrity
  • 74. Secure Socket Layer (SSL) • SSL, or Secure Sockets Layer, is an encryption-based Internet security protocol. It was first developed by Netscape in 1995 for the purpose of ensuring privacy, authentication, and data integrity in Internet communications. SSL is the predecessor to the modern TLS encryption used today. • A website that implements SSL/TLS has "HTTPS" in its URL instead of "HTTP."
  • 76. How does SSL/TLS work? • In order to provide a high degree of privacy, SSL encrypts data that is transmitted across the web. This means that anyone who tries to intercept this data will only see a garbled mix of characters that is nearly impossible to decrypt. • SSL initiates an authentication process called a handshake between two communicating devices to ensure that both devices are really who they claim to be. • SSL also digitally signs data in order to provide data integrity, verifying that the data is not tampered with before reaching its intended recipient.
  • 78. Why is SSL/TLS important? • Originally, data on the Web was transmitted in plaintext that anyone could read if they intercepted the message. For example, if a consumer visited a shopping website, placed an order, and entered their credit card number on the website, that credit card number would travel across the Internet unconcealed. • SSL was created to correct this problem and protect user privacy. By encrypting any data that goes between a user and a web server, SSL ensures that anyone who intercepts the data can only see a scrambled mess of characters. The consumer's credit card number is now safe, only visible to the shopping website where they entered it. • SSL also stops certain kinds of cyber attacks: It authenticates web servers, which is important because attackers will often try to set up fake websites to trick users and steal data. It also prevents attackers from tampering with data in transit, like a tamper-proof seal on a medicine container.
  • 80. PGP • PGP stands for Pretty Good Privacy (PGP) which is invented by Phil Zimmermann. • PGP was designed to provide all four aspects of security, i.e., privacy, integrity, authentication, and non-repudiation in the sending of email. • PGP uses a digital signature (a combination of hashing and public key encryption) to provide integrity, authentication, and non-repudiation. PGP uses a combination of secret key encryption and public key encryption to provide privacy. Therefore, we can say that the digital signature uses one hash function, one secret key, and two private- public key pairs. • PGP is an open source and freely available software package for email security. • PGP provides authentication through the use of Digital Signature. • It provides confidentiality through the use of symmetric block encryption. • It provides compression by using the ZIP algorithm, and EMAIL compatibility using the radix-64 encoding scheme.
  • 81. Following are the steps taken by PGP to create secure e-mail at the sender site: • The e-mail message is hashed by using a hashing function to create a digest. • The digest is then encrypted to form a signed digest by using the sender's private key, and then signed digest is added to the original email message. • The original message and signed digest are encrypted by using a one-time secret key created by the sender. • The secret key is encrypted by using a receiver's public key. • Both the encrypted secret key and the encrypted combination of message and digest are sent together.
  • 82. PGP at the Sender site (A)
  • 83. Following are the steps taken to show how PGP uses hashing and a combination of three keys to generate the original message: • The receiver receives the combination of encrypted secret key and message digest is received. • The encrypted secret key is decrypted by using the receiver's private key to get the one-time secret key. • The secret key is then used to decrypt the combination of message and digest. • The digest is decrypted by using the sender's public key, and the original message is hashed by using a hash function to create a digest. • Both the digests are compared if both of them are equal means that all the aspects of security are preserved.
  • 84. PGP at the Receiver site (B)