Nothing Special   »   [go: up one dir, main page]

Cryptography

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 60

Cryptography

Introduction

Cryptology is defined as the


practice and study of techniques
for secure communications in
presence of adversaries (third
parties) which is under
cryptography and cryptanalysis
Cryptography

• A word with Greek origins, means “secret writing”.


• However we use the term to refer to the science and art of
transforming message to make them secure and immune to attacks.
• It is used for security purpose
Cryptography is
composed of two
major goals:

Information privacy: Authentication:


for keeping information transmitted To check the integrity of the message
via a network private without giving received by the user from another
any information to third party part connected via the same network.
Basic terminologies

Cipher text :coded message.

Cipher: algorithm for transforming plaintext to cipher text.

Key : info used in cipher known only to sender/receiver.

Encipher (encrypt): converting plaintext to ciphertext.

Decipher (decrypt): recovering cipher text from plaintext.


Plaintext is referred to as the original message is then convert to a ciphertext.

The encryption process consists of an algorithm and key.

The key is a value independent of the plaintext.

Changing the key changes the out of the algorithm.

Once cipher text is produced, it may be transmitted.

Upon reception, the ciphertext can be transformed back to the original plaintext by using decryption algorithm
and the same key was used for encryption
Category of algorithm

We divide all the cryptography


algorithm (ciphers) into two
groups:-

Symmetric key (secret-key) Asymmetric (public key)


cryptography algorithms cryptography algorithms
Symmetric key cryptography

Cryptosystem that
makes use of
symmetric key
distribution use same
key for encryption
and decryption.
• Example of symmetric key algorithm are DES,
3DES and AES
• The most popular symmetric key system is
Data encryption standard (DES)
Asymmetric key cryptography

Cryptosystem that make use of asymmetric key


distribution use a public key system that consists of
two parts:
• Private key which is kept secret
• Public key which is distributed over the network.
Asymmetric key cryptography

• The sender encrypts the message using the public


key of the receiver.
• The receiver makes use of its private key to
decrypt the message
Asymmetric key cryptography
Classical encryption techniques

• There are two basic building blocks of all


encryption techniques: substitution and
transposition.
Substitution techniques

• A substitution techniques is one in which letters


of plaintext are replaced by letters or by number
or symbols
• If plaintext is viewed as a sequence of bits, then
substitutions involves replacing plaintext bit
patterns with cipher text bit pattern.
Caesar cipher (or shift cipher)

• Simple method of encoding messages.


• Use substitution cipher methods where letters in
the alphabets are shifted.
• A Caesar cipher with a shift of 11 would encode
an A as a B, an M as an N, and a Z as an A, and so
on.
Caesar cipher (or shift cipher)
Example of caeser cipher 1

• Using a Caesar cipher described by the table below,


encode the following message: “I like chemistry” with
shift 10
Playfair cipher

• Best known multiple letter encryption


cipher is playfair which treats diagrams in
the plaintext as a single units and translate
these units into cipher text diagrams
Playfair cipher

• The playfair algorithm is based on the use of 5x5 matrix of letters


contrasted using keyword.

• Let the keyword be monarchy and plaintext instruments

• The matrix is constructed by filing in the letter of the keyword


(minus duplicates) from left to right and from top to bottom then
filling in the remainder of the matrix with the remaining letters in
alphabetical order.
Playfair cipher

• Generate the key Square(5×5): The key square is a 5×5 grid of


alphabets that acts as the key for encrypting the plaintext. Each
of the 25 alphabets must be unique and one letter of the alphabet
(usually J) is omitted from the table (as the table can hold only 25
alphabets). If the plaintext contains J, then it is replaced by I.

• The initial alphabets in the key square are the unique alphabets
of the key in the order in which they appear followed by the
remaining letters of the alphabet in order.
Playfair cipher

• Algorithm to encrypt the plain text: The plaintext is


split into pairs of two letters (digraphs). If there is an
odd number of letters, a Z is added to the last letter.
Encryption and decryption in playfair cipher

• If both letter are in the same column, take the letter below each
one.
Encryption and decryption in playfair cipher

• If both letter are in the same row: take the letter to the right of
each one (going back to the leftmost of at the rightmost position)
Encryption and decryption in playfair cipher

• If neither of the above rules is true: Form a rectangle with the two
letters and take the letters on the horizontal opposite corner of
the rectangle.
Encryption and decryption in playfair cipher
Playfair cipher
Vigenere cipher

• Method of encrypting message by using different series of


