说明feistel解密是feistel加密的逆过程

1. 加密过程是:明文m = LE0||RE0,进行n轮迭代。

按下列规则计算LEn||REn,1≤i≤n,轮函数为F

LEi = REi-1

REi = LEi-1⊕F(REi-1,Ki)

进行n 轮迭代运算后,得LEn和REn,输出密文c = REn||LEn

2. 解密过程与加密过程采用相同的算法:密文分组c = REn||LEn = LD0||RD0

按下述规则计算LDn||RDn,1≤i≤n,轮函数为F

LDi = RDi-1

RDi = LDi-1⊕F(RDi-1,Kn-i+1),

进行n 轮迭代运算后,得LDn和RDn,输出明文m = RDn||LDn

3. 这里只要证明RDn =LE0和LDn =RE0即可。显然,LD0= REn且RD0 = LEn,根据加、解密规则,有 

LD1 = RD0 = LEn = REn-1,RD1 =LD0⊕F(RD0,Kn) = REn⊕F(LEn,Kn) = LEn-1 

LD2 = RD1 = LEn-1 = REn-2,RD2 = LD1⊕F(RE1,Kn-1) = REn-1⊕F(LEn-1,Kn-1) = LEn-2 

以此推到下去,有:

LDn-1 = RDn-2 = LE2 = RE1,RDn-1 = LDn-2⊕F(RDn-2,K2) = RE2⊕F(LE2,K2) = LE1 

LDn= RDn-1 = LE1 = RE0,RD= LDn-1⊕F(RDn-1,K1)  = RE1⊕F(LE1,K1) = LE0

这就验证了feistel解密是feistel加密的逆过程

你可能感兴趣的:(学习心得)