SlideShare a Scribd company logo
HILL CIPHER
Since times , security of data to maintain its confidentially has been major issue.
Codes form an important part of history starting from painting of da vinci and
Michelangelo
TERMINOLOGY
• Encipher/ encode/ encrypt : A set of steps that converts information into a secret text
(not for all).
• Plaintext : Original information
• Ciphertext : Encrypted form of plaintext. It contains all the information of the plaintext
message, but is not in a format readable by a human or computer without the proper
mechanism to decrypt it.
CRYTOGRAPHY
• a cipher (or cypher) is an algorithm for performing encryption or decryption
• Cryptography is the study of Secret (crypto-)-Writing (-graphy).It is the science or art
of
encompassing the principles and methods of transforming an intelligible message into
one that is intelligible and then transforming the message back to its original for
ENCRYPTION TECHNIQUE
• There are basically two types of encryption techniques
• Substitution :In this technique letters of plaintext are replaced by or by numbers and
symbols.
• Transposition: Transposition (or permutation) does not alter any of the bits in the
plaintext, but instant moves the position around within it.
CAESAR CIPHER
• Caesar Cipher replaces each letter of the message by a fixed letter a fixed distance
away
For example:
Plaintext: I CAME I SAW I CONQUERED
Cipher text: L FDPH L VDZ L FRQTXHUHG
Mapping is:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
DEFGHIJKLMNOPQRSTUVWXYZABC
Can describe the Cipher as:
Encryption: C=E (P)=(P+3)mod 26
Decryption: P=D(C) =(C-3) mod26
PLAY FAIR CIPHER
• The technique encrypts pairs of letters, instead of single letters as in the simple
substitution cipher.
• The Playfair is significantly harder to break since the frequency analysis used for simple
substitution ciphers does not work with it.
• A typical scenario for Playfair use would be to protect important secrets during actual
combat. By the time the enemy cryptanalysts could break the message the information
was useless to them.
• Original Text Cipher Text
SECRET MESSAGE NO RD KU NK QZ PC ND
SECRETMESSAGE NORDKUNKQZPCND
SE CR ET ME SX SA GE
MONO-ALPHABETIC-CIPHER
• A monoalphabetic substitution cipher, also known as a simple substitution cipher,
relies on a fixed replacement structure. That, is if "a" is encrypted to "R", then every
time we see the letter "a" in the plaintext, we replace it with the letter "R" in the
ciphertext.
• A B C D E F G H
f g h I j k l m n o p
HILL CIPHERS
• The core of Hill-cipher is matrix manipulations. It is a multi-letter cipher, developed by
the mathematician Lester Hill in 1929.
• Uses matrices to encrypt and decrypt
• Uses modular arithmetic (Mod 26)
Hill's cipher machine
HISTORY
• Invented by Lester S. Hill in 1929.
• The Hill cipher is a polygraphic substitution cipher based on linear algebra, as it can
work on digraphs, trigraphs (3 letter blocks) or theoretically any sized blocks.
• To counter charges that his system was too complicated for day to day use, Hill
constructed a cipher machine for his system using a series of geared wheels and
chains. However, the machine never really sold.
MODULUS THEOREM
MODULAR INVERSES
• Inverse of 2 is ½ (2 · ½ = 1)
• Matrix Inverse: AA-1= I = A-1A
• modular inverse of an integer a modulo m is an integer x such that a x = 1 (mod m).
For example:
a = 3 and m = 26.
3 x = 1 (mod 26) => x must be 9
i.e. modular inverse of 3 modulo 26 is 9.
• The modular inverse of a modulo m exists if and only if a and m are coprime
i.e. If Gcd(a, m) = 1.
HILL CIPHER MATRICES
• One matrix to encrypt, one to decrypt
• Must be n x n, invertible matrices
• Decryption matrix must be modular inverse of encryption matrix in Mod 26
• the determinant of encryption matrix must be nonzero, and must not be divisible by 2
or 13
• If the determinant of encryption matrix is 0, or divisible by 2 or 13 then it has
common factors with 26 so modular inverse doesn’t exist and the matrix cannot be
used in the Hill cipher.
ENCRYPTION
• Assign each letter in alphabet a number between 0 and 25
a=0,b=1,c=2……, z=25
• Change message into 2 x 1 letter vectors
• Change each vector into 2 x 1 numeric vectors
• Multiply each numeric vector by encryption matrix
• Convert product vectors to letters
EXAMPLE
LETTER TO NUMBER SUBSTITUTION
A B C D E F G H I J K L M
0 1 2 3 4 5 6 7 8 9 10 11 12
N O P Q R S T U V W X Y Z
13 14 15 16 17 18 19 20 21 22 23 24 25
CHANGE MESSAGE TO VECTORS
Message to encrypt = HELLO WORLD
MULTIPLY MATRIX BY VECTORS
CONVERT TO MOD 26
CONVERT NUMBERS TO LETTERS
HELLO WORLD has been encrypted to
SLHZY ATGZT
DECRYPTION MATRIX
• Calculate determinant of given encryption matrix A, det A
• Make sure that det A has a modular inverse for Mod 26
• Calculate the adjoint of A, adj A
• Multiply adj A by modular inverse of det A
• Calculate Mod 26 of the result to get B
• Use A to encrypt, B to decrypt
DECRYPTION
• Change message into 2 x 1 letter vectors
• Change each vector into 2 x 1 numeric vectors
• Multiply each numeric vector by decryption matrix
• Convert new vectors to letters
CHANGE MESSAGE TO VECTORS
Message to encrypt = SLHZYATGZT
MULTIPLY MATRIX BY VECTORS
CONVERT TO MOD 26
CONVERT NUMBERS TO LETTERS
SLHZYATGZT has been decrypted to
HELLO WORLD
OBJECTIVES
• In the next presentation, we will see how to break through the hill cypher,
requirements for breaking it and we will one or two examples using that.
THANK YOU
REFERENCES
• Wikipedia
– https://en.wikipedia.org/wiki/Hill_cipher

