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轮迭代(十六进制表示)

abcdefgh
06a09e667f3bcc908bb67ae8584caa73b3c6ef372fe94f82ba54ff53a5f1d36f1510e527fade682d19b05688c2b3e6c1f1f83d9abfb41bd6b5be0cd19137e2179
1f6afceb8bcfcddf56a09e667f3bcc908bb67ae8584caa73b3c6ef372fe94f82b58cb02347ab51f91510e527fade682d19b05688c2b3e6c1f1f83d9abfb41bd6b
21320f8c9fb872cc0f6afceb8bcfcddf56a09e667f3bcc908bb67ae8584caa73bc3d4ebfd48650ffa58cb02347ab51f91510e527fade682d19b05688c2b3e6c1f
3ebcffc07203d91f31320f8c9fb872cc0f6afceb8bcfcddf56a09e667f3bcc908dfa9b239f2697812c3d4ebfd48650ffa58cb02347ab51f91510e527fade682d1
45a83cb3e80050e82ebcffc07203d91f31320f8c9fb872cc0f6afceb8bcfcddf50b47b4bb1928990edfa9b239f2697812c3d4ebfd48650ffa58cb02347ab51f91
5b6809539516048605a83cb3e80050e82ebcffc07203d91f31320f8c9fb872cc0745aca4a342ed2e20b47b4bb1928990edfa9b239f2697812c3d4ebfd48650ffa
6af573b02403e89cdb6809539516048605a83cb3e80050e82ebcffc07203d91f396f60209b6dc35ba745aca4a342ed2e20b47b4bb1928990edfa9b239f2697812
7c4875b0c7abc076baf573b02403e89cdb6809539516048605a83cb3e80050e825a6c781f54dcc00c96f60209b6dc35ba745aca4a342ed2e20b47b4bb1928990e
88093d195e0054fa3c4875b0c7abc076baf573b02403e89cdb68095395160486086f67263a0f0ec0a5a6c781f54dcc00c96f60209b6dc35ba745aca4a342ed2e2
9f1eca5544cb892258093d195e0054fa3c4875b0c7abc076baf573b02403e89cdd0403c398fc4000286f67263a0f0ec0a5a6c781f54dcc00c96f60209b6dc35ba
1081782d4a5db48f03f1eca5544cb892258093d195e0054fa3c4875b0c7abc076b00091f460be46c52d0403c398fc4000286f67263a0f0ec0a5a6c781f54dcc00c
1169854c4aa0f25b5981782d4a5db48f03f1eca5544cb892258093d195e0054fa3d375471bde1ba3f400091f460be46c52d0403c398fc4000286f67263a0f0ec0a
12db0a9963f80c2eaa69854c4aa0f25b5981782d4a5db48f03f1eca5544cb89225475975b91a7a462cd375471bde1ba3f400091f460be46c52d0403c398fc40002
135e41214388186c14db0a9963f80c2eaa69854c4aa0f25b5981782d4a5db48f03cdf3bff2883fc9d9475975b91a7a462cd375471bde1ba3f400091f460be46c52
1444249631255d2ca05e41214388186c14db0a9963f80c2eaa69854c4aa0f25b59860acf9effba6f61cdf3bff2883fc9d9475975b91a7a462cd375471bde1ba3f4
15fa967eed85a0802844249631255d2ca05e41214388186c14db0a9963f80c2eaa874bfe5f6aae9f2f860acf9effba6f61cdf3bff2883fc9d9475975b91a7a462c
160ae07c86b1181c75fa967eed85a0802844249631255d2ca05e41214388186c14a77b7c035dd4c161874bfe5f6aae9f2f860acf9effba6f61cdf3bff2883fc9d9
17caf81a425d8005370ae07c86b1181c75fa967eed85a0802844249631255d2ca02deecc6b39d64d78a77b7c035dd4c161874bfe5f6aae9f2f860acf9effba6f61
184725be249ad19e6bcaf81a425d8005370ae07c86b1181c75fa967eed85a08028f47e8353f80474552deecc6b39d64d78a77b7c035dd4c161874bfe5f6aae9f2f
193c4b4104168e3edb4725be249ad19e6bcaf81a425d8005370ae07c86b1181c7529695fd88d81dbd0f47e8353f80474552deecc6b39d64d78a77b7c035dd4c161
209a3fb4d38ab6cf063c4b4104168e3edb4725be249ad19e6bcaf81a425d800537f14998dd5f70767e29695fd88d81dbd0f47e8353f80474552deecc6b39d64d78
218dc5ae65569d38559a3fb4d38ab6cf063c4b4104168e3edb4725be249ad19e6b4bb9e66d1145bfdcf14998dd5f70767e29695fd88d81dbd0f47e8353f8047455
22da34d6673d452dcf8dc5ae65569d38559a3fb4d38ab6cf063c4b4104168e3edb8e30ff09ad4887534bb9e66d1145bfdcf14998dd5f70767e29695fd88d81dbd0
233e2644567b709a78da34d6673d452dcf8dc5ae65569d38559a3fb4d38ab6cf060ac2b11da8f571c68e30ff09ad4887534bb9e66d1145bfdcf14998dd5f70767e
244f6877b58fe554843e2644567b709a78da34d6673d452dcf8dc5ae65569d3855c66005f87db552330ac2b11da8f571c68e30ff09ad4887534bb9e66d1145bfdc
259aff71163fa3a9404f6877b58fe554843e2644567b709a78da34d6673d452dcfd3ecf13769180e6fc66005f87db552330ac2b11da8f571c68e30ff09ad488753
260bc5f791f8e6816b9aff71163fa3a9404f6877b58fe554843e2644567b709a786ddf1fd7edcce336d3ecf13769180e6fc66005f87db552330ac2b11da8f571c6
27884c3bc27bc4f9410bc5f791f8e6816b9aff71163fa3a9404f6877b58fe55484e6e48c9a8e9483656ddf1fd7edcce336d3ecf13769180e6fc66005f87db55233
28eab4a9e5771b8d09884c3bc27bc4f9410bc5f791f8e6816b9aff71163fa3a94009068a4e255a0dace6e48c9a8e9483656ddf1fd7edcce336d3ecf13769180e6f
29e62349090f47d30aeab4a9e5771b8d09884c3bc27bc4f9410bc5f791f8e6816b0fcdf99710f2158409068a4e255a0dace6e48c9a8e9483656ddf1fd7edcce336
3074bf40f869094c63e62349090f47d30aeab4a9e5771b8d09884c3bc27bc4f941f0aec2fe1437f0850fcdf99710f2158409068a4e255a0dace6e48c9a8e948365
314c4fbbb75f1873a674bf40f869094c63e62349090f47d30aeab4a9e5771b8d0973e025d91b9efea3f0aec2fe1437f0850fcdf99710f2158409068a4e255a0dac
32ff4d3f1f0d46a7364c4fbbb75f1873a674bf40f869094c63e62349090f47d30a3cd388e119e8162e73e025d91b9efea3f0aec2fe1437f0850fcdf99710f21584
33a0509015ca08c8d4ff4d3f1f0d46a7364c4fbbb75f1873a674bf40f869094c63e1034573654a106f3cd388e119e8162e73e025d91b9efea3f0aec2fe1437f085
3460d4e6995ed91fe6a0509015ca08c8d4ff4d3f1f0d46a7364c4fbbb75f1873a6efabbd8bf47c041ae1034573654a106f3cd388e119e8162e73e025d91b9efea3
352c59ec774363262160d4e6995ed91fe6a0509015ca08c8d4ff4d3f1f0d46a7360fbae670fa780fd3efabbd8bf47c041ae1034573654a106f3cd388e119e8162e
361a081afc59fdbc2c2c59ec774363262160d4e6995ed91fe6a0509015ca08c8d4f098082f502b44cd0fbae670fa780fd3efabbd8bf47c041ae1034573654a106f
3788df85b0bbe775141a081afc59fdbc2c2c59ec774363262160d4e6995ed91fe68fbfd0162bbf4675f098082f502b44cd0fbae670fa780fd3efabbd8bf47c041a
38002bb8e4cd98956788df85b0bbe775141a081afc59fdbc2c2c59ec774363262166adcfa249ac7bbd8fbfd0162bbf4675f098082f502b44cd0fbae670fa780fd3
39b3bb8542b3376de5002bb8e4cd98956788df85b0bbe775141a081afc59fdbc2cb49596c20feba7de66adcfa249ac7bbd8fbfd0162bbf4675f098082f502b44cd
408e01e125b855d225b3bb8542b3376de5002bb8e4cd98956788df85b0bbe775140c710a47ba6a567bb49596c20feba7de66adcfa249ac7bbd8fbfd0162bbf4675
41b01521dd6a6be12c8e01e125b855d225b3bb8542b3376de5002bb8e4cd989567169008b3a4bb170b0c710a47ba6a567bb49596c20feba7de66adcfa249ac7bbd
42e96f89dd48cbd851b01521dd6a6be12c8e01e125b855d225b3bb8542b3376de5f0996439e7b50cb1169008b3a4bb170b0c710a47ba6a567bb49596c20feba7de
43bc05ba8de5d3c480e96f89dd48cbd851b01521dd6a6be12c8e01e125b855d225639cb938e14dc190f0996439e7b50cb1169008b3a4bb170b0c710a47ba6a567b
4435d7e7f41defcbd5bc05ba8de5d3c480e96f89dd48cbd851b01521dd6a6be12ccc5100997f5710f2639cb938e14dc190f0996439e7b50cb1169008b3a4bb170b
45c47c9d5c7ea8a23435d7e7f41defcbd5bc05ba8de5d3c480e96f89dd48cbd851858d832ae0e8911ccc5100997f5710f2639cb938e14dc190f0996439e7b50cb1
46021fbadbabab5ac6c47c9d5c7ea8a23435d7e7f41defcbd5bc05ba8de5d3c480e95c2a57572d64d9858d832ae0e8911ccc5100997f5710f2639cb938e14dc190
47f61e672694de2d67021fbadbabab5ac6c47c9d5c7ea8a23435d7e7f41defcbd5c6bc35740d8daa9ae95c2a57572d64d9858d832ae0e8911ccc5100997f5710f2
486b69fc1bb482feacf61e672694de2d67021fbadbabab5ac6c47c9d5c7ea8a23435264334c03ac8adc6bc35740d8daa9ae95c2a57572d64d9858d832ae0e8911c
49571f323d96b3a0476b69fc1bb482feacf61e672694de2d67021fbadbabab5ac6271580ed6c3e565035264334c03ac8adc6bc35740d8daa9ae95c2a57572d64d9
50ca9bd862c5050918571f323d96b3a0476b69fc1bb482feacf61e672694de2d67dfe091dab182e645271580ed6c3e565035264334c03ac8adc6bc35740d8daa9a
51813a43dd2c502043ca9bd862c5050918571f323d96b3a0476b69fc1bb482feac07a0d8ef821c5e1adfe091dab182e645271580ed6c3e565035264334c03ac8ad
52d43f83727325dd77813a43dd2c502043ca9bd862c5050918571f323d96b3a047483f80a82eaee23e07a0d8ef821c5e1adfe091dab182e645271580ed6c3e5650
5303df11b32d42e203d43f83727325dd77813a43dd2c502043ca9bd862c5050918504f94e40591cffa483f80a82eaee23e07a0d8ef821c5e1adfe091dab182e645
54d63f68037ddf06aa03df11b32d42e203d43f83727325dd77813a43dd2c502043a6781efe1aa1ce02504f94e40591cffa483f80a82eaee23e07a0d8ef821c5e1a
55f650857b5babda4dd63f68037ddf06aa03df11b32d42e203d43f83727325dd779ccfb31a86df0f86a6781efe1aa1ce02504f94e40591cffa483f80a82eaee23e
5663b460e42748817ef650857b5babda4dd63f68037ddf06aa03df11b32d42e203c6b4dd2a9931c5099ccfb31a86df0f86a6781efe1aa1ce02504f94e40591cffa
577a52912943d52b0563b460e42748817ef650857b5babda4dd63f68037ddf06aad2e89bbd91e00be0c6b4dd2a9931c5099ccfb31a86df0f86a6781efe1aa1ce02
584b81c3aec976ea4b7a52912943d52b0563b460e42748817ef650857b5babda4d70505988124351acd2e89bbd91e00be0c6b4dd2a9931c5099ccfb31a86df0f86
59581ecb3355dcd9b84b81c3aec976ea4b7a52912943d52b0563b460e42748817e6a3c9b0f71c8bf3670505988124351acd2e89bbd91e00be0c6b4dd2a9931c509
602c074484ef1eac8c581ecb3355dcd9b84b81c3aec976ea4b7a52912943d52b054797cde4ed3706926a3c9b0f71c8bf3670505988124351acd2e89bbd91e00be0
613857dfd2fc37d3ba2c074484ef1eac8c581ecb3355dcd9b84b81c3aec976ea4ba6af4e9c9f807e514797cde4ed3706926a3c9b0f71c8bf3670505988124351ac
62cfcd928c5424e2b63857dfd2fc37d3ba2c074484ef1eac8c581ecb3355dcd9b809aee5bda1644de5a6af4e9c9f807e514797cde4ed3706926a3c9b0f71c8bf36
63a81dedbb9f19e643cfcd928c5424e2b63857dfd2fc37d3ba2c074484ef1eac8c84058865d60a05fa09aee5bda1644de5a6af4e9c9f807e514797cde4ed370692
64ab44e86276478d85a81dedbb9f19e643cfcd928c5424e2b63857dfd2fc37d3bacd881ee59ca6bc5384058865d60a05fa09aee5bda1644de5a6af4e9c9f807e51
655a806d7e9821a501ab44e86276478d85a81dedbb9f19e643cfcd928c5424e2b6aa84b086688a5c45cd881ee59ca6bc5384058865d60a05fa09aee5bda1644de5
66eeb9c21bb01025985a806d7e9821a501ab44e86276478d85a81dedbb9f19e6433b5fed0d6a1f96e1aa84b086688a5c45cd881ee59ca6bc5384058865d60a05fa
6746c4210ab2cc155deeb9c21bb01025985a806d7e9821a501ab44e86276478d8529fab5a7bff533663b5fed0d6a1f96e1aa84b086688a5c45cd881ee59ca6bc53
6854ba35cf56a0340e46c4210ab2cc155deeb9c21bb01025985a806d7e9821a5011c66f46d95690bcf29fab5a7bff533663b5fed0d6a1f96e1aa84b086688a5c45
69181839d609c7974854ba35cf56a0340e46c4210ab2cc155deeb9c21bb01025980ada78ba2d4461401c66f46d95690bcf29fab5a7bff533663b5fed0d6a1f96e1
70fb6aaae5d0b6a447181839d609c7974854ba35cf56a0340e46c4210ab2cc155de3711cb6564d112d0ada78ba2d4461401c66f46d95690bcf29fab5a7bff53366
717652c579cb60f19cfb6aaae5d0b6a447181839d609c7974854ba35cf56a0340eaff62c9665ff80fae3711cb6564d112d0ada78ba2d4461401c66f46d95690bcf
72f15e9664b28035757652c579cb60f19cfb6aaae5d0b6a447181839d609c79748947c3dfafee570efaff62c9665ff80fae3711cb6564d112d0ada78ba2d446140
73358406d165aee9abf15e9664b28035757652c579cb60f19cfb6aaae5d0b6a4478c7b5fd91a794ca0947c3dfafee570efaff62c9665ff80fae3711cb6564d112d
7420878dcd29cdfaf5358406d165aee9abf15e9664b28035757652c579cb60f19c054d3536539948d08c7b5fd91a794ca0947c3dfafee570efaff62c9665ff80fa
7533d48dabb5521de220878dcd29cdfaf5358406d165aee9abf15e9664b28035752ba18245b50de4cf054d3536539948d08c7b5fd91a794ca0947c3dfafee570ef
76c8960e6be864b91633d48dabb5521de220878dcd29cdfaf5358406d165aee9ab995019a6ff3ba3de2ba18245b50de4cf054d3536539948d08c7b5fd91a794ca0
77654ef9abec389ca9c8960e6be864b91633d48dabb5521de220878dcd29cdfaf5ceb9fc3691ce8326995019a6ff3ba3de2ba18245b50de4cf054d3536539948d0
78d67806db8b148677654ef9abec389ca9c8960e6be864b91633d48dabb5521de225c96a7768fb2aa3ceb9fc3691ce8326995019a6ff3ba3de2ba18245b50de4cf
7910d9c4c4295599f6d67806db8b148677654ef9abec389ca9c8960e6be864b9169bb4d39778c07f9e25c96a7768fb2aa3ceb9fc3691ce8326995019a6ff3ba3de
8073a54f399fa4b1b210d9c4c4295599f6d67806db8b148677654ef9abec389ca9d08446aa79693ed79bb4d39778c07f9e25c96a7768fb2aa3ceb9fc3691ce8326

杂凑值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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

fengwang0301

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值