CSIT571: Cryptography and Security Homework1

Problem 1. Find (31)-1 mod38923,i.e., the multiplicative inverse of 31 modulo38923.
Please use the extended Euclidean algorithm, which is a slight modification of the
Euclidean algorithm. Give details of your computation.

Problem 2. Use the Affine cipher with key (k0 ,k1 ) =(3, 2) to encrypt the following
plaintext(message)(fordefinition, seePage12 ofLecture4):

TOMORROW AT THREE

Problem 3. The piece of ciphertext posted at the URL:

http://www.cs.ust.hk/faculty/cding/COMP581/PROJECTS/ciphert0.html

isobtained using asimple substitution cipher(some punctuation symbols and most
blank spaces are deleted) and the language is English. Decrypt it by using the
frequency distribution of English letters. You may also use the fact that certain
digrams(e.g., an, en, er, es,he) appear more frequently. This may help you. Please
also give some details about how you decrypt it.

Note that the beginning of every line in the ciphertext is the beginning of an English
word, and the end of every line is the end of an English word. You may use the
online software at:

http://cryptoclub.math.uic.edu/substitutioncipher/frequency_txt.htm

for the frequency analysis.

Problem 4. WiththeECBmode ofDES,ifthereis an errorin ablock ofthetransmitted
ciphertext,only thecorrespondingplaintextblockisaffected. However,intheCBC
mode(seepage8 ofLecture06),thiserrorpropagates. Forexample,anerrorin
transmitted block c1 obviously corrupts two plaintext blocks m1 and m2 .

(A) Are there any blocks beyond m2 affected?
(B) Suppose that there is a bit error in the source version of m1 . Through how
many ciphertext blocks is this error propagated? What is the effect at the
receiver end?

Problem 5. Suppose that Bob’s public key for the RSA public-key cipher is (23, 55)
and his private key is 7.

a Use Bob’s public key to encrypt the message 53.
b Use Bob’s private key to decrypt the ciphertect 33.  

 

1.

i

r

q

x

y

-1

38923

 

1

0

0

31

 

0

1

1

18

1255

1

-1255

2

13

1

-1

1256

3

5

1

2

-2511

4

3

2

-5

6278

5

2

1

7

-8789

6

1

1

-12

15067

qi <- quotient(ri-2 /r i-1), ri <- ri-2 mod ri-1

xi <- xi-2 - qi · xi-1 ,    yi <- yi-2 - qi · yi-1

 

So the multiplicative inverse of 31 modulo 38923 is 15067

 

2.

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

 

T

O

M

O

R

R

O

W

A

T

T

H

R

E

E

19

14

12

14

17

17

14

22

0

19

19

7

17

4

4

 

Using Affine cipher with key (k0, k1) = (3, 2), I calculate c≡3*m+2 mod 26

7

18

12

18

1

1

18

16

2

7

7

23

1

14

14

H

S

M

S

B

B

S

Q

C

H

H

X

B

O

O

The ciphertext is HSMSBBSQ CH HXBOO

 

3.

First I suppose N->t, D->h, X->e, H->n.

Then in the beginning sentence there are WtWn. So I suppose W->a.

In the last sentence, there are aheaY. I guess Y->d.

From Qhat I can guess Q->w. Then I find dIwn to guess I->o.

From thoOe I can suppose O->s.

From thJeat and thJown I can suppose J->r.

From haPe I suppose P->v.

From worFd I suppose F->l.

From envBronGental I suppose B->i and G ->m.

From sUienUe I decide U->c.

From naviAate I decide A->g

From colMmVia I suppose M->u, V->b.

From todaT I decide T->y.

From toZind I decide Z->f.

From sLecial I decide L->p

From worCshop I suppose C->k.

From Eust I suppose E->j.

From Kuiet I guess K->q.

Then I suppose S-z, R-x.

 

4.

a. Because mi = Dk(ci) + c(i1 )for each i >=1. So m3 = Dk(C3) + C2 and so on. The blocks beyond m2 are not affected

 

b. Two blocks are propagated. There is no effect for receiver.

 

5.

53^23mod55 = (53^2)^11*53mod 55 = 4^11*53mod55 = 4*53mod55 = 47

33^7mod55 = 3^7*11^7mod 55 = 42*11mod55 = 22

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值