密码学Chapter4、5作业

密码学Chapter4、5作业

Chapter4 · 思考题

4.2

分组密码:加密一个明文分组,通常得到的是与明文等长的密文分组
流密码:每次加密数据流得到一位或一字节

4.4

乘积密码:采用多个密码复合的方法,增强密码系统的安全性

4.5

混淆:增加密钥与密文之间关系的复杂性
扩散:小变动的影响可波及到全局

4.7

雪崩效应:保证明文或密钥微小的输入变化导致密文大的输出变化

Chapter5 · 思考题

5.1

一个集合以及定义在这个集合上的二元运算,满足封闭性、结合律、单位元。

5.2

一个集合以及定义在这个集合上的二元运算,满足封闭性、结合律、单位元、交换律。

5.3

定义在几何上具有2个二元运算的代数系统,满足若干公理。

5.4

例:
f ( x ) = x 3 + x 2 + 2 ; g ( x ) = x 2 − x + 1 f(x)=x^3+x^2+2; g(x)=x^2-x+1 f(x)=x3+x2+2g(x)=x2x+1
则有
f ( x ) + g ( x ) = x 3 + 2 x 2 − x + 3 f(x)+g(x)=x^3+2x^2-x+3 f(x)+g(x)=x3+2x2x+3

f ( x ) − g ( x ) = x 3 + x + 1 f(x)-g(x)=x^3+x+1 f(x)g(x)=x3+x+1

f ( x ) ⋅ g ( x ) = x 5 + 3 x 2 − 2 x + 2 f(x)·g(x)=x^5+3x^2-2x+2 f(x)g(x)=x5+3x22x+2

f ( x ) g ( x ) = ( x + 2 ) ⋅ ( x 2 − x + 1 ) ⋯ x \frac{f(x)}{g(x)}=(x+2)·(x^2-x+1) \cdots x g(x)f(x)=(x+2)(x2x+1)x

Chapter5 · 习题

5.4

G F ( 5 ) 加法 GF(5)加法 GF(5)加法

+01234
001234
112340
223401
334012
440123

G F ( 5 ) 乘法 GF(5)乘法 GF(5)乘法

*01234
000000
101234
202413
303142
404321

5.7

Z 10 = { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } Z_{10}=\{0,1,2,3,4,5,6,7,8,9\} Z10={0,1,2,3,4,5,6,7,8,9}

a.

( 7 x + 2 ) − ( x 2 + 5 ) = 7 x + 2 − x 2 − 5 = [ ( − 1 ) m o d 10 ] x 2 + 7 x + [ ( − 3 ) m o d 10 ] = 9 x 2 + 7 x + 7 \begin{align*} (7x+2)-(x^2+5)&=7x+2-x^2-5 \\&=[(-1)mod10]x^2+7x+[(-3)mod10] \\&=9x^2+7x+7 \end{align*} (7x+2)(x2+5)=7x+2x25=[(1)mod10]x2+7x+[(3)mod10]=9x2+7x+7

b.

( 6 x 2 + x + 3 ) ⋅ ( 5 x 2 + 2 ) = 30 x 4 + 5 x 3 + 27 x 2 + 2 x + 6 = ( 30 m o d 10 ) x 4 + 5 x 3 + ( 27 m o d 10 ) x 2 + 2 x + 6 = 5 x 3 + 7 x 2 + 2 x + 6 \begin{align*} (6x^2+x+3)·(5x^2+2)&=30x^4+5x^3+27x^2+2x+6 \\&=(30mod10)x^4+5x^3+(27mod10)x^2+2x+6 \\&=5x^3+7x^2+2x+6 \end{align*} (6x2+x+3)(5x2+2)=30x4+5x3+27x2+2x+6=(30mod10)x4+5x3+(27mod10)x2+2x+6=5x3+7x2+2x+6

5.8

G F ( 2 ) 加法 GF(2)加法 GF(2)加法

+01
001
110

