延伸阅读
1.揭秘|被中国外交部新闻发言人点名的瑞士 Crypto AG 公司到底什么样?
http://feng.ifeng.com/c/7uBlpEJSPfQ
2.美国CIA利用瑞士Crypto AG加密公司窃听120个国家https://www.xianjichina.com/news/details_185337.html
3.Sha-1算法详解
https://blog.csdn.net/u010536615/article/details/80080918
4.MD5和SHA-1
https://www.cnblogs.com/moxiaotao/p/9415397.html
5.未来科学大奖首位女性获奖者得主王小云:十年破解五大国际密码
https://www.baidu.com/link?url=W-0vZEO_CL7K5YKnVSvRJDP31sQycjhZsQqU3iz5ytSC6_pNBF278Mo4SzR5DaK5LZZhCTL5_AAS_rrWW8qlTXmddDhb_9j3VDKP6Hu6QkG&wd=&eqid=833ecc5000108e3b000000065e5a08ad
6.中国奇女子王小云,成就全球密码学界的传奇!
https://www.baidu.com/link?url=3GOVl9ZOwzqHWLdOw4_p3-tbCiNSLovA7ylVf6R7HqUZkCx6dk35R8cJbxIG0utrUlo1S_0nzhHIs35Jx9C9F6jrY8uhYoFQuL_6AH17E0i&wd=&eqid=833ecc5000108e3b000000065e5a08ad
7.《开讲啦》 20180414 本期演讲者:王小云_《开讲啦》_视频_央视网
8.SHA-1算法的伪代码
Note: All variables are unsigned 32 bits and wrap modulo 232when calculating
İniyorlar variables:
h0:= 0x67452301
h1:= 0xEFCDAB89
h2:= 0x98BADCFE
h3:= 0x10325476
h4:= 0xC3D2E1F0
Pre-processing:
append the bit '1' to the message
append k bits '0', where k is the minimum number >= 0 such that the resulting message
length (in bits) is congruent to 448(mod 512)
append length of message (before pre-processing), in bits, as 64-bit big-endian integer
Process the message in successive 512-bit chunks:
break message into 512-bit chunks
for each chunk
break chunk into sixteen 32-bit big-endian words w[i], 0 ≤ i ≤ 15
Extend the sixteen 32-bit words into eighty 32-bit words:
for i from 16 to 79
w[i]:= (w[i-3] xor w[i-8] xor w[i-14] xor w[i-16]) leftrotate 1
Initialize hash value for this chunk:
a:= h0
b:= h1
c:= h2
d:= h3
e:= h4
Main loop:
for i from 0 to 79
if 0 ≤ i ≤ 19 then
f:= (b and c) or ((not b) and d)
k:= 0x5A827999
else if 20 ≤ i ≤ 39
f:= b xor c xor d
k:= 0x6ED9EBA1
else if 40 ≤ i ≤ 59
f:= (b and c) or (b and d) or(c and d)
k:= 0x8F1BBCDC
else if 60 ≤ i ≤ 79
f:= b xor c xor d
k:= 0xCA62C1D6
temp:= (a leftrotate 5) + f + e + k + w[i]
e:= d
d:= c
c:= b leftrotate 30
b:= a
a:= temp
Add this chunk's hash to result so far:
h0:= h0 + a
h1:= h1 + b
h2:= h2 + c
h3:= h3 + d
h4:= h4 + e
Produce the final hash value (big-endian):
digest = hash = h0 append h1 append h2 append h3 append h4
上述关于f表达式列于FIPS PUB 180-1中,以下替代表达式也许也能在主要循环里计算f:
(0 ≤ i ≤ 19): f:= d xor (b and (c xor d)) (alternative)
(40 ≤ i ≤ 59): f:= (b and c) or (d and (b or c))
(alternative 1)(40 ≤ i ≤ 59): f:= (b and c) or (d and (b xor c))
(alternative 2)(40 ≤ i ≤ 59): f:= (b and c) + (d and (b xor c)) (alternative 3)
按照算法实现的 SHA-1 功能,可以方便的生成字符串文本的 hash 值。
9.SHA-512
https://blog.csdn.net/u012835097/article/details/79407595
http://m.qukuaiwang.com.cn/news/15006.html

