本文主要是介绍SHA-512摘要算法(带示例),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
原创不易,转载请注明出处。
目录
1.算法简介
2.符号
3.加密算法流程
3.1 概述
3.2 填充
3.3 加密处理
附录A 运算示例
附录B 下载链接
1.算法简介
SHA英文全称Secure Hash Algorithm,即安全散列算法。散列算法又称杂凑算法或哈希算法,能将一定长度的消息计算出固定长度的字符串(又称消息摘要)。SHA包含5个算法,分别是SHA-1、SHA-224、SHA-256、SHA-384和SHA-512,后四者并称为SHA-2。
SHA-384最大计算明文长度为2^128bit,属于分组算法,分组长度为1024bit,产生的信息摘要长度为384bit。SHA-384算法属于密码杂凑算法,原则上不能通过密文推出明文。
本文将通过实例,详细介绍SHA-256加密算法的加密流程。
2.符号
下列符号适用于本文本。
h0~h7:8个64bit双字,初始哈希值,也存放每组计算的当前哈希值
abcdefgh:8个64bit双字,存放中间变量
m:消息
m':填充后的消息
mod:模运算
s0,s1:字节扩展时中间变量
S0,S1,ch,maj,temp1,temp2:循环迭代时中间变量
w[i]:第i个扩展双字
∧:64bit与运算
∨:64bit或运算
⊕:异或运算
>>>k:循环右移k比特运算
>>k:右移k比特运算
←:左向赋值运算符
~:64bit双字按位取反
3.加密算法流程
3.1 概述
对长度为l (l<2^128bit )比特的消息 ,SHA-384杂凑算法经过填充和迭代压缩,生成杂凑值,杂凑值长度为384比特。
3.2 填充
假设消息m 的长度为 l比特。首先将比特“1”添加到消息的末尾,再添加 k个“0”,k 是满足l+1+k=896mod1024 的最小的非负整数。然后再添加一个128位比特串,该比特串是长度l 的二进制表示。填充后的消息 m'的比特长度为1024的倍数。
例如:对消息01100001 01100010 01100011,其长度 =24,经填充得到比特串:
事实上,在编写程序时,应该先进行分组,对满足1024bit的分组先进行计算。当分到最后一组不足1024bit时,再进行填充。
3.3 加密处理
将填充后的消息m' 按1024比特进行分组:m'=B0B1……Bn-1,其中n=(l+k+129)/1024 。
3.3.1 常量及初始值
初始哈希值:
h0=0xcbbb9d5dc1059ed8,
h1=0x629a292a367cd507,
h2=0x9159015a3070dd17,
h3=0x152fecd8f70e5939,
h4=0x67332667ffc00b31,
h5=0x8eb44a8768581511,
h6=0xdb0c2e0d64f98fa7,
h7=0x47b5481dbefa4fa4
初始常量矩阵(十六进制):
k[0..79]=
0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc, 0x3956c25bf348b538,
0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118, 0xd807aa98a3030242, 0x12835b0145706fbe,
0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2, 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235,
0xc19bf174cf692694, 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65,
0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5, 0x983e5152ee66dfab,
0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4, 0xc6e00bf33da88fc2, 0xd5a79147930aa725,
0x06ca6351e003826f, 0x142929670a0e6e70, 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed,
0x53380d139d95b3df, 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b,
0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30, 0xd192e819d6ef5218,
0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8, 0x19a4c116b8d2d0c8, 0x1e376c085141ab53,
0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8, 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373,
0x682e6ff3d6b2b8a3, 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec,
0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b, 0xca273eceea26619c,
0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178, 0x06f067aa72176fba, 0x0a637dc5a2c898a6,
0x113f9804bef90dae, 0x1b710b35131c471b, 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc,
0x431d67c49c100d4c, 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817
3.3.2 加密流程
每组数据按照如下流程进行加密操作:
1)分组数据按照64bit双字存放在w[0]~w[15]中,然后按照如下规则扩展成80个双字。注意 s0, s1 最后是右移, 不是循环右移。
FOR i from 16 to 79
s0= (w[i-15] ) >>> 1)⊕(w[i-15] >>> 8)⊕(w[i-15] >> 7)
s1= (w[i-2] >>> 19)⊕(w[i-2] >>> 61)⊕(w[i-2] >> 6)
w[i]= w[i-16] + s0 + w[i-7] + s1
ENDFOR
2)赋值初始哈希值
a= h0
b= h1
c= h2
d= h3
e= h4
f= h5
g= h6
h= h7
3)迭代计算80次
FOR i from 0 to 79
S1= (e >>> 14) ⊕ (e >>> 18) ⊕ (e >>> 41)
ch= (e∧ f) ⊕ ((~ e) ∧ g)
temp1= h + S1 + ch + k[i] + w[i]
S0= (a >>> 28) ⊕ (a >>> 34) ⊕ (a >>> 39)
maj= (a∧b) ⊕ (a∧c)⊕(b∧c)
temp2= S0 + maj
h= g
g= f
f= e
e= d + temp1
d= c
c= b
b= a
a= temp1 + temp2
ENDFOR
4)获取当前哈希值
h0= h0 + a
h1= h1 + b
h2= h2 + c
h3= h3 + d
h4= h4 + e
h5= h5 + f
h6= h6 + g
h7= h7 + h
注意前一组得到的哈希值h0~h7作为下一分组的初始值,最终得到的h0~h5就是384bit杂凑值。
附录A 运算示例
原始输入消息:
abc
填充后消息:
0x61 0x62 0x63 0x80 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x18
80个扩展双字(十六进制)
w[0]~w[3]: | 6162638000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 |
w[4]~w[7]: | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 |
w[8]~w[11]: | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000000 |
w[12]~w[15]: | 0000000000000000 | 0000000000000000 | 0000000000000000 | 0000000000000018 |
w[16]~w[19]: | 6162638000000000 | 00030000000000c0 | 0a9699a24c700003 | 00000c0060000603 |
w[20]~w[23]: | 549ef62639858996 | 00c0003300003c00 | 1497007a8a0e9dbc | 62e56500cc0780f0 |
w[24]~w[27]: | 7760dd475a538797 | f1554b711c1c0003 | ca2993a4345d9ff2 | 5e0e66b5c783dd32 |
w[28]~w[31]: | e25a625d00494b62 | 9f44486fb1e4fbd2 | b31b8c2b06085f2f | 0e987660934142f6 |
w[32]~w[35]: | a4af2cfd09fbb924 | ad289e2e0bd53186 | 3c74563aa2f9673e | 6ccdcd14cc14b53f |
w[36]~w[39]: | c3f925b337f22bde | 5bcc77a75ad95b54 | 3ec2257adca09a52 | 28246960001fc5eb |
w[40]~w[43]: | 04e33a75ce2be88a | 7d5314b3c359e0e7 | aef7a285ff251266 | 0b8472581deea04f |
w[44]~w[47]: | b174e26eddc7b033 | 5d63bae58ddd88de | 4c044007b744ccbb | e6a9aa4d74dc7d43 |
w[48]~w[51]: | ebeaf1237248019c | 361e80b2d00f3193 | 2e9839125df3b175 | 3319629293ad5363 |
w[52]~w[55]: | 9cbc5d89ac1b89d5 | 275e23ffeeca50b7 | 3b80d680bf69ef58 | 0d0696933945a125 |
w[56]~w[59]: | 7533eabcb786ff00 | b89826cee6fbf0e5 | 249b4fbcad623e9f | 4aea9df2b02d6f1e |
w[60]~w[63]: | 2cc57475a55e8d8f | b2574ae938d8be89 | c1b35a57b16d6aea | cc4918b5949206bb |
w[64]~w[67]: | 5099c3add79f90ec | 5ea81d78e7660bf1 | ebee6267405ac2a9 | b01f21926108a4ab |
w[68]~w[71]: | 786433dd2fe65556 | c54a6eaa24a0552c | b3c8f1530bdbaa9e | bb8abfe56f469338 |
w[72]~w[75]: | f63d4265cc1c5a78 | be8355ea73129afb | 49e2db8ebdcfbeb5 | 82269d4a883a3d99 |
w[76]~w[79]: | fdf53df3011f362b | 464af5671d71c12e | e449b68198ec611c | 92aeeed1a7bcf7d2 |
64轮迭代(十六进制表示):
轮 | a | b | c | d | e | f | g | h |
0 | 6a09e667f3bcc908 | bb67ae8584caa73b | 3c6ef372fe94f82b | a54ff53a5f1d36f1 | 510e527fade682d1 | 9b05688c2b3e6c1f | 1f83d9abfb41bd6b | 5be0cd19137e2179 |
1 | f6afceb8bcfcddf5 | 6a09e667f3bcc908 | bb67ae8584caa73b | 3c6ef372fe94f82b | 58cb02347ab51f91 | 510e527fade682d1 | 9b05688c2b3e6c1f | 1f83d9abfb41bd6b |
2 | 1320f8c9fb872cc0 | f6afceb8bcfcddf5 | 6a09e667f3bcc908 | bb67ae8584caa73b | c3d4ebfd48650ffa | 58cb02347ab51f91 | 510e527fade682d1 | 9b05688c2b3e6c1f |
3 | ebcffc07203d91f3 | 1320f8c9fb872cc0 | f6afceb8bcfcddf5 | 6a09e667f3bcc908 | dfa9b239f2697812 | c3d4ebfd48650ffa | 58cb02347ab51f91 | 510e527fade682d1 |
4 | 5a83cb3e80050e82 | ebcffc07203d91f3 | 1320f8c9fb872cc0 | f6afceb8bcfcddf5 | 0b47b4bb1928990e | dfa9b239f2697812 | c3d4ebfd48650ffa | 58cb02347ab51f91 |
5 | b680953951604860 | 5a83cb3e80050e82 | ebcffc07203d91f3 | 1320f8c9fb872cc0 | 745aca4a342ed2e2 | 0b47b4bb1928990e | dfa9b239f2697812 | c3d4ebfd48650ffa |
6 | af573b02403e89cd | b680953951604860 | 5a83cb3e80050e82 | ebcffc07203d91f3 | 96f60209b6dc35ba | 745aca4a342ed2e2 | 0b47b4bb1928990e | dfa9b239f2697812 |
7 | c4875b0c7abc076b | af573b02403e89cd | b680953951604860 | 5a83cb3e80050e82 | 5a6c781f54dcc00c | 96f60209b6dc35ba | 745aca4a342ed2e2 | 0b47b4bb1928990e |
8 | 8093d195e0054fa3 | c4875b0c7abc076b | af573b02403e89cd | b680953951604860 | 86f67263a0f0ec0a | 5a6c781f54dcc00c | 96f60209b6dc35ba | 745aca4a342ed2e2 |
9 | f1eca5544cb89225 | 8093d195e0054fa3 | c4875b0c7abc076b | af573b02403e89cd | d0403c398fc40002 | 86f67263a0f0ec0a | 5a6c781f54dcc00c | 96f60209b6dc35ba |
10 | 81782d4a5db48f03 | f1eca5544cb89225 | 8093d195e0054fa3 | c4875b0c7abc076b | 00091f460be46c52 | d0403c398fc40002 | 86f67263a0f0ec0a | 5a6c781f54dcc00c |
11 | 69854c4aa0f25b59 | 81782d4a5db48f03 | f1eca5544cb89225 | 8093d195e0054fa3 | d375471bde1ba3f4 | 00091f460be46c52 | d0403c398fc40002 | 86f67263a0f0ec0a |
12 | db0a9963f80c2eaa | 69854c4aa0f25b59 | 81782d4a5db48f03 | f1eca5544cb89225 | 475975b91a7a462c | d375471bde1ba3f4 | 00091f460be46c52 | d0403c398fc40002 |
13 | 5e41214388186c14 | db0a9963f80c2eaa | 69854c4aa0f25b59 | 81782d4a5db48f03 | cdf3bff2883fc9d9 | 475975b91a7a462c | d375471bde1ba3f4 | 00091f460be46c52 |
14 | 44249631255d2ca0 | 5e41214388186c14 | db0a9963f80c2eaa | 69854c4aa0f25b59 | 860acf9effba6f61 | cdf3bff2883fc9d9 | 475975b91a7a462c | d375471bde1ba3f4 |
15 | fa967eed85a08028 | 44249631255d2ca0 | 5e41214388186c14 | db0a9963f80c2eaa | 874bfe5f6aae9f2f | 860acf9effba6f61 | cdf3bff2883fc9d9 | 475975b91a7a462c |
16 | 0ae07c86b1181c75 | fa967eed85a08028 | 44249631255d2ca0 | 5e41214388186c14 | a77b7c035dd4c161 | 874bfe5f6aae9f2f | 860acf9effba6f61 | cdf3bff2883fc9d9 |
17 | caf81a425d800537 | 0ae07c86b1181c75 | fa967eed85a08028 | 44249631255d2ca0 | 2deecc6b39d64d78 | a77b7c035dd4c161 | 874bfe5f6aae9f2f | 860acf9effba6f61 |
18 | 4725be249ad19e6b | caf81a425d800537 | 0ae07c86b1181c75 | fa967eed85a08028 | f47e8353f8047455 | 2deecc6b39d64d78 | a77b7c035dd4c161 | 874bfe5f6aae9f2f |
19 | 3c4b4104168e3edb | 4725be249ad19e6b | caf81a425d800537 | 0ae07c86b1181c75 | 29695fd88d81dbd0 | f47e8353f8047455 | 2deecc6b39d64d78 | a77b7c035dd4c161 |
20 | 9a3fb4d38ab6cf06 | 3c4b4104168e3edb | 4725be249ad19e6b | caf81a425d800537 | f14998dd5f70767e | 29695fd88d81dbd0 | f47e8353f8047455 | 2deecc6b39d64d78 |
21 | 8dc5ae65569d3855 | 9a3fb4d38ab6cf06 | 3c4b4104168e3edb | 4725be249ad19e6b | 4bb9e66d1145bfdc | f14998dd5f70767e | 29695fd88d81dbd0 | f47e8353f8047455 |
22 | da34d6673d452dcf | 8dc5ae65569d3855 | 9a3fb4d38ab6cf06 | 3c4b4104168e3edb | 8e30ff09ad488753 | 4bb9e66d1145bfdc | f14998dd5f70767e | 29695fd88d81dbd0 |
23 | 3e2644567b709a78 | da34d6673d452dcf | 8dc5ae65569d3855 | 9a3fb4d38ab6cf06 | 0ac2b11da8f571c6 | 8e30ff09ad488753 | 4bb9e66d1145bfdc | f14998dd5f70767e |
24 | 4f6877b58fe55484 | 3e2644567b709a78 | da34d6673d452dcf | 8dc5ae65569d3855 | c66005f87db55233 | 0ac2b11da8f571c6 | 8e30ff09ad488753 | 4bb9e66d1145bfdc |
25 | 9aff71163fa3a940 | 4f6877b58fe55484 | 3e2644567b709a78 | da34d6673d452dcf | d3ecf13769180e6f | c66005f87db55233 | 0ac2b11da8f571c6 | 8e30ff09ad488753 |
26 | 0bc5f791f8e6816b | 9aff71163fa3a940 | 4f6877b58fe55484 | 3e2644567b709a78 | 6ddf1fd7edcce336 | d3ecf13769180e6f | c66005f87db55233 | 0ac2b11da8f571c6 |
27 | 884c3bc27bc4f941 | 0bc5f791f8e6816b | 9aff71163fa3a940 | 4f6877b58fe55484 | e6e48c9a8e948365 | 6ddf1fd7edcce336 | d3ecf13769180e6f | c66005f87db55233 |
28 | eab4a9e5771b8d09 | 884c3bc27bc4f941 | 0bc5f791f8e6816b | 9aff71163fa3a940 | 09068a4e255a0dac | e6e48c9a8e948365 | 6ddf1fd7edcce336 | d3ecf13769180e6f |
29 | e62349090f47d30a | eab4a9e5771b8d09 | 884c3bc27bc4f941 | 0bc5f791f8e6816b | 0fcdf99710f21584 | 09068a4e255a0dac | e6e48c9a8e948365 | 6ddf1fd7edcce336 |
30 | 74bf40f869094c63 | e62349090f47d30a | eab4a9e5771b8d09 | 884c3bc27bc4f941 | f0aec2fe1437f085 | 0fcdf99710f21584 | 09068a4e255a0dac | e6e48c9a8e948365 |
31 | 4c4fbbb75f1873a6 | 74bf40f869094c63 | e62349090f47d30a | eab4a9e5771b8d09 | 73e025d91b9efea3 | f0aec2fe1437f085 | 0fcdf99710f21584 | 09068a4e255a0dac |
32 | ff4d3f1f0d46a736 | 4c4fbbb75f1873a6 | 74bf40f869094c63 | e62349090f47d30a | 3cd388e119e8162e | 73e025d91b9efea3 | f0aec2fe1437f085 | 0fcdf99710f21584 |
33 | a0509015ca08c8d4 | ff4d3f1f0d46a736 | 4c4fbbb75f1873a6 | 74bf40f869094c63 | e1034573654a106f | 3cd388e119e8162e | 73e025d91b9efea3 | f0aec2fe1437f085 |
34 | 60d4e6995ed91fe6 | a0509015ca08c8d4 | ff4d3f1f0d46a736 | 4c4fbbb75f1873a6 | efabbd8bf47c041a | e1034573654a106f | 3cd388e119e8162e | 73e025d91b9efea3 |
35 | 2c59ec7743632621 | 60d4e6995ed91fe6 | a0509015ca08c8d4 | ff4d3f1f0d46a736 | 0fbae670fa780fd3 | efabbd8bf47c041a | e1034573654a106f | 3cd388e119e8162e |
36 | 1a081afc59fdbc2c | 2c59ec7743632621 | 60d4e6995ed91fe6 | a0509015ca08c8d4 | f098082f502b44cd | 0fbae670fa780fd3 | efabbd8bf47c041a | e1034573654a106f |
37 | 88df85b0bbe77514 | 1a081afc59fdbc2c | 2c59ec7743632621 | 60d4e6995ed91fe6 | 8fbfd0162bbf4675 | f098082f502b44cd | 0fbae670fa780fd3 | efabbd8bf47c041a |
38 | 002bb8e4cd989567 | 88df85b0bbe77514 | 1a081afc59fdbc2c | 2c59ec7743632621 | 66adcfa249ac7bbd | 8fbfd0162bbf4675 | f098082f502b44cd | 0fbae670fa780fd3 |
39 | b3bb8542b3376de5 | 002bb8e4cd989567 | 88df85b0bbe77514 | 1a081afc59fdbc2c | b49596c20feba7de | 66adcfa249ac7bbd | 8fbfd0162bbf4675 | f098082f502b44cd |
40 | 8e01e125b855d225 | b3bb8542b3376de5 | 002bb8e4cd989567 | 88df85b0bbe77514 | 0c710a47ba6a567b | b49596c20feba7de | 66adcfa249ac7bbd | 8fbfd0162bbf4675 |
41 | b01521dd6a6be12c | 8e01e125b855d225 | b3bb8542b3376de5 | 002bb8e4cd989567 | 169008b3a4bb170b | 0c710a47ba6a567b | b49596c20feba7de | 66adcfa249ac7bbd |
42 | e96f89dd48cbd851 | b01521dd6a6be12c | 8e01e125b855d225 | b3bb8542b3376de5 | f0996439e7b50cb1 | 169008b3a4bb170b | 0c710a47ba6a567b | b49596c20feba7de |
43 | bc05ba8de5d3c480 | e96f89dd48cbd851 | b01521dd6a6be12c | 8e01e125b855d225 | 639cb938e14dc190 | f0996439e7b50cb1 | 169008b3a4bb170b | 0c710a47ba6a567b |
44 | 35d7e7f41defcbd5 | bc05ba8de5d3c480 | e96f89dd48cbd851 | b01521dd6a6be12c | cc5100997f5710f2 | 639cb938e14dc190 | f0996439e7b50cb1 | 169008b3a4bb170b |
45 | c47c9d5c7ea8a234 | 35d7e7f41defcbd5 | bc05ba8de5d3c480 | e96f89dd48cbd851 | 858d832ae0e8911c | cc5100997f5710f2 | 639cb938e14dc190 | f0996439e7b50cb1 |
46 | 021fbadbabab5ac6 | c47c9d5c7ea8a234 | 35d7e7f41defcbd5 | bc05ba8de5d3c480 | e95c2a57572d64d9 | 858d832ae0e8911c | cc5100997f5710f2 | 639cb938e14dc190 |
47 | f61e672694de2d67 | 021fbadbabab5ac6 | c47c9d5c7ea8a234 | 35d7e7f41defcbd5 | c6bc35740d8daa9a | e95c2a57572d64d9 | 858d832ae0e8911c | cc5100997f5710f2 |
48 | 6b69fc1bb482feac | f61e672694de2d67 | 021fbadbabab5ac6 | c47c9d5c7ea8a234 | 35264334c03ac8ad | c6bc35740d8daa9a | e95c2a57572d64d9 | 858d832ae0e8911c |
49 | 571f323d96b3a047 | 6b69fc1bb482feac | f61e672694de2d67 | 021fbadbabab5ac6 | 271580ed6c3e5650 | 35264334c03ac8ad | c6bc35740d8daa9a | e95c2a57572d64d9 |
50 | ca9bd862c5050918 | 571f323d96b3a047 | 6b69fc1bb482feac | f61e672694de2d67 | dfe091dab182e645 | 271580ed6c3e5650 | 35264334c03ac8ad | c6bc35740d8daa9a |
51 | 813a43dd2c502043 | ca9bd862c5050918 | 571f323d96b3a047 | 6b69fc1bb482feac | 07a0d8ef821c5e1a | dfe091dab182e645 | 271580ed6c3e5650 | 35264334c03ac8ad |
52 | d43f83727325dd77 | 813a43dd2c502043 | ca9bd862c5050918 | 571f323d96b3a047 | 483f80a82eaee23e | 07a0d8ef821c5e1a | dfe091dab182e645 | 271580ed6c3e5650 |
53 | 03df11b32d42e203 | d43f83727325dd77 | 813a43dd2c502043 | ca9bd862c5050918 | 504f94e40591cffa | 483f80a82eaee23e | 07a0d8ef821c5e1a | dfe091dab182e645 |
54 | d63f68037ddf06aa | 03df11b32d42e203 | d43f83727325dd77 | 813a43dd2c502043 | a6781efe1aa1ce02 | 504f94e40591cffa | 483f80a82eaee23e | 07a0d8ef821c5e1a |
55 | f650857b5babda4d | d63f68037ddf06aa | 03df11b32d42e203 | d43f83727325dd77 | 9ccfb31a86df0f86 | a6781efe1aa1ce02 | 504f94e40591cffa | 483f80a82eaee23e |
56 | 63b460e42748817e | f650857b5babda4d | d63f68037ddf06aa | 03df11b32d42e203 | c6b4dd2a9931c509 | 9ccfb31a86df0f86 | a6781efe1aa1ce02 | 504f94e40591cffa |
57 | 7a52912943d52b05 | 63b460e42748817e | f650857b5babda4d | d63f68037ddf06aa | d2e89bbd91e00be0 | c6b4dd2a9931c509 | 9ccfb31a86df0f86 | a6781efe1aa1ce02 |
58 | 4b81c3aec976ea4b | 7a52912943d52b05 | 63b460e42748817e | f650857b5babda4d | 70505988124351ac | d2e89bbd91e00be0 | c6b4dd2a9931c509 | 9ccfb31a86df0f86 |
59 | 581ecb3355dcd9b8 | 4b81c3aec976ea4b | 7a52912943d52b05 | 63b460e42748817e | 6a3c9b0f71c8bf36 | 70505988124351ac | d2e89bbd91e00be0 | c6b4dd2a9931c509 |
60 | 2c074484ef1eac8c | 581ecb3355dcd9b8 | 4b81c3aec976ea4b | 7a52912943d52b05 | 4797cde4ed370692 | 6a3c9b0f71c8bf36 | 70505988124351ac | d2e89bbd91e00be0 |
61 | 3857dfd2fc37d3ba | 2c074484ef1eac8c | 581ecb3355dcd9b8 | 4b81c3aec976ea4b | a6af4e9c9f807e51 | 4797cde4ed370692 | 6a3c9b0f71c8bf36 | 70505988124351ac |
62 | cfcd928c5424e2b6 | 3857dfd2fc37d3ba | 2c074484ef1eac8c | 581ecb3355dcd9b8 | 09aee5bda1644de5 | a6af4e9c9f807e51 | 4797cde4ed370692 | 6a3c9b0f71c8bf36 |
63 | a81dedbb9f19e643 | cfcd928c5424e2b6 | 3857dfd2fc37d3ba | 2c074484ef1eac8c | 84058865d60a05fa | 09aee5bda1644de5 | a6af4e9c9f807e51 | 4797cde4ed370692 |
64 | ab44e86276478d85 | a81dedbb9f19e643 | cfcd928c5424e2b6 | 3857dfd2fc37d3ba | cd881ee59ca6bc53 | 84058865d60a05fa | 09aee5bda1644de5 | a6af4e9c9f807e51 |
65 | 5a806d7e9821a501 | ab44e86276478d85 | a81dedbb9f19e643 | cfcd928c5424e2b6 | aa84b086688a5c45 | cd881ee59ca6bc53 | 84058865d60a05fa | 09aee5bda1644de5 |
66 | eeb9c21bb0102598 | 5a806d7e9821a501 | ab44e86276478d85 | a81dedbb9f19e643 | 3b5fed0d6a1f96e1 | aa84b086688a5c45 | cd881ee59ca6bc53 | 84058865d60a05fa |
67 | 46c4210ab2cc155d | eeb9c21bb0102598 | 5a806d7e9821a501 | ab44e86276478d85 | 29fab5a7bff53366 | 3b5fed0d6a1f96e1 | aa84b086688a5c45 | cd881ee59ca6bc53 |
68 | 54ba35cf56a0340e | 46c4210ab2cc155d | eeb9c21bb0102598 | 5a806d7e9821a501 | 1c66f46d95690bcf | 29fab5a7bff53366 | 3b5fed0d6a1f96e1 | aa84b086688a5c45 |
69 | 181839d609c79748 | 54ba35cf56a0340e | 46c4210ab2cc155d | eeb9c21bb0102598 | 0ada78ba2d446140 | 1c66f46d95690bcf | 29fab5a7bff53366 | 3b5fed0d6a1f96e1 |
70 | fb6aaae5d0b6a447 | 181839d609c79748 | 54ba35cf56a0340e | 46c4210ab2cc155d | e3711cb6564d112d | 0ada78ba2d446140 | 1c66f46d95690bcf | 29fab5a7bff53366 |
71 | 7652c579cb60f19c | fb6aaae5d0b6a447 | 181839d609c79748 | 54ba35cf56a0340e | aff62c9665ff80fa | e3711cb6564d112d | 0ada78ba2d446140 | 1c66f46d95690bcf |
72 | f15e9664b2803575 | 7652c579cb60f19c | fb6aaae5d0b6a447 | 181839d609c79748 | 947c3dfafee570ef | aff62c9665ff80fa | e3711cb6564d112d | 0ada78ba2d446140 |
73 | 358406d165aee9ab | f15e9664b2803575 | 7652c579cb60f19c | fb6aaae5d0b6a447 | 8c7b5fd91a794ca0 | 947c3dfafee570ef | aff62c9665ff80fa | e3711cb6564d112d |
74 | 20878dcd29cdfaf5 | 358406d165aee9ab | f15e9664b2803575 | 7652c579cb60f19c | 054d3536539948d0 | 8c7b5fd91a794ca0 | 947c3dfafee570ef | aff62c9665ff80fa |
75 | 33d48dabb5521de2 | 20878dcd29cdfaf5 | 358406d165aee9ab | f15e9664b2803575 | 2ba18245b50de4cf | 054d3536539948d0 | 8c7b5fd91a794ca0 | 947c3dfafee570ef |
76 | c8960e6be864b916 | 33d48dabb5521de2 | 20878dcd29cdfaf5 | 358406d165aee9ab | 995019a6ff3ba3de | 2ba18245b50de4cf | 054d3536539948d0 | 8c7b5fd91a794ca0 |
77 | 654ef9abec389ca9 | c8960e6be864b916 | 33d48dabb5521de2 | 20878dcd29cdfaf5 | ceb9fc3691ce8326 | 995019a6ff3ba3de | 2ba18245b50de4cf | 054d3536539948d0 |
78 | d67806db8b148677 | 654ef9abec389ca9 | c8960e6be864b916 | 33d48dabb5521de2 | 25c96a7768fb2aa3 | ceb9fc3691ce8326 | 995019a6ff3ba3de | 2ba18245b50de4cf |
79 | 10d9c4c4295599f6 | d67806db8b148677 | 654ef9abec389ca9 | c8960e6be864b916 | 9bb4d39778c07f9e | 25c96a7768fb2aa3 | ceb9fc3691ce8326 | 995019a6ff3ba3de |
80 | 73a54f399fa4b1b2 | 10d9c4c4295599f6 | d67806db8b148677 | 654ef9abec389ca9 | d08446aa79693ed7 | 9bb4d39778c07f9e | 25c96a7768fb2aa3 | ceb9fc3691ce8326 |
杂凑值h0~h7
h0:0xddaf35a193617aba
h1:0xcc417349ae204131
h2:0x12e6fa4e89a97ea2
h3:0x0a9eeee64b55d39a
h4:0x2192992a274fc1a8
h5:0x36ba3c23a3feebbd
h6:0x454d4423643ce80e
h7:0x2a9ac94fa54ca49f
附录B 下载链接
https://download.csdn.net/download/u013073067/13138360
编译环境:VS2010
语言:C
参考文献:
[1]https://en.wikipedia.org/wiki/Secure_Hash_Algorithms
这篇关于SHA-512摘要算法(带示例)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!