G F ( 2 ) 乘法 GF(2)乘法 GF(2)乘法

*01
000
101

求逆 求逆 求逆

w − w w − 1 0 0 − 1 1 1 \begin{array}{c|lcr} w & -w & w^{-1} \\ \hline 0 & 0 & - \\ 1 & 1 & 1 \\ \end{array} w01w01w11

a.

x 3 + 1 = ( x + 1 ) { x 2 + [ ( − 1 ) m o d 2 ] x + 1 } = ( x + 1 ) ( x 2 + x + 1 ) \begin{align*} x^3+1&=(x+1)\{x^2+[(-1)mod2]x+1\} \\&=(x+1)(x^2+x+1) \end{align*} x3+1=(x+1){x2+[(1)mod2]x+1}=(x+1)(x2+x+1)

b.

该式无法因式分解
x 3 + x 2 + 1 = x 2 ⋅ ( x + 1 ) + 1 \begin{align*} x^3+x^2+1&=x^2·(x+1)+1 \end{align*} x3+x2+1=x2(x+1)+1

c.

x 4 + 1 = x 4 + ( 2 m o d 2 ) x 2 + 1 = ( x 2 + 1 ) 2 = [ ( x 2 + 1 + ( 2 m o d 2 ) x ] 2 = [ ( x + 1 ) 2 ] 2 = ( x + 1 ) 4 \begin{align*} x^4+1&=x^4+(2mod2)x^2+1 \\&=(x^2+1)^2 \\&=[(x^2+1+(2mod2)x]^2 \\&=[(x+1)^2]^2 \\&=(x+1)^4 \end{align*} x4+1=x4+(2mod2)x2+1=(x2+1)2=[(x2+1+(2mod2)x]2=[(x+1)2]2=(x+1)4

5.9

a.

w − w w − 1 0 0 − 1 1 1 \begin{array}{c|lcr} w & -w & w^{-1} \\ \hline 0 & 0 & - \\ 1 & 1 & 1 \\\end{array} w01w01w11

x 3 + x + 1 = ( x + 1 ) ⋅ ( x 2 + x + 1 ) + x \begin{align*} x^3+x+1=(x+1)·(x^2+x+1)+x \end{align*} x3+x+1=(x+1)(x2+x+1)+x

x 3 + x 2 + 1 = x 2 ⋅ ( x + 1 ) + 1 \begin{align*} x^3+x^2+1=x^2·(x+1)+1 \end{align*} x3+x2+1=x2(x+1)+1

g d c ( x 3 + x + 1 , x 3 + x 2 + 1 ) = 1 gdc(x^3+x+1,x^3+x^2+1)=1 gdc(x3+x+1,x3+x2+1)=1

b.

x 3 − x + 1 = ( x + 1 ) ⋅ ( x 2 + 2 x ) + 1 \begin{align*} x^3-x+1=(x+1)·(x^2+2x)+1 \end{align*} x3x+1=(x+1)(x2+2x)+1

x 2 + 1 = ( x + 1 ) 2 + x \begin{align*} x^2+1=(x+1)^2+x \end{align*} x2+1=(x+1)2+x

g c d ( x 3 − x + 1 , x 2 + 1 ) = 1 gcd(x^3-x+1,x^2+1)=1 gcd(x3x+1,x2+1)=1

c.

x 5 + x 4 + x 3 − x 2 − x + 1 = ( x + 1 ) ⋅ { x 4 + x 3 + [ ( − 2 ) m o d x ] + 1 } = ( x + 1 ) ⋅ ( x 4 + x 3 + x + 1 ) = ( x + 1 ) 2 ⋅ ( x 3 + 1 ) = ( x + 1 ) 3 ⋅ ( x 2 + 2 x + 1 ) = ( x + 1 ) 5 \begin{align*} x^5+x^4+x^3-x^2-x+1&=(x+1)·\{x^4+x^3+[(-2)modx]+1\} \\&=(x+1)·(x^4+x^3+x+1) \\&=(x+1)^2·(x^3+1) \\&=(x+1)^3·(x^2+2x+1) \\&=(x+1)^5 \end{align*} x5+x4+x3x2x+1=(x+1){x4+x3+[(2)modx]+1}=(x+1)(x4+x3+x+1)=(x+1)2(x3+1)=(x+1)3(x2+2x+1)=(x+1)5

x 3 + x 2 + x + 1 = ( x + 1 ) ⋅ ( x 2 + 1 ) \begin{align*} x^3+x^2+x+1&=(x+1)·(x^2+1) \end{align*} x3+x2+x+1=(x+1)(x2+1)

g c d ( x 5 + x 4 + x 3 − x 2 − x + 1 , x 3 + x 2 + x + 1 ) = x + 1 gcd(x^5+x^4+x^3-x^2-x+1,x^3+x^2+x+1)=x+1 gcd(x5+x4+x3x2x+1,x3+x2+x+1)=x+1

d.

( x 5 + 88 x 4 + 73 x 3 + 83 x 2 + 51 x + 67 ) m o d ( x 3 + 97 x 2 + 40 x + 38 ) = 18 x 2 + 20 x + 28 \begin{align*} &(x^5+88x^4+73x^3+83x^2+51x+67)mod(x^3+97x^2+40x+38) \\&=18x^2+20x+28 \end{align*} (x5+88x4+73x3+83x2+51x+67)mod(x3+97x2+40x+38)=18x2+20x+28

( x 3 + 97 x 2 + 40 x + 38 ) m o d ( 18 x 2 + 20 x + 28 ) = x + 78 \begin{align*} (x^3+97x^2+40x+38)mod(18x^2+20x+28)=x+78 \end{align*} (x3+97x2+40x+38)mod(18x2+20x+28)=x+78

g c d ( x 5 + 88 x 4 + 73 x 3 + 83 x 2 + 51 x + 67 , x 3 + 97 x 2 + 40 x + 38 ) = x + 78 gcd(x^5+88x^4+73x^3+83x^2+51x+67,x^3+97x^2+40x+38)=x+78 gcd(x5+88x4+73x3+83x2+51x+67,x3+97x2+40x+38)=x+78

5.10

以 x 2 + x + 1 为模的有限域 G F ( 4 ) 对应表 以x^2+x+1为模的有限域GF(4)对应表 x2+x+1为模的有限域GF(4)对应表

+0011011
01xx+1
00001xx+1
01110x+1x
10xxx+101
11x+1x+1x10
*****0011011
01xx+1
0000000
01101xx+1
10x0xx+11
11x+10x+11x

5.11

x 3 + x + 1 的乘法逆元,以 m ( x ) = x 4 + x + 1 为模 x^3+x+1的乘法逆元,以m(x)=x^4+x+1为模 x3+x+1的乘法逆元,以m(x)=x4+x+1为模

生成元
幂 多项式 二进制 十六进制 0 0 0000 0 x 0 1 0001 1 x 1 x 0010 2 x 2 x + 1 0011 3 x 3 x 2 0100 4 x 4 x 2 + 1 0101 5 x 5 x 2 + x 0110 6 x 6 x 2 + x + 1 0111 7 x 7 x 3 1000 8 x 8 x 3 + 1 1001 9 x 9 x 3 + x 1010 A x 10 x 3 + x + 1 1011 B x 11 x 3 + x 2 1100 C x 12 x 3 + x 2 + 1 1101 D x 13 x 3 + x 2 + x 1110 E x 14 x 3 + x 2 + x + 1 1111 F \begin{array}{|c|l|c|r|} \hline幂 &多项式 &二进制 &十六进制 \\\hline 0 & 0 &0000 &0 \\\hline x^0 & 1 & 0001 & 1 \\\hline x^1 & x & 0010 & 2 \\\hline x^2 & x+1 & 0011 & 3 \\\hline x^3 & x^2& 0100 & 4 \\\hline x^4 & x^2+1& 0101 & 5 \\\hline x^5 & x^2+x& 0110 & 6 \\\hline x^6 & x^2+x+1 & 0111 & 7 \\\hline x^7 & x^3& 1000 & 8 \\\hline x^8 & x^3+1& 1001 & 9 \\\hline x^9 & x^3+x& 1010 & A \\\hline x^{10} & x^3+x+1 & 1011 & B \\\hline x^{11} & x^3+x^2 & 1100 & C \\\hline x^{12} & x^3+x^2+1 & 1101 & D \\\hline x^{13} & x^3+x^2+x & 1110 & E \\\hline x^{14} & x^3+x^2+x+1 & 1111 & F \\\hline \end{array} 0x0x1x2x3x4x5x6x7x8x9x10x11x12x13x14多项式01xx+1x2x2+1x2+xx2+x+1x3x3+1x3+xx3+x+1x3+x2x3+x2+1x3+x2+xx3+x2+x+1二进制0000000100100011010001010110011110001001101010111100110111101111十六进制0123456789ABCDEF

∗ 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 0 x 0 x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x 11 x 12 x 13 x 14 0000 0 − 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0001 x 0 0 1 x x + 1 x 2 x 2 + 1 x 2 + x x 2 + x + 1 x 3 x 3 + 1 x 3 + x x 3 + x + 1 x 3 + x 2 x 3 + x 2 + 1 x 3 + x 2 + x x 3 + x 2 + x + 1 0010 x 1 0 x x 2 x 2 + x x 3 x 3 + x x 3 + x 2 + x 1 x x 2 x 2 + 1 x 3 x 3 + x x 3 + x 2 x 3 + x 2 x 3 + x 2 + x 0011 x 2 0 x + 1 x 2 + 1 0100 x 3 0 x 2 x 2 + 1 0101 x 4 0 x 2 + 1 x 2 + 1 0110 x 5 0 x 2 + x x 2 + 1 0111 x 6 0 x 2 + x + 1 x 2 + 1 1000 x 7 0 x 3 x 2 + 1 1001 x 8 0 x 3 + 1 x 2 + 1 1010 x 9 0 x 3 + x x 2 + 1 1011 x 10 0 x 3 + x + 1 1100 x 11 0 x 3 + x 2 1101 x 12 0 x 3 + x 2 1110 x 13 0 x 3 + x 2 + x 1111 x 14 0 x 3 + x 2 + x + 1 \begin{array}{cl|cr} * && 0000 & 0001 & 0010 &0011 & 0100 & 0101 & 0110 &0111 &1000& 1001 &1010&1011&1100&1101 & 1110 & 1111\\&&0 &x^0 &x^1 &x^2 &x^3 & x^4 & x^5 & x^6 & x^7 & x^8 & x^9 & x^{10} & x^{11} & x^{12} & x^{13} & x^{14}\\ \hline0000 & 0 & - & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0& 0 & 0 \\0001 & x^0 & 0 & 1 &x&x+1 &x^2 & x^2+1 & x^2+x & x^2+x+1 & x^3 & x^3+1 & x^3+x & x^3+x+1 & x^3+x^2 & x^3+x^2+1 & x^3+x^2+x & x^3+x^2+x+1\\0010 & x^1 & 0 & x & x^2 &x^2+x&x^3&x^3+x&x^3+x^2+x&1&x&x^2&x^2+1&x^3&x^3+x&x^3+x^2&x^3+x^2&x^3+x^2+x\\0011 & x^2 & 0 &x+1 &&x^2+1&&&&&&&&&&&\\0100 & x^3 & 0 &x^2 &&&&x^2+1&&&&&&&&\\0101 & x^4 & 0 & x^2+1 &&&x^2+1&&&&&&&&\\0110 & x^5 & 0 & x^2+x &&&&&x^2+1&&&&&\\0111 & x^6 & 0 & x^2+x+1 &&&&&&&&&x^2+1\\1000 & x^7 & 0 &x^3 &&&&&&&&&x^2+1\\1001 & x^8 & 0 & x^3+1 &&&&&&&&x^2+1\\1010 & x^9 & 0 &x^3+x &&&&&&&x^2+1\\1011 & x^{10} & 0 &x^3+x+1 &&&&&\\1100 & x^{11} & 0 &x^3+x^2 &&&&\\1101 & x^{12} & 0 & x^3+x^2 &&&\\1110 & x^{13} & 0 &x^3+x^2+x &&\\1111 & x^{14} & 0 &x^3+x^2+x+1&\end{array} 00000001001000110100010101100111100010011010101111001101111011110x0x1x2x3x4x5x6x7x8x9x10x11x12x13x14000000000000000000000001x001xx+1x2x2+1x2+xx2+x+1x3x3+1x3+xx3+x+1x3+x2x3+x2x3+x2+xx3+x2+x+10010x10xx20011x20x+1x2+xx2+10100x30x2x3x2+10101x40x2+1x3+xx2+10110x50x2+xx3+x2+xx2+10111x60x2+x+111000x70x3xx2+11001x80x3+1x2x2+11010x90x3+xx2+1x2+1x2+11011x100x3+x+1x31100x110x3+x2x3+x1101x120x3+x2+1x3+x21110x130x3+x2+xx3+x21111x140x3+x2+x+1x3+x2+x

g c d ( x 3 + x + 1 , x 4 + x + 1 ) = x 2 + 1 x 2 + 1 gcd(x^3+x+1,x^4+x+1)=x^2+1 \\x^2+1 gcd(x3+x+1,x4+x+1)=x2+1x2+1

5.12

幂 多项式 二进制 十六进制 0 0 0000 0 x 0 1 0001 1 x 1 x 0010 2 x 2 x + 1 0011 3 x 3 x 2 0100 4 x 4 x 2 + 1 0101 5 x 5 x 2 + x 0110 6 x 6 x 2 + x + 1 0111 7 x 7 x 3 1000 8 x 8 x 3 + 1 1001 9 x 9 x 3 + x 1010 A x 10 x 3 + x + 1 1011 B x 11 x 3 + x 2 1100 C x 12 x 3 + x 2 + 1 1101 D x 13 x 3 + x 2 + x 1110 E x 14 x 3 + x 2 + x + 1 1111 F \begin{array}{|c|l|c|r|} \hline幂 &多项式 &二进制 &十六进制\\\hline 0 & 0 &0000 &0\\\hline x^0 & 1 & 0001 & 1\\\hline x^1 & x & 0010 & 2\\\hline x^2 & x+1 & 0011 & 3\\\hline x^3 & x^2& 0100 & 4\\\hline x^4 & x^2+1& 0101 & 5\\\hline x^5 & x^2+x& 0110 & 6\\\hline x^6 & x^2+x+1 & 0111 & 7\\\hline x^7 & x^3& 1000 & 8\\\hline x^8 & x^3+1& 1001 & 9\\\hline x^9 & x^3+x& 1010 & A\\\hline x^{10} & x^3+x+1 & 1011 & B\\\hline x^{11} & x^3+x^2 & 1100 & C\\\hline x^{12} & x^3+x^2+1 & 1101 & D\\\hline x^{13} & x^3+x^2+x & 1110 & E\\\hline x^{14} & x^3+x^2+x+1 & 1111 & F\\\hline\end{array} 0x0x1x2x3x4x5x6x7x8x9x10x11x12x13x14多项式01xx+1x2x2+1x2+xx2+x+1x3x3+1x3+xx3+x+1x3+x2x3+x2+1x3+x2+xx3+x2+x+1二进制0000000100100011010001010110011110001001101010111100110111101111十六进制0123456789ABCDEF

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值