26.10.2012 Views

Internet Security - Dang Thanh Binh's Page

Internet Security - Dang Thanh Binh's Page

Internet Security - Dang Thanh Binh's Page

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ASYMMETRIC PUBLIC-KEY CRYPTOSYSTEMS 169<br />

To decrypt a message, perform the same exponentiation process using the decryption key<br />

d = 1019 such that:<br />

m ≡ c d (mod n) ≡ 1570 1019 (mod 3337)<br />

m = (1570) 512 × (1570) 256 × (1570) 128 × (1570) 64 × (1570) 32<br />

× (1570) 16 × (1570) 8 × (1570) 2 × (1570)<br />

= 3925000 (mod 3337) ≡ 688<br />

Thus, the message is recovered.<br />

To encrypt the message m, break it into a series of mi-digit blocks, 1 � i � n − 1.<br />

Suppose each character in the message is represented by a two-digit number as shown in<br />

Table 5.4.<br />

Example 5.6 Encode the message ‘INFORMATION SECURITY’ using Table 5.4.<br />

m = (0914061518130120091514001905032118092025)<br />

Choose p = 47 and q = 71. Then<br />

n = pq = 47 × 71 = 3337<br />

φ(n) = (p − 1)(q − 1) = 46 × 70 = 3220<br />

Break the message m into blocks of four digits each:<br />

0914 0615 1813 0120 0915<br />

1400 1905 0321 1809 2025<br />

Choose the encryption key e = 79. Then the decryption key d becomes:<br />

d ≡ e −1 (mod φ(n)) ≡ 79 −1 (mod 3220) ≡ 1019<br />

The first block, m1 = 914, is encrypted by raising it to the power e = 79 and dividing by<br />

n = 3337 and taking the remainder c1 = 3223 as the first block of ciphertext:<br />

c1 ≡ m e 1<br />

(mod n)<br />

≡ 914 79 (mod 3337)<br />

≡ 3223<br />

Table 5.4 Two-digit number representing each character<br />

Blank 00 E 05 J 10 O 15 T 20 Y 25<br />

A 01 F 06 K 11 P 16 U 21 Z 26<br />

B 02 G 07 L 12 Q 17 V 22<br />

C 03 H 08 M 13 R 18 W 23<br />

D 04 I 09 N 14 S 19 X 24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!