文件名称:DES
-
所属分类:
- 标签属性:
- 上传时间:2012-11-27
-
文件大小:2.4kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
算法流程
1.将要处理的二进制串进行IP置换
2.将密钥进行PC1置换(64位转为56位),
3.进行16轮操作,对于第i轮操作:
1)将上一次得到的PC1密钥(级除去第一次外,其他的都经过移位处理)的结果左右部分(各28位)分别循环左移1位或2位,然后将移位后的密钥进行PC2[i]置换.
2)将处理串均等分为左右两串Li,Ri(各32位),然后将右串Ri通过E盒拓展为新的右串R (48位),R 与上一步得到的PC2[i]子密钥进行异或操作,结果通过S盒输出(48为转为32位),然后通过P盒直接置换,再与Li异或.
3)将Ri赋给作出Li,R 赋值给Ri.
4)合并处理串StrText=Li+Ri.
4.将最新的处理串进行IP_1置换,置换结果即为所求的加密串或解密串
加密解密的区别
在每轮操作中,加密使用的PC2密钥顺序为0~15,解密使用的PC2密钥顺序为15~0. -Algorithm flow
A binary string to be processed is substituted for IP
2 key the PC1 replacement (64 into 56)
16 operation, the operation for the i-th round:
1) about the results of the last PC1 key (remove the first time, the others have been shifting processing) (28) rotate left one or two, and then will shift key PC2 [i] replacement.
2) is divided into the equal treatment string around two bunches of Li, Ri (32), and then expand the right string Ri E box (48-bit), the right string R R and the previous step PC2 i] subkey XOR operation result is output via the S-box (48 to 32 conversion), and then directly through the P box replacement and XOR with Li.
3) the Ri to make Li, R is assigned to Ri.
4) merger deal with string StrText Ri = Li+.
4. Latest processing string IP_1 replacement, replacement results shall request string encryption or decryption string
Encryption and decryption of difference
In each round of operations, PC2 key e
1.将要处理的二进制串进行IP置换
2.将密钥进行PC1置换(64位转为56位),
3.进行16轮操作,对于第i轮操作:
1)将上一次得到的PC1密钥(级除去第一次外,其他的都经过移位处理)的结果左右部分(各28位)分别循环左移1位或2位,然后将移位后的密钥进行PC2[i]置换.
2)将处理串均等分为左右两串Li,Ri(各32位),然后将右串Ri通过E盒拓展为新的右串R (48位),R 与上一步得到的PC2[i]子密钥进行异或操作,结果通过S盒输出(48为转为32位),然后通过P盒直接置换,再与Li异或.
3)将Ri赋给作出Li,R 赋值给Ri.
4)合并处理串StrText=Li+Ri.
4.将最新的处理串进行IP_1置换,置换结果即为所求的加密串或解密串
加密解密的区别
在每轮操作中,加密使用的PC2密钥顺序为0~15,解密使用的PC2密钥顺序为15~0. -Algorithm flow
A binary string to be processed is substituted for IP
2 key the PC1 replacement (64 into 56)
16 operation, the operation for the i-th round:
1) about the results of the last PC1 key (remove the first time, the others have been shifting processing) (28) rotate left one or two, and then will shift key PC2 [i] replacement.
2) is divided into the equal treatment string around two bunches of Li, Ri (32), and then expand the right string Ri E box (48-bit), the right string R R and the previous step PC2 i] subkey XOR operation result is output via the S-box (48 to 32 conversion), and then directly through the P box replacement and XOR with Li.
3) the Ri to make Li, R is assigned to Ri.
4) merger deal with string StrText Ri = Li+.
4. Latest processing string IP_1 replacement, replacement results shall request string encryption or decryption string
Encryption and decryption of difference
In each round of operations, PC2 key e
(系统自动生成,下载前可以参看下载内容)
下载文件列表
DES.c
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.