Preliminary of Hill Cipher

© All Rights Reserved

0 views

Preliminary of Hill Cipher

© All Rights Reserved

- Improvised Asymmetric Key Encryption Algorithm Using MATLAB
- Unit 2 CRYPTOGRAPHY
- Cryptography
- Network Security u1
- A Survey on Location Based Authentication Protocols For Mobile Devices
- CYB 5272 Summary
- Groebert Automatic.identification.of.Cryptographic.primitives.in.Software
- ch11
- ijcnc050208
- wireless comm systems 4
- Computer Terminology and Software Testing
- Fully Homomorphic Scheme (Processing Encrypted Data in the Cloud)
- A Survey on DNA Based Cryptography using Differential Encryption and Decryption Algorithm
- 7. Electrical - IJEEE - Implementation of LEACH Protocol Using Homomorphic Encryption
- Prosecco Proposal
- Cryptography Role in Information Security
- El 35782786
- EFF: 20011128 wagner decl
- Cellcrypt Mobile Datasheet A4 V3.3
- UNIT - IV

You are on page 1of 16

SECURE” Submitted by Soumitra Paul (Roll-MC/PG/S-IV/18 No-

5229) of MATHEMATICS DEPARTMENT(PG) of MIDNAPORE

COLLEGE (AUTONOMOUS) towards the requirement of the course

M.Sc paper no MTMPG-404 has been carried out under my supervision

and that is has not been submitted for award for any degree elsewhere.

……………………………. …………………………………..

Signature of Co-ordinator (PG) Signature of Project Supervisor

(Dr. Himadri Shekhar Mandal) (Dr. Manimohan Mandal)

(Assistant Professor) (Associate Professor)

Page 1

I take this opportunity to express my deep sense of gratitude to all

those who helped me to complete this project. Although it is not easy to

express gratitude in this small paper but I try my best.

With immense pleasure, I would like to present this work as a

project assignment report on “Hill Cipher; Some Approaches To Make It

More Secure” under the guidance of Dr. Manimohan Mandal, I

express my heartfelt gratitude to my guide. He helped me a lot in my

project works, also encouraged and supported to make the work proceed

successfully on a forward case.

I am deeming gratified to express my gratitude to Dr. Himadri

Shekhar Mandal, Dr. Sujit Kumar De, Dr. Prasun Kumar Nayak,

Dr. Sankar Prasad Mandal, Sri Bijan Kumar Das for their consistent

and valuable support.

I also offer my thanks to all my batch mates for their unconditional

help and inspiration.

Page 2

1. Abstract

2. Introduction

3. Polyalphabetic Substitution Cipher

3.1. Hill Cipher

3.2. Modular Arithmetic

3.3. Key Space of Hill Cipher

4. Some Secured Modification of Hill Cipher

4.1 Key Space Extension

4.2. Generation of Involutary Key Matrix

4.3. Introduce a secure Variant, V

5. Still It Is Vulnerable

5.1. Known-Plaintext Attack

6. Conclusion

References

Page 3

Cryptography is the art of writing or solving codes, that is,

the practice and study for secure communication in the presence

of the third parties called adversaries. The Hill Cipher algorithm

is one of the polyalphabetic symmetric key algorithm that has

several advantages in data encryption algorithm. The Hill cipher

is a block cipher that distinguishes the letter frequencies of the

plaintext. Its simplicity because of using matrix multiplication

and inversion for encryption and decryption, and its high speed.

Several researcher tried to improve the security of Hill cipher. In

this work, some secure cryptosystem is introduced that

overcome most of security drawbacks of the Hill cipher.

Page 4

The Hill cipher was invented by Lester. S. Hill in 1929. It is a

famous polyalphabetic classical symmetric cipher based on matrix

transformation.

In the advance age of network technology, information security is

an increasingly important problem. All the operating systems like

Windows, Android, iOS, Blackberry are continuously working to

make there system more secure. Security of ATM card, computer

passwords, sending private Emails, everywhere Cryptography plays a

central role.

In modern times, cryptography is considered to be a branch of both

mathematics and computer science, and is affiliated with information

theory, computer security, and engineering.

Substitution cipher is one of the basic components of classical

ciphers. A substitution is a method of encryption by which units of

plaintext are substituted with ciphertext according to a regular system.

In this work we first discussed the original Hill cipher and its key