different Caesar ciphers based on the letters of a
particular keyword.
• The Vigenère cipher is more powerful than a single Caesar
cipher and is much harder to crack.
History of Vigenere cipher

• Blaise de Vigenère, created a very simple cipher that is moderately


difficult for any unintended parties to decipher
• here are too many possible keys to brute-force, even if the key is known to
come from a particular language
• It cannot be broken with the word pattern attack that worked on the
simple substitution cipher.
• It is thought to have remained unbroken until Charles Babbage, considered
to be the father of computers, broke it in the 19th19th century.
Vigenere cipher

• Combination of Caesar cipher shift combined with a keyword.


• The length of the keyword determines the number of different
encryptions that are applied to the plaintext.
• For example, if the keyword is 4 characters in length, then the
plaintext is divided into 4 subtexts and a separate Caesar shift is
applied to each subtext depending on the value of the
corresponding letter in the keyword.
Vigenere cipher

• For example, if the keyword is 4 characters in length,


then the plaintext is divided into 4 subtexts and a
separate Caesar shift is applied to each subtext
depending on the value of the corresponding letter in the
keyword.
Vigenere cipher

• for example, an "A" in one subtext could be encoded as a


"T", and in another subtext it could be encoded as a "P".
Vigenere cipher

• 26 possible Caesar cipher


represented in the table (one per
row)
• Since each row displays the
alphabet shifted by one more letter
than the above row. The key letter
is shown at the beginning of each
row. The rest of the row shows the
letters A to Z (in shifted order)
Vigenere cipher

• Although there are 26 key rows


shown, the encoder will only use as
many rows (different alphabets) as
there are unique letters in the key
string.
Vigenere cipher

• The letters in the top row of the table


represent the letters in a message.
• To encode the message, find the column
headed by the letter to encode, find
where it intersects with the row of the
keyword letter that maps to the letter in
the message.
• The letter at the intersection point will
be the letter that the message letter is
encoded as.
Example of vigenere cipher

• Plaintext message : THE SUN AND THE MAN IN THE MOON


• Keyword: KING

• Encode the plaintext to ciphertext?


• First arrange the letter in the keyword with the plaintext
• Secondly, use the vigenere cipher to encode
the message
• The top column in the keyword and the left
row is the plaintext or ciphertext
• Find the intersection of the keyword and
ciphertext
Transposition cipher

Cryptographic algorithm where the order of the


alphabets in the plaintext is rearrange to form a
cipher text.
Rail fence cipher

• Form of transposition cipher


• In rail fence cipher, the plaintext is written
downwards and diagonally on successive “rails” then
moving up when we reach the bottom
• When we reach the top rail, the message is written
downwards again until the whole plaintext is
written.
Example of rails fence cipher

• Message is “We are discovered. Fleet at once” encrypted


with three rails.

• Encrypted message is “WECRLTEERDSOEEFEAOCAIVDEN"


DES

• DES stands for data encryption standard


• Developed in 1977
• Multi-round cipher that divides the full text into 2 parts and then
work part individually.
AES

• AES stands for advanced encryption standard


• Develop on 2001
• Created to make the process six time faster than triple DES
• One of the mostly widely used symmetric block cipher algorithm
now days.
Steganography

• Steganography is the art and science of writing hidden messages in such


a way that no one apart from the sender and intended recipient even
realizes there is a hidden message
• Like encryption, steganography involves the securing of information
through the manipulation of data
• cryptography obscures the meaning of a message, but it does not conceal
the fact that there is a message
• Steganography is designed to hide the data from the view
Steganography

• Steganography is the science of hiding information. Whereas the goal of


cryptography is to make data unreadable by a third party, the goal of
steganography is to hide the data from a third party
Steganographic message

• Steganographic Message has three


parts:-
• Container or carrier : the file which
conceals data
• Hidden message: the actual data
• Steganography key: could be the
hidden message was also
encrypted or the key used for the
steganography method.
Blockchain

• Blockchain is a decentralized, distributed digital ledger technology


• Key features:-
• Transparency: All participants can view the entire transaction history.
• Immutability: once data is added, it cannot be altered or deleted
• Security: Cryptography ensures data integrity and protection against
tampering
• Revolutionizing industries like finance, supply chain, healthcare
and more.
How does blockchain works:

• Blocks are link in chronological chain


• Components
• Transaction: Record of data exchanges (e.g: financial transaction, asset
transfers)
• Block: Data containers that store multiple transactions
• Consensus mechanism: agreement process for validating and adding
transaction to the chain
• Visualize the process of transaction being added to blocks and
linked together
How does blockchain works:
Example on block chain used in university