More Related Content

What's hot

Diffie-hellman algorithm
Diffie-hellman algorithmDiffie-hellman algorithm
Diffie-hellman algorithm
Computer_ at_home
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
ramya marichamy
 
Caesar cipher
Caesar cipherCaesar cipher
Caesar cipher
Ramadhi Irawan
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
Rashmi Burugupalli
 
Cryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie BrownCryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie Brown
Information Security Awareness Group
 
DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentation
sarhadisoftengg
 
Transposition cipher
Transposition cipherTransposition cipher
Transposition cipher
Antony Alex
 
Cryptography
CryptographyCryptography
Cryptography
Jens Patel
 
Intro to modern cryptography
Intro to modern cryptographyIntro to modern cryptography
Intro to modern cryptography
zahid-mian
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network securitypatisa
 
Rsa cryptosystem
Rsa cryptosystemRsa cryptosystem
Rsa cryptosystem
Abhishek Gautam
 
cryptography Application of linear algebra
cryptography Application of linear algebra cryptography Application of linear algebra
cryptography Application of linear algebra
Sami Ullah
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and Cryptography
Adam Reagan
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
Kathirvel Ayyaswamy
 
Cryptography
CryptographyCryptography
Cryptography
subodh pawar
 
Elliptical curve cryptography
Elliptical curve cryptographyElliptical curve cryptography
Elliptical curve cryptography
Barani Tharan
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
Sunita Kharayat
 
Cryptography
CryptographyCryptography
Cryptography
Darshini Parikh
 

What's hot (20)

Diffie-hellman algorithm
Diffie-hellman algorithmDiffie-hellman algorithm
Diffie-hellman algorithm
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Caesar cipher
Caesar cipherCaesar cipher
Caesar cipher
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
 
Cryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie BrownCryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie Brown
 
DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentation
 
Transposition cipher
Transposition cipherTransposition cipher
Transposition cipher
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
Cryptography
CryptographyCryptography
Cryptography
 
Intro to modern cryptography
Intro to modern cryptographyIntro to modern cryptography
Intro to modern cryptography
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
Rsa cryptosystem
Rsa cryptosystemRsa cryptosystem
Rsa cryptosystem
 