space; then proposed some advance modifications. Next we presented

the way of Image Encryption by Hill cipher; next vulnerability is

discussed. Finally, we described the concluding remarks.

Page 5

Some Basic Terminology:

i. Plaintext – original message

ii. Ciphertext – coded message

iii. Cipher – algorithm for transforming plaintext to ciphertext

iv. Key – info used in cipher known only to sender & receiver

v. Encryption – converting plaintext to ciphertext

vi. Decryption – recovering plaintext from ciphertext

vii. Cryptography – study of encryption & decryption method

viii. Cryptanalysis – deciphering ciphertext without knowing key

ix. Cryptology – both cryptography & cryptanalysis

Page 6

In Polyalphabetic Substitution, each occurrence of a character may have

a different substitute. The relationship between a character in the

plaintext to a character in ciphertext is one-to-many. It has the advantage

of hiding the letter frequency of the underlying language. Hacker cannot

use single-letter frequency statistic to break the ciphertext.

Example: assume that Alice and Bob decide privately their key,

K=(1,3,2,0) then Alice send Bob a message through public channel as

“attack is today”

a b c d e f g h i j

00 01 02 03 04 05 06 07 08 09

k l m n o p q r s t

10 11 12 13 14 15 16 17 18 19

u v w x y Z

20 21 22 23 24 25

Table:1

Then by encryption,

Plaintext A T T A C K I S T O D A Y

P’s 00 19 19 00 02 10 08 18 19 14 03 00 24

Values

Key 1 3 2 0 1 3 2 0 1 3 2 0 1

stream

C’s 01 22 21 00 03 13 10 18 20 17 5 0 25

Values

Ciphertext B W V A D N K S U R F A z

Table:2

Page 7

(all operations done in mod 26)

Here, Plaintext : attackistoday;

Ciphertext: BWVADNKSURFAZ

multiplications. For encryption, algorithm takes m successive plaintext letters

instead of that successive m ciphers letters. In Hill cipher each character is

assigned a numerical value as ‘a=0, b=2,... ,z=25 (like Table;1). The substitution of

ciphertext letters in the place of plaintext letters leads to m linear equations.

=( ) mod 26

Page 8

mod 26

mod 26 …………(1)

( ) ( )( ) ..……….(2)

length 3, representing the plaintext and ciphertext respectively, and K is 3×3

martix, which is the encryption key. All operation are done on mod 26 here.

Decryption requires the inverse of the matrix K. The inverse matrix

, where I is the Identity matrix. But the inverse of the matrix

does not always exist, and when it does it satisfy the preceding equation. In general

we can write as follows:

For encryption: ……………(3)

If the block length is m, there are different m letters blocks possible.

dividing the plaintext in 3×1 matrices and assigning numbers in mod 26 we

get ( ) ( ) ( ) ( ) ( ) ( ); ( ) ( );

Note that, we filled out the last matrix with uncommonly used letters. One can fill

it by repeating the last letter.

Now, ( )( ) ( ) ( )

Page 9

( )( ) ( ) ( )

( )( ) ( ) ( )

( )( ) ( ) ( )

( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )

Ciphertext: TJNVQLAIVDIG;

Decryption:

( )( ) ( ) ( )

Where ( ) ( )

again. This hill cipher is known as ‘Hill-3 Ciphers’ as key matrix is of 3×3 order.

Let m be a fixed positive integer. Two integer a & b are said to be congruent

modulo m if (a-b) is divisible by m, denoted by .

Example:

Modular Inverse: In modular arithmetic, a number ‘a’ has modular inverse

for a number m such that

In order for inverse exist, ‘a’ and ‘m’ must not have any common factors.

Page

10

To create matrices for Hill ciphers, we need to know which numbers have

invers in mod 26.

1 3 5 7 9 11 15 17 19 21 23 25

1 9 21 15 3 19 7 23 11 5 17 25

Table:3

Hill cipher uses n×n matrices. Then upper bound of key space is ,

because not all the matrices is invertible in mod 26.

Since, [ ]

That is, a matrix is invertible modulo 26 if and only if it is invertible in both mod 2

and mod 13.

The number of invertible n×n matrices modulo 2 is equal to the order of the

General Linear Group It is ( )( ) .

( )( ) ( )( ) .

Page

11

Being a symmetric key cipher, Hill cipher is used mainly as private key at

internetwork security. But it is still a weak algorithm for its small key space.

Also, finding invertible matrix is time-consuming. Besides, we can break its

security by solving some linear equations.

So, here we are going to modify these draw backs.

The risk of the matrix taken from key space having common factors of the

det(A) with the modulus can be eliminated by making the modulus prime.

Consequently, a useful variant of the Hill cipher add three extra symbols (such as

‘Space’, ‘Full Stop’ and ‘Question Mark’) with these 26 alphabets to increase the

modulus to 29 . Then key space become equivalent to General linear Group

.

The proposed algorithm uses an involutary key matrix for encryption

technique. A is called a involutary matrix if . The analysis presented here

for generation of involutary key matrix is valid for matrix of +ve integers that are

the residues of modulo arithmetic of a number. This algorithm can generate

involutary matrices of order n×n where n is even.

each.

So,

If is one the factors of then is the other.

Solving the 2nd matrix equation results .

Then form the matrix.

Page

12

Algorithm:

II. Obtain .

III. Take where k is a scalar constant.

IV. Then .

V. Form the matrix completely.

Example: (for Modulo 13)

Let ( ) then ( ).

If

then, ( ), and

( ).

So, ( )

Thus we can reduce the difficulty of calculating the inverse of the key matrix.

In Hill cipher, the ciphertext obtained from the plaintext by means of a linear

transformation. The plaintext column vector P is encrypted as C =K.P. (mod m) in

which C is the ciphertext column vector and K is an n×n key matrix where ϵ

, the ring of integers modulo m(>1). Also the ciphertext is decrypted as

.

Page

13

To make the transformation nonlinear we introduce a column vector V with

the following form : , where the variant is of the form

. This variant will be privately discussed.

For the time of decryption we use the formula .

After so many development and work Hill Cipher till has a flaw, well known

as ‘Known-Plaintext Attack’ which sometimes break the security of Hill cipher,

although this attack is laborious.

has access to some plaintext / ciphertext pair in addition to the intercepted

ciphertext that she wants to break.

The plaintext/ ciphertext pairs have been collected earlier. For example,

Alice has sent a secret message to Bob, but she has later made the contents of the

message public. Then Eve compare this plaintext/ ciphertext pair with the

previously collected pairs. He applies ‘ Brute-Force Attack’ and compares the

Page

14

letter frequencies successively and keeps going until he gets any meaningful

sentence. For example, if ciphertext is ‘THHMTH’, then by frequency count he

considers ‘e’ in place ‘H’.

The most famous theorem of information theory was said by Shannon in

1949, roughly speaking, that the only way to obtain perfect secrecy is to use the key

of infinite order (k= ).

eliminate the need of symmetric key (secret-key) cryptography. Because

asymmetric key cryptography uses mathematical functions for encryption and

decryption, is much slower than symmetric key cryptography. For encryption of

large messages, symmetric key cryptography is still needed. This work point out

the flaw of Hill Cipher and some modifications. AdvHill is a fast encryption

technique which can provide satisfactory results against the normal Hill cipher

Page

15

technique. Here, symmetric key cryptosystem is actually secure variant. Each

block of data is encrypted using different random number. Since the modulus

becomes a prime number, the key space greatly increased.

Intelligence Laboratory,July 2008

2. B. A. Forouzan & D. Mukhopadhay, “Cryptography and Network Security”,

McGraw Hill Education(India) Private Limited, reprint 2015

3. Neal Koblitz, “Algebraic Aspects of Cryptography”, Springer, Vol.3, Edition

1999

4. S. K. Panigrahy, B. Acharya, S. K. Patra & G. Panda, “Advanced Hill Cipher

Algorithm”, International Journal of Recent Trends in Engineering, Vol. 1,

No. 1, May 2009

5. V. U. K. Sastry, A. Varanasi, S. U. Kumar, ”Hill Cipher Handling the Entire

Plaintext”, International Journal of Advanced Research in Computer Science,

Vol 1, No. 4, Nov-Dec 2010

Page

16