In university setting, this technology can be used to keep track of student record,
certificates and academic achievements.
• Create student records: When student enrols in a university, their information is
recorded
• Digital certificates: when student completes a course or graduates, the
university issues a digital certificates.
• Certificate on the Blockchain: Instead of storing these certificates in traditional
systems, the university adds them to a blockchain. Each certificate is
represented as a unique digital "block.”
Example on block chain used in university

Hashing and Security: Before adding a certificate to the blockchain, the university creates a
unique code (hash) based on the certificate's information. This hash is like a digital fingerprint
and is used to verify the certificate's authenticity.

Verification: Whenever a student needs to prove their credentials, employers or other institutions
can use the blockchain to verify the certificate's details. They compare the certificate's hash with
the one on the blockchain. If they match, the certificate is legitimate.

Decentralization: Unlike traditional systems that might be controlled by a single entity, the
blockchain is decentralized. Many computers (nodes) participate in maintaining and verifying the
blockchain. This reduces the risk of tampering or fraud.
Example on block chain used in university

Transparency: Students, employers, and institutions with permission can access the
blockchain to view and verify certificates. This transparency ensures trust in the
educational credentials.

Security and Integrity: Once information is added to the blockchain, it cannot be easily
changed or deleted. This ensures that student records and certificates remain accurate
and secure over time.

Efficiency: Using a blockchain streamlines the process of verifying credentials. It


eliminates the need for manual verification and reduces administrative tasks for both
the university and employers.
Decentralized and security

Decentralization:
• No central authority; data is stored across a network of nodes.
• Redundancy: Copies of the ledger on multiple nodes ensure data
availability.
Security:
• Cryptographic hashing and digital signatures secure data integrity.
• Immutable nature prevents unauthorized changes.
• Difficulty in altering historical transactions ensures trust.
Use cases of blockchain

• Cryptocurrencies like Bitcoin enable peer-to-peer transactions.


Finance • Smart contracts automate and secure contract execution.

• Transparent tracking of goods' journey to prevent fraud and


Supply Chain counterfeiting.

• Secure and interoperable health records for improved patient care.


Healthcare • Real Estate:
• Efficient property ownership transfer and reduced fraud.
Future of block chain

Scalability Solutions:
• Sharding: Splitting the network into smaller parts for faster processing.

Layer 2 Solutions: Off-chain networks for improved scalability.


• Integration with Emerging Technologies:
• AI and IoT combined with blockchain for enhanced efficiency.

Continued Research and Development:


• Ongoing efforts to address challenges and refine the technology.
how does cryptography help
reduce security vulnerabilities
Reduce security vulnerabilities

Confidentiality:
Cryptography ensures that only authorized parties can access and read the information. Encryption transforms the
original data into an unreadable format using a key. Without the proper key, even if an attacker gains access to the
encrypted data, they won't be able to decipher it.

Integrity:
Cryptographic techniques, like digital signatures and message authentication codes (MACs), verify the integrity of data.
Digital signatures ensure that the sender's identity is verified and that the content hasn't been tampered with. MACs
provide a way to detect any unauthorized changes to the data during transmission.

Authentication:
Cryptography allows entities to verify the identities of each other. This is crucial to prevent unauthorized access.
Public key infrastructure (PKI) is often used to facilitate authentication through digital certificates and public/private
key pairs.
Reduce security vulnerabilities

Non-Repudiation:
Cryptographic techniques can provide evidence that a particular message was sent or received by a specific entity. This
prevents parties from denying their involvement in a transaction or communication.

Access Control:
Cryptography can be used to control access to resources, systems, or data. Encrypted authentication credentials and
access tokens can help prevent unauthorized access to systems and networks.

Secure Communication:
Cryptography secures data during transmission over networks. Secure protocols like SSL/TLS encrypt data exchanged
between a user's browser and a web server, protecting against eavesdropping and man-in-the-middle attacks.
Reduce security vulnerabilities

Data Protection:
Cryptography is essential for safeguarding data at rest, such as on disk drives or
databases. Encryption ensures that even if physical access to the storage medium
is obtained, the data remains unreadable without the appropriate decryption key.

Reducing Attack Surface:


By implementing strong cryptography, organizations can reduce the potential
attack surface. Even if an attacker gains access to a system, the encrypted data
remains unreadable, making it significantly harder to exploit.

You might also like