cryptography Application of linear algebra
cryptography Application of linear algebra cryptography Application of linear algebra
cryptography Application of linear algebra
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and Cryptography
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
 
Cryptography
CryptographyCryptography
Cryptography
 
Elliptical curve cryptography
Elliptical curve cryptographyElliptical curve cryptography
Elliptical curve cryptography
 
Ch03
Ch03Ch03
Ch03
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
 
Cryptography
CryptographyCryptography
Cryptography
 

Viewers also liked

Tx 3 hill shuman_oliver
Tx 3 hill shuman_oliverTx 3 hill shuman_oliver
Tx 3 hill shuman_oliver
OPUNITE
 
Computer Security Lecture 4.1: DES Supplementary Material
Computer Security Lecture 4.1: DES Supplementary MaterialComputer Security Lecture 4.1: DES Supplementary Material
Computer Security Lecture 4.1: DES Supplementary Material
Mohamed Loey
 
Computer Security Lecture 4: Block Ciphers and the Data Encryption Standard
Computer Security Lecture 4: Block Ciphers and the Data Encryption StandardComputer Security Lecture 4: Block Ciphers and the Data Encryption Standard
Computer Security Lecture 4: Block Ciphers and the Data Encryption Standard
Mohamed Loey
 
Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2
Mohamed Loey
 
PMP Lecture 4: Project Integration Management
PMP Lecture 4: Project Integration ManagementPMP Lecture 4: Project Integration Management
PMP Lecture 4: Project Integration Management
Mohamed Loey
 
SV.CO Program
SV.CO ProgramSV.CO Program
SV.CO Program
SV.CO
 
Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1
Mohamed Loey
 

Viewers also liked (7)

Tx 3 hill shuman_oliver
Tx 3 hill shuman_oliverTx 3 hill shuman_oliver
Tx 3 hill shuman_oliver
 
Computer Security Lecture 4.1: DES Supplementary Material
Computer Security Lecture 4.1: DES Supplementary MaterialComputer Security Lecture 4.1: DES Supplementary Material
Computer Security Lecture 4.1: DES Supplementary Material
 
Computer Security Lecture 4: Block Ciphers and the Data Encryption Standard
Computer Security Lecture 4: Block Ciphers and the Data Encryption StandardComputer Security Lecture 4: Block Ciphers and the Data Encryption Standard
Computer Security Lecture 4: Block Ciphers and the Data Encryption Standard
 
Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2
 
PMP Lecture 4: Project Integration Management
PMP Lecture 4: Project Integration ManagementPMP Lecture 4: Project Integration Management
PMP Lecture 4: Project Integration Management
 
SV.CO Program
SV.CO ProgramSV.CO Program
SV.CO Program
 
Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1
 

Similar to Applications of-linear-algebra-hill-cipher

Cryptography - 101
Cryptography - 101Cryptography - 101
Cryptography and network security Nit701
Cryptography and network security Nit701Cryptography and network security Nit701
Cryptography and network security Nit701
Amit Pathak
 
Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystem
Samdish Arora
 
Cryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptxCryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptx
RobertCarreonBula
 
Cryptography & Steganography
Cryptography & SteganographyCryptography & Steganography
Cryptography & Steganography
Animesh Shaw
 
EncryptionTechChap2.ppt
EncryptionTechChap2.pptEncryptionTechChap2.ppt
EncryptionTechChap2.ppt
rajirajesh8
 
Simple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Simple Overview Caesar and RSA Encryption_by_Tarek_GaberSimple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Simple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Tarek Gaber
 
module 1 (part A).pdf
module 1 (part A).pdfmodule 1 (part A).pdf
module 1 (part A).pdf
ChethanKrishna14
 
cryptography symmentric.pptx
cryptography symmentric.pptxcryptography symmentric.pptx
cryptography symmentric.pptx
ChethanKrishna14
 
Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)
Zara Nawaz
 
Cs166 mynote
Cs166 mynoteCs166 mynote
Cs166 mynote
Kaya Ota
 
Introduction to cryptography part2-final
Introduction to cryptography  part2-finalIntroduction to cryptography  part2-final
Introduction to cryptography part2-final
Taymoor Nazmy
 
Ch9
Ch9Ch9
Cryptography
CryptographyCryptography
Cryptography
Sandip kumar
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
bcanawakadalcollege
 
Cryptography
CryptographyCryptography
Cryptography
nayakslideshare
 
Encryptolog y-1216310707267721-9
Encryptolog y-1216310707267721-9Encryptolog y-1216310707267721-9
Encryptolog y-1216310707267721-9Shan Raja
 

Similar to Applications of-linear-algebra-hill-cipher (20)

Cryptography - 101
Cryptography - 101Cryptography - 101
Cryptography - 101
 
Cryptography-101
Cryptography-101Cryptography-101
Cryptography-101
 
Cryptography and network security Nit701
Cryptography and network security Nit701Cryptography and network security Nit701
Cryptography and network security Nit701
 
Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystem
 
Cryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptxCryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptx
 
Cryptography & Steganography
Cryptography & SteganographyCryptography & Steganography
Cryptography & Steganography
 
EncryptionTechChap2.ppt
EncryptionTechChap2.pptEncryptionTechChap2.ppt
EncryptionTechChap2.ppt
 
Simple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Simple Overview Caesar and RSA Encryption_by_Tarek_GaberSimple Overview Caesar and RSA Encryption_by_Tarek_Gaber
Simple Overview Caesar and RSA Encryption_by_Tarek_Gaber
 
module 1 (part A).pdf
module 1 (part A).pdfmodule 1 (part A).pdf
module 1 (part A).pdf
 
cryptography symmentric.pptx
cryptography symmentric.pptxcryptography symmentric.pptx
cryptography symmentric.pptx
 
Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)
 
Cs166 mynote
Cs166 mynoteCs166 mynote
Cs166 mynote
 
Introduction to cryptography part2-final
Introduction to cryptography  part2-finalIntroduction to cryptography  part2-final
Introduction to cryptography part2-final
 
Ch9
Ch9Ch9
Ch9
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Cryptography
CryptographyCryptography
Cryptography
 
Encryptolog y-1216310707267721-9
Encryptolog y-1216310707267721-9Encryptolog y-1216310707267721-9
Encryptolog y-1216310707267721-9
 
Rsa
RsaRsa
Rsa
 
Class3
Class3Class3
Class3
 

Recently uploaded

Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 

Recently uploaded (20)

Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 

Applications of-linear-algebra-hill-cipher

  • 2. Since times , security of data to maintain its confidentially has been major issue. Codes form an important part of history starting from painting of da vinci and Michelangelo
  • 3. TERMINOLOGY • Encipher/ encode/ encrypt : A set of steps that converts information into a secret text (not for all). • Plaintext : Original information • Ciphertext : Encrypted form of plaintext. It contains all the information of the plaintext message, but is not in a format readable by a human or computer without the proper mechanism to decrypt it.
  • 4. CRYTOGRAPHY • a cipher (or cypher) is an algorithm for performing encryption or decryption • Cryptography is the study of Secret (crypto-)-Writing (-graphy).It is the science or art of encompassing the principles and methods of transforming an intelligible message into one that is intelligible and then transforming the message back to its original for
  • 5. ENCRYPTION TECHNIQUE • There are basically two types of encryption techniques • Substitution :In this technique letters of plaintext are replaced by or by numbers and symbols. • Transposition: Transposition (or permutation) does not alter any of the bits in the plaintext, but instant moves the position around within it.
  • 6. CAESAR CIPHER • Caesar Cipher replaces each letter of the message by a fixed letter a fixed distance away For example: Plaintext: I CAME I SAW I CONQUERED Cipher text: L FDPH L VDZ L FRQTXHUHG Mapping is: ABCDEFGHIJKLMNOPQRSTUVWXYZ DEFGHIJKLMNOPQRSTUVWXYZABC Can describe the Cipher as: Encryption: C=E (P)=(P+3)mod 26 Decryption: P=D(C) =(C-3) mod26
  • 7. PLAY FAIR CIPHER • The technique encrypts pairs of letters, instead of single letters as in the simple substitution cipher. • The Playfair is significantly harder to break since the frequency analysis used for simple substitution ciphers does not work with it. • A typical scenario for Playfair use would be to protect important secrets during actual combat. By the time the enemy cryptanalysts could break the message the information was useless to them. • Original Text Cipher Text SECRET MESSAGE NO RD KU NK QZ PC ND SECRETMESSAGE NORDKUNKQZPCND SE CR ET ME SX SA GE
  • 8. MONO-ALPHABETIC-CIPHER • A monoalphabetic substitution cipher, also known as a simple substitution cipher, relies on a fixed replacement structure. That, is if "a" is encrypted to "R", then every time we see the letter "a" in the plaintext, we replace it with the letter "R" in the ciphertext. • A B C D E F G H f g h I j k l m n o p
  • 9. HILL CIPHERS • The core of Hill-cipher is matrix manipulations. It is a multi-letter cipher, developed by the mathematician Lester Hill in 1929. • Uses matrices to encrypt and decrypt • Uses modular arithmetic (Mod 26) Hill's cipher machine
  • 10. HISTORY • Invented by Lester S. Hill in 1929. • The Hill cipher is a polygraphic substitution cipher based on linear algebra, as it can work on digraphs, trigraphs (3 letter blocks) or theoretically any sized blocks. • To counter charges that his system was too complicated for day to day use, Hill constructed a cipher machine for his system using a series of geared wheels and chains. However, the machine never really sold.
  • 12. MODULAR INVERSES • Inverse of 2 is ½ (2 · ½ = 1) • Matrix Inverse: AA-1= I = A-1A • modular inverse of an integer a modulo m is an integer x such that a x = 1 (mod m). For example: a = 3 and m = 26. 3 x = 1 (mod 26) => x must be 9 i.e. modular inverse of 3 modulo 26 is 9. • The modular inverse of a modulo m exists if and only if a and m are coprime i.e. If Gcd(a, m) = 1.
  • 13. HILL CIPHER MATRICES • One matrix to encrypt, one to decrypt • Must be n x n, invertible matrices • Decryption matrix must be modular inverse of encryption matrix in Mod 26 • the determinant of encryption matrix must be nonzero, and must not be divisible by 2 or 13 • If the determinant of encryption matrix is 0, or divisible by 2 or 13 then it has common factors with 26 so modular inverse doesn’t exist and the matrix cannot be used in the Hill cipher.
  • 14. ENCRYPTION • Assign each letter in alphabet a number between 0 and 25 a=0,b=1,c=2……, z=25 • Change message into 2 x 1 letter vectors • Change each vector into 2 x 1 numeric vectors • Multiply each numeric vector by encryption matrix • Convert product vectors to letters
  • 16. LETTER TO NUMBER SUBSTITUTION A B C D E F G H I J K L M 0 1 2 3 4 5 6 7 8 9 10 11 12 N O P Q R S T U V W X Y Z 13 14 15 16 17 18 19 20 21 22 23 24 25
  • 17. CHANGE MESSAGE TO VECTORS Message to encrypt = HELLO WORLD
  • 20. CONVERT NUMBERS TO LETTERS HELLO WORLD has been encrypted to SLHZY ATGZT
  • 21. DECRYPTION MATRIX • Calculate determinant of given encryption matrix A, det A • Make sure that det A has a modular inverse for Mod 26 • Calculate the adjoint of A, adj A • Multiply adj A by modular inverse of det A • Calculate Mod 26 of the result to get B • Use A to encrypt, B to decrypt
  • 22. DECRYPTION • Change message into 2 x 1 letter vectors • Change each vector into 2 x 1 numeric vectors • Multiply each numeric vector by decryption matrix • Convert new vectors to letters
  • 23. CHANGE MESSAGE TO VECTORS Message to encrypt = SLHZYATGZT
  • 26. CONVERT NUMBERS TO LETTERS SLHZYATGZT has been decrypted to HELLO WORLD
  • 27. OBJECTIVES • In the next presentation, we will see how to break through the hill cypher, requirements for breaking it and we will one or two examples using that.