- Improvised Asymmetric Key Encryption Algorithm Using MATLABUploaded byIOSRjournal
- Unit 2 CRYPTOGRAPHYUploaded bydev chauhan
- CryptographyUploaded byapi-3806146
- Network Security u1Uploaded bygaurav sharma
- A Survey on Location Based Authentication Protocols For Mobile DevicesUploaded byijcsn
- CYB 5272 SummaryUploaded byrhemacs3
- Groebert Automatic.identification.of.Cryptographic.primitives.in.SoftwareUploaded byassimilat
- ch11Uploaded byهُـوٍىٍ آلوٍجَـدُآن
- ijcnc050208Uploaded byAIRCC - IJCNC
- wireless comm systems 4Uploaded byabdulsahib
- Computer Terminology and Software TestingUploaded byAby De A
- Fully Homomorphic Scheme (Processing Encrypted Data in the Cloud)Uploaded byRaffy Quinto
- A Survey on DNA Based Cryptography using Differential Encryption and Decryption AlgorithmUploaded byIOSRjournal
- 7. Electrical - IJEEE - Implementation of LEACH Protocol Using Homomorphic EncryptionUploaded byiaset123
- Prosecco ProposalUploaded byAshwin Josiah Samuel
- Cryptography Role in Information SecurityUploaded byPham Ray
- El 35782786Uploaded byAnonymous 7VPPkWS8O
- EFF: 20011128 wagner declUploaded byEFF
- Cellcrypt Mobile Datasheet A4 V3.3Uploaded bymannux
- UNIT - IVUploaded byJit Agg
- Demo PresentationUploaded byAkkshhata Yevatkar
- 533Uploaded byAnonymous 633I7y
- 6509 HRLINE 030615Uploaded byDaniel Cismaru
- SS Chapter 2Uploaded byBorotho Molemo
- 136 UpdatedUploaded byJayanthidevi Panneerselvam
- stegnographyUploaded byravindra_kirar
- Conf Wassa 2004Uploaded bylarryshi
- Internet Usage and SecurityUploaded byAnusha Sree
- CL-KEM-Secure and Dynamic Effective Key Management Scheme-IJAERDV04I0183342Uploaded byEditor IJAERD
- fbfe5ce17ffe490c8fa069cd6ec7a9912e40Uploaded byShweta Joshi

- Application of Multi-Objective Optimization Using TLBO of Optimal Power FlowUploaded byAli Almisbah
- The Ising ModelUploaded byvertugo
- DFT_L6Uploaded byEric Chen
- Lecture 7 Interpolation by Direct MethodUploaded bySamuel Mawutor Gamor
- Learning From ObservationsUploaded byDurai Raj Kumar
- Data Mining-Model Based ClusteringUploaded byRaj Endran
- String Matching Problem.pptUploaded bySiva Agora Karthikeyan
- OpenSSLUploaded byPrateek Srivastava
- 2 - Recursive DefinitionUploaded byDaryl Ivan Hisola
- VLSI implementation of Fast Addition using Quaternary Signed Digit Number System.docUploaded byNsrc Nano Scientifc
- anualidades continuasUploaded byItzelRD
- NR_FDLFUploaded byJyoti Prakash Lenka
- OR.mcq(3)Uploaded byBadder Danbad
- Haindl-near-regular Btf Texture ModelUploaded byPrani Dhanpur
- ClusteringUploaded byNauman Zafar
- Lecture1-3Uploaded byradhakodirekka8732
- manualmanu123.pdfUploaded byAnonymous seMEn8wwEN
- 2006_PID_ACE06Uploaded byAleksandar Micic
- Session key based encryption paperUploaded byAnumit Sasidharan
- Path Planning Strategy for Autonomous Mobile Robot Navigation Using Petri GA Optimisation 2011 Computers Electrical EngineeringUploaded bysmkumaran90
- 2 - 4 - Cost Function - Intuition II (9 Min)Uploaded byHasaudin
- Data Mining-Constraint Based Cluster AnalysisUploaded byRaj Endran
- upsample matlabUploaded byAbhinav Arora
- Books for GateUploaded byShalu Tuteja
- Introduction to Matrix Methods.pdfUploaded byIgnatius Samraj
- MIMO With MMSE EqualizerUploaded byThinh Pham
- zimmermanUploaded byRavi Vij
- ecc2010_ch01Uploaded bySaikumar Gourishetty
- TR41.3.3!00!02-005 'Packet Loss Model' - R Jagadeesan CiscoUploaded byQing Jia
- Penny PuzzleUploaded byBob Fred