qr decomposition-based cryptography - Semantic Scholar

5 downloads 0 Views 900KB Size Report
We introduce the QR-Crypt block cipher cryptography technique. QR-Crypts has new features and encryption takes place at dual level of across the string as ...
The 7th International Conference for Internet Technology and Secured Transactions (ICITST-2012)

QR DECOMPOSITION-BASED CRYPTOGRAPHY VIA IMAGE GENERATION

(QR-CRYPT)

Abdul Qayum, Prakash Kumar School of Computational and Integrative Sciences lawaharlal Nehru (SCIS, lNU) New Delhi-II0067, India

Abstract-with the globalization the computing systems have become more prone to security related threats thus development of robust technique in field of cryptography has become essential. Security in IP routing is excessively important for the modern times towards secured transmission of messages.

Symmetric

cryptography could be a sustainable solution towards trespassing of communication and misuses of information. A cryptographic algorithm is considered to be computationally secure if it cannot be broken with standard resources either in present or in future. At the time of designing that has to be kept in mind the algorithm must be

robust in nature especially when it is executing on the

lap of the IP-Routing environment. We

introduce

the

QR-Crypt

block

cipher

cryptography

technique. QR-Crypts has new features and encryption takes place at dual level of across the string as well as across the cipher image. Thus, QR-Crypt technique makes any system doubly secured. The algorithm can be implemented in higher level

language and MA TLAB can be used for image generation &

image reading. We have tried to generate a new protocol based on QR decomposition of any matrix for encryption phase and

Cryptography [2] surrounds around two main segments as [5] Symmetric encryption and Asymmetric encryption. The cryptosystem of symmetric key encryption uses same key for cipher and de-cipher messages where the key must be kept secret by the parties of a communication. Symmetric key ciphers are implemented as either block cipher or stream cipher. A block cipher enciphers input in blocks of plaintext as opposed to individual characters, the input fonn used by a stream cipher. The secret key is of coursed related to the public keyl6] in practice by a mathematical relation. The power of the security of this cryptosystem is based on algorithmic complexity. It is difficult in practice to deduce the secret key from the public key in a reasonable delay. Various block ciphers based symmetric key algorithm has been studied. This study can be tabulated as: TABLE 1. ANALYZING VARlOUS CRYPTOGRAPHY TECHNIQUES

getting back original matrix after multiplying matrices Q & R (which is obtained from cipher image). This technique can make

ALGO-RI71

Keywords-component- QR Decomposition, Binary Division, Decryption, Encryption, Matrix multiplication.

I.

INTRODUCTION

For a nation or an organization, the security of information, is a strategic objective. In modern times the importance of security of infonnation transmission has become highly important. The advancement in technology has posed a serious threat to the security of any vital information. The information can be in any shape, it may be related to Indo­ Nuclear deal, Osama-Obama operation, Russia arms deal etc. The popularization in internet and proliferation of using the e­ business, for example are conditioned by the assurance of the security offered. The method of disguising plaintext in such a way as to hide its substance is called encryptionI8}. Encrypting plaintext results in unreadable gibberish called ciphertext. You use encryption to ensure that information is hidden from anyone for whom it is not intended, even those who can see the encrypted data. The process of reverting cipher ext to its original plaintext is called decryption [I]. The entire process can be visualized through following diagram.

(Encryption)

(DecryptiPn)

Figure 1. Representation of entire scheme

97B-1-90B320-0B/7/$2S.00©2012 IEEE

TYPE

KEY SIZE

PROPERTIES

(Cipher)

the IP routing environment security to a greater level. Moddes

Block

32 Bits

Secure & Faster

X-Moddes

Block

32 Bits

DES

Block

56 Bits

Triple DES

Block

R C4

Stream

R C2

Block

168 Bits (eflective 112) Variable Bits (401128 Bits) 128 Bits

Increased Security Level & Faster Very common but less strong Good Security after DES Modification Speedy Stream Cipher in SSL

Blowfish

Block

DESX

Block

AES

Block

QRCryp

Block

Variable Bits (Upto 448 Bit) 192 Bits Variable Bits (128,192,1256) 4 Bits

Grandeur Security Useful for policy routing of packet Replaces DES and enhances security Mathematical

Manipulation & great for

any sizes.

The discussed technique QRCryp which derives its concepts from QR decomposition of a matrix[3] A. This matrix is obtained from rows corresponding to binary codes which is obtained from certain logics and keys (Discussed in algorithm part). The technique is comprised of two phases. In phase 1, images for both matrices Q & R are generated with help of MATLAB and both images are combined to get complete encrypted message while in phase 11 this encrypted message which is in form of combined image is studied to get back matrices Q & R. We get back original matrix[3] as A= Q.R. In 179

The 7th International Conference for Internet Technology and Secured Transactions (ICITST-2012)

row-wise manner each row is decoded to get back binary value for characters of the string (message) via getting ASCII values of that particular character. (Discussed in detail in algorithm part). II. ALGORITHM FOR QR-CRYPT TECHNIQUE It comprises of two phases as follows. II-A: For Encryption (Phase I) Step 1: The message to be encrypted is read as character by character. Step 2: Convert each character into its corresponding ASCII value. Step 3: Convert the ASCII code into 8-bit code by placing 0 at MSB position. Step 4: Take 4-bit ANY encryption key except 0000 and get the corresponding binary value of it, Say 1000, its decimal value is 8. Step 5: Perform Binary Division of above 8-bit code by the 4-bit key taken arbitrary. Step 6: Reverse the remainder and complement the quotient. Step 7: Find first two even number of 4-bit between 0000 and key 1000 (including both extremes) and make 8-bit code by combining them (First even number first). Take its complement. Take next two even numbers for next character i.e. 0 & 2, 2 & 4, 4 & 6, and so on. Step 8: Place the reversed Remainder on MSB 4-bit and complemented Quotient on LSB 4-bit to get 8-bit code. Step 9: Repeat step 7 and 8 for each new character for the whole string (including spacing between the characters). Step 10: Take XOR operation for output of Step 7 & Step 8. Step 11: Reverse the 8-bit code Step 12: Store Step- l l output as 1st row of a 2-D matrix A and repeat above steps for next character of string to get 2nd row and so on and get matrix A. Step 13: Get QR Decomposition of A. Step 14: Generate the image for the decomposed matrices Q & R separately.

Step 5: Separate out the MSB 4-bit for remainder and LSB 4bit for Quotient. Step 6: Reverse the remainder and complement the quotient. Step 7: Multiply 4-bit of Quotient with key and add remainder into it Step 8: Convert the 8-bit code into ASCII 7-bit by deleting 0 at MSB position. Get its Decimal Value. Step 9: Convert the ASCII code into its corresponding character. Step 10: Generate the plain text character by character TTT. ILLUSTRATIVE EXAMPLE

Let us take QR-Crypt technique for "W orld By 2050". This has to be coded and decoded as a string. ASCII values are 87, 111, 114, 108, 100 for characters in World, 32 for spacing between World & By and 50, 48, 53 for 2,0,5 respectively. III-A: QR-Crypt Encryption procedure For character'W' Step 1:

ASCII value is: 87 Binary value of 87: 1010111 Step 3: 8-bit number is: 0I0I0III Step 4: Choosing key as 1000 (its value is 8) Step 5: Binary Division 0I0I0III / 1000. Remainder is 0111 & Quotient is 1010 Step 6: Complement of quotient is 010 land reverse order of remainder is 1110 Step 7: Take 0 & 2 (first two even numbers in 4-bit between 0000 and key- l000) its binary equivalent is: 0000, 0010. 8-bit combined code is 00000010 and complement of this number is: 11111101 Step 8: Combined 8-Bit code is: 11100101 (Refer to algorithm step 8) Step 9: Repeat step 7 and 8 for each new character for the whole string (including spacing between the characters). Step 10: XOR Operation: (11111101) XOR (11100101) = 00011000 Step 11: Reverse ofXOR Result: 00011000 Step 12: Store this 8-Bit code as 1st row of 2-D matrix A. Step 2:

II-B: For QR-Crypt Decryption (Phase II)

'

General Algorithm:

For Second character' 0

Since the algorithm is based on symmetric cryptography so the encrypted message will be decrypted to obtain the original message in the reverse manner. This is presented below:

Step 1:

Stepl: Read the encrypted images corresponding to matrix Q & R and get the matrices correspond to it. Step 2: Use matrix multiplication operation to get A=QR. Step 3: Read data from the matrix A in row-wise manner. Algorithm for each row: Step 1:

Get the 8-bit code from each row of the matrix A. Reverse this 8-Bit code. Step 3: Find first two even number of 4-bit between 0000 and key 1000 (including both extremes) and make 8-bit code by combining them (First even number first). Take its complement. Take next two even numbers for next character i.e. 0 & 2, 2 & 4, 4 & 6, and so on. Step 4: XOR complemented 8-bit value of step 2 with 8-bit code of step 3. Step 2:

978-1-908320-08/7/$2S.00©2012 IEEE

ASCII value is: 111 Step 2: Binary value of 111: 1101111 Step 3: 8-bit number is: 01101111 Step 4: Choosing key as 1000 (its value is 8) Step 5: Binary Division 01010111 / 1000. Remainder is 0111 & Quotient is 1101 Step 6: Complement of quotient is 0010 and reverse order of remainder is 1110 Step 7: Take 2 & 4 (Next two even numbers in 4-bit between 0000 and key- l000) its binary equivalent is: 0010, 0100. 8-bit combined code is 00100100 and complement of this number is: 11011011 Step 8: Combined 8-Bit code is: l l100010 (Refer to algorithm step 8) Step 9: Repeat step 7 and 8 for each new character for the whole string (including spacing between the characters). Step 10: XOR Operation: (11011011) XOR (11100010) = 00111001 Step 11: Reverse ofXOR Result: 10011100 180

The 7th International Conference for Internet Technology and Secured Transactions (ICITST-2012)

Step 12:

Store this 8-Bit code as Ist row of 2-D matrix A.

For the spacing' , between word W orld & By: Step 1:

ASCII value is: 32 Step 2: Binary value of 32: 100000 Step 3: 8-bit number is: 00100000 Step 4: Choosing key as 1000 (its value is 8) Step 5: Binary Division 01010111 / 1000. Remainder is 0000 & Quotient is 0100 Step 6: Complement of quotient is 10II and reverse order of remainder is 0000 Step 7: Take 0 & 2 (Set of two even numbers in 4-bit between 0000 and key-I000) its binary equivalent is: 0000, 0010. 8-bit combined code is 00000010 and complement of this number is: 11111101 Step 8: Combined 8-Bit code is: 0000I0II (Refer to algorithm step 8) Step 9: Repeat step 7 and 8 for each new character for the whole string (including spacing between the characters). Step 10: XOR Operation: 11110110 (11111101) XOR (00001011) Step 11: Reverse ofXOR Result: 01101111 Step 12: Store this 8-Bit code as 6th row of 2-D matrix A. =

000

100 1

100

000 1

1 1

10 10

10

o 0 1 1 10 10 o 1

1 1

0

A= o 0

o0

100 1 10 10 o 0 1 1 100 1 o 1

0

o0

o 0 10

1 1 1

o 100

1 10

o 000

10 1

QR decomposition of A is:

-0.5774

-Orx:oJ

0.4(,39

022R7

-0_1410 -02501

-0.2760 -05827

01443

0.2223

-00648

0.4703

-02515

02379

(}O%8

-OJ6JO

0_2815

-01449

00993

046J9

0_2287

0.6012

0.2515

-0.2379

-OO9()8

O.J('JO -02815

0_1449

-00993

-04446

02934

-O_I9()J

o -0.5774

-0.2887

o o

-05774

Q= 0 -0.5774

For digit T:

-05774

-02790

0_1297

-00073

-0.1244

0.2(,10 -01092

-OJ!921

-0.1443

-00677

01443

o

-fUEl

-04330

-04330

-05774

OlR85

-0.1032

-01086

-OJlm8

-00320 -0.4593

OJ5J6

05203

-0.0585

-0.2091

-034J6

00512

O.4CX)('

-001126

00800

0.2109

-0.4257

-OJ!919

-03181

-OT,44

-05182

00141

0.2(,10 -01092

-(l.O921

-02253

-O.2R97 -05723

-01057

03920

0.2223

-OA630

03759

-0.1293

0.3950

0.1779

-00648

-00271

0.3083

OJ1441

-014R6

OJ!9m 00411

-OA330

0.2(,10 -01092

-(l.O921

-02253

-(}2R97

07610

OJ)(,()8

OJ)238

00651

-(}1443

-00677

-001126

OORoo

-0.3(,80

0.3733

-OJ!?55

0.5765

00371

-OJ!?61

-OA330 -02030

OA232

0.123(,

0.37R5

02202

o .lom

02252

-O.I('("X)

0.1572

00525

0.1(,74

-025R3

0.7(,11

-01164

-0.2541

-0111(,

-00372

00044

0.2887

0.1353

Step 1:

ASCII value is: 50 Step 2: Binary value of 50: 1100I0 Step 3: 8-bit number is: 00110010 Step 4: Choosing key as 1000 (its value is 8) Step 5: Binary Division 01010111 / 1000. Remainder is 0010 & Quotient is 0II0 Step 6: Complement of quotient is 100 land reverse order of remainder is 0100 Step 7: Take 8 & 0 (first two even numbers in 4-bit between 0000 and key-I000) its binary equivalent is: 1000, 0000. 8-bit combined code is 10000000 and complement of this number is: 01111111 Step 8: Combined 8-Bit code is: 01001001 (Refer to algorithm step 8) Step 9: Repeat step 7 and 8 for each new character for the whole string (including spacing between the characters). Step 10: XOR Operation: (01111111) XOR (01001001) 00110110 Step 11: Reverse ofXOR Result: 01101100 Step 12: Store this 8-Bit code as lo th row of matrix A.

000 1

-\.7321 o

0

OAR43

-0.1237

00972

0

-1.7321 -1.7321 -1.1547 -0.5774

-2.3094 -UlI04 -1.7321 -0.5774 -0.5774 -\.7321 2.1554 1.5078 o

o

o

\.3139

0.0387

1.477H 1.0715

0.8119

0.5904

0.0897 \.7275

0.2706

1.2116

0.4969 O'(lIIH

-1.2430

Get the image for Matrix Q:

=

Figure 2.

:

Image of Matrix Q

3.

:

Image of Matrix R

Similarly, it can be done for remaining other characters. Finally, we will get a matrix A of order 13 x 8 for the string "World By 2050".

Figure

Entire Encrypted Message is:

(i) Tn RGB Format:

978-1-908320-08/7/$2S.00©2012 IEEE

181

OJ1473 -03509

0.5944 -00