libbtc
bitcoinclibrary
Macros | Functions
ripemd160.c File Reference
#include <string.h>
#include "ripemd160.h"

Go to the source code of this file.

Macros

#define ROL(x, n)   (((x) << (n)) | ((x) >> (32 - (n))))
 
#define F(x, y, z)   ((x) ^ (y) ^ (z))
 
#define G(x, y, z)   (((x) & (y)) | (~(x) & (z)))
 
#define H(x, y, z)   (((x) | ~(y)) ^ (z))
 
#define IQ(x, y, z)   (((x) & (z)) | ((y) & ~(z)))
 
#define J(x, y, z)   ((x) ^ ((y) | ~(z)))
 
#define FF(a, b, c, d, e, x, s)
 
#define GG(a, b, c, d, e, x, s)
 
#define HH(a, b, c, d, e, x, s)
 
#define II(a, b, c, d, e, x, s)
 
#define JJ(a, b, c, d, e, x, s)
 
#define FFF(a, b, c, d, e, x, s)
 
#define GGG(a, b, c, d, e, x, s)
 
#define HHH(a, b, c, d, e, x, s)
 
#define III(a, b, c, d, e, x, s)
 
#define JJJ(a, b, c, d, e, x, s)
 

Functions

static void compress (uint32_t *MDbuf, uint32_t *X)
 
void ripemd160 (const uint8_t *msg, uint32_t msg_len, uint8_t *hash)
 

Macro Definition Documentation

#define F (   x,
  y,
 
)    ((x) ^ (y) ^ (z))

Definition at line 31 of file ripemd160.c.

#define FF (   a,
  b,
  c,
  d,
  e,
  x,
 
)
Value:
{ \
(a) += F((b), (c), (d)) + (x); \
(a) = ROL((a), (s)) + (e); \
(c) = ROL((c), 10); \
}
#define F(x, y, z)
Definition: ripemd160.c:31
#define ROL(x, n)
Definition: ripemd160.c:29

Definition at line 37 of file ripemd160.c.

Referenced by compress().

#define FFF (   a,
  b,
  c,
  d,
  e,
  x,
 
)
Value:
{ \
(a) += F((b), (c), (d)) + (x); \
(a) = ROL((a), (s)) + (e); \
(c) = ROL((c), 10); \
}
#define F(x, y, z)
Definition: ripemd160.c:31
#define ROL(x, n)
Definition: ripemd160.c:29

Definition at line 67 of file ripemd160.c.

Referenced by compress().

#define G (   x,
  y,
 
)    (((x) & (y)) | (~(x) & (z)))

Definition at line 32 of file ripemd160.c.

#define GG (   a,
  b,
  c,
  d,
  e,
  x,
 
)
Value:
{ \
(a) += G((b), (c), (d)) + (x)+0x5a827999UL; \
(a) = ROL((a), (s)) + (e); \
(c) = ROL((c), 10); \
}
#define G(x, y, z)
Definition: ripemd160.c:32
#define ROL(x, n)
Definition: ripemd160.c:29

Definition at line 43 of file ripemd160.c.

Referenced by compress().

#define GGG (   a,
  b,
  c,
  d,
  e,
  x,
 
)
Value:
{ \
(a) += G((b), (c), (d)) + (x)+0x7a6d76e9UL; \
(a) = ROL((a), (s)) + (e); \
(c) = ROL((c), 10); \
}
#define G(x, y, z)
Definition: ripemd160.c:32
#define ROL(x, n)
Definition: ripemd160.c:29

Definition at line 73 of file ripemd160.c.

Referenced by compress().

#define H (   x,
  y,
 
)    (((x) | ~(y)) ^ (z))

Definition at line 33 of file ripemd160.c.

#define HH (   a,
  b,
  c,
  d,
  e,
  x,
 
)
Value:
{ \
(a) += H((b), (c), (d)) + (x)+0x6ed9eba1UL; \
(a) = ROL((a), (s)) + (e); \
(c) = ROL((c), 10); \
}
#define ROL(x, n)
Definition: ripemd160.c:29
#define H(x, y, z)
Definition: ripemd160.c:33

Definition at line 49 of file ripemd160.c.

Referenced by compress().

#define HHH (   a,
  b,
  c,
  d,
  e,
  x,
 
)
Value:
{ \
(a) += H((b), (c), (d)) + (x)+0x6d703ef3UL; \
(a) = ROL((a), (s)) + (e); \
(c) = ROL((c), 10); \
}
#define ROL(x, n)
Definition: ripemd160.c:29
#define H(x, y, z)
Definition: ripemd160.c:33

Definition at line 79 of file ripemd160.c.

Referenced by compress().

#define II (   a,
  b,
  c,
  d,
  e,
  x,
 
)
Value:
{ \
(a) += IQ((b), (c), (d)) + (x)+0x8f1bbcdcUL; \
(a) = ROL((a), (s)) + (e); \
(c) = ROL((c), 10); \
}
#define IQ(x, y, z)
Definition: ripemd160.c:34
#define ROL(x, n)
Definition: ripemd160.c:29

Definition at line 55 of file ripemd160.c.

Referenced by compress().

#define III (   a,
  b,
  c,
  d,
  e,
  x,
 
)
Value:
{ \
(a) += IQ((b), (c), (d)) + (x)+0x5c4dd124UL; \
(a) = ROL((a), (s)) + (e); \
(c) = ROL((c), 10); \
}
#define IQ(x, y, z)
Definition: ripemd160.c:34
#define ROL(x, n)
Definition: ripemd160.c:29

Definition at line 85 of file ripemd160.c.

Referenced by compress().

#define IQ (   x,
  y,
 
)    (((x) & (z)) | ((y) & ~(z)))

Definition at line 34 of file ripemd160.c.

#define J (   x,
  y,
 
)    ((x) ^ ((y) | ~(z)))

Definition at line 35 of file ripemd160.c.

#define JJ (   a,
  b,
  c,
  d,
  e,
  x,
 
)
Value:
{ \
(a) += J((b), (c), (d)) + (x)+0xa953fd4eUL; \
(a) = ROL((a), (s)) + (e); \
(c) = ROL((c), 10); \
}
#define J(x, y, z)
Definition: ripemd160.c:35
#define ROL(x, n)
Definition: ripemd160.c:29

Definition at line 61 of file ripemd160.c.

Referenced by compress().

#define JJJ (   a,
  b,
  c,
  d,
  e,
  x,
 
)
Value:
{ \
(a) += J((b), (c), (d)) + (x)+0x50a28be6UL; \
(a) = ROL((a), (s)) + (e); \
(c) = ROL((c), 10); \
}
#define J(x, y, z)
Definition: ripemd160.c:35
#define ROL(x, n)
Definition: ripemd160.c:29

Definition at line 91 of file ripemd160.c.

Referenced by compress().

#define ROL (   x,
 
)    (((x) << (n)) | ((x) >> (32 - (n))))

Copyright (c) 2013-2014 Tomas Dzetkulic Copyright (c) 2013-2014 Pavol Rusnak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition at line 29 of file ripemd160.c.

Function Documentation

static void compress ( uint32_t *  MDbuf,
uint32_t *  X 
)
static

Definition at line 98 of file ripemd160.c.

References FF, FFF, GG, GGG, HH, HHH, II, III, JJ, and JJJ.

Referenced by ripemd160().

99 {
100  uint32_t aa = MDbuf[0], bb = MDbuf[1], cc = MDbuf[2], dd = MDbuf[3], ee = MDbuf[4];
101  uint32_t aaa = MDbuf[0], bbb = MDbuf[1], ccc = MDbuf[2], ddd = MDbuf[3], eee = MDbuf[4];
102 
103  /* round 1 */
104  FF(aa, bb, cc, dd, ee, X[0], 11);
105  FF(ee, aa, bb, cc, dd, X[1], 14);
106  FF(dd, ee, aa, bb, cc, X[2], 15);
107  FF(cc, dd, ee, aa, bb, X[3], 12);
108  FF(bb, cc, dd, ee, aa, X[4], 5);
109  FF(aa, bb, cc, dd, ee, X[5], 8);
110  FF(ee, aa, bb, cc, dd, X[6], 7);
111  FF(dd, ee, aa, bb, cc, X[7], 9);
112  FF(cc, dd, ee, aa, bb, X[8], 11);
113  FF(bb, cc, dd, ee, aa, X[9], 13);
114  FF(aa, bb, cc, dd, ee, X[10], 14);
115  FF(ee, aa, bb, cc, dd, X[11], 15);
116  FF(dd, ee, aa, bb, cc, X[12], 6);
117  FF(cc, dd, ee, aa, bb, X[13], 7);
118  FF(bb, cc, dd, ee, aa, X[14], 9);
119  FF(aa, bb, cc, dd, ee, X[15], 8);
120 
121  /* round 2 */
122  GG(ee, aa, bb, cc, dd, X[7], 7);
123  GG(dd, ee, aa, bb, cc, X[4], 6);
124  GG(cc, dd, ee, aa, bb, X[13], 8);
125  GG(bb, cc, dd, ee, aa, X[1], 13);
126  GG(aa, bb, cc, dd, ee, X[10], 11);
127  GG(ee, aa, bb, cc, dd, X[6], 9);
128  GG(dd, ee, aa, bb, cc, X[15], 7);
129  GG(cc, dd, ee, aa, bb, X[3], 15);
130  GG(bb, cc, dd, ee, aa, X[12], 7);
131  GG(aa, bb, cc, dd, ee, X[0], 12);
132  GG(ee, aa, bb, cc, dd, X[9], 15);
133  GG(dd, ee, aa, bb, cc, X[5], 9);
134  GG(cc, dd, ee, aa, bb, X[2], 11);
135  GG(bb, cc, dd, ee, aa, X[14], 7);
136  GG(aa, bb, cc, dd, ee, X[11], 13);
137  GG(ee, aa, bb, cc, dd, X[8], 12);
138 
139  /* round 3 */
140  HH(dd, ee, aa, bb, cc, X[3], 11);
141  HH(cc, dd, ee, aa, bb, X[10], 13);
142  HH(bb, cc, dd, ee, aa, X[14], 6);
143  HH(aa, bb, cc, dd, ee, X[4], 7);
144  HH(ee, aa, bb, cc, dd, X[9], 14);
145  HH(dd, ee, aa, bb, cc, X[15], 9);
146  HH(cc, dd, ee, aa, bb, X[8], 13);
147  HH(bb, cc, dd, ee, aa, X[1], 15);
148  HH(aa, bb, cc, dd, ee, X[2], 14);
149  HH(ee, aa, bb, cc, dd, X[7], 8);
150  HH(dd, ee, aa, bb, cc, X[0], 13);
151  HH(cc, dd, ee, aa, bb, X[6], 6);
152  HH(bb, cc, dd, ee, aa, X[13], 5);
153  HH(aa, bb, cc, dd, ee, X[11], 12);
154  HH(ee, aa, bb, cc, dd, X[5], 7);
155  HH(dd, ee, aa, bb, cc, X[12], 5);
156 
157  /* round 4 */
158  II(cc, dd, ee, aa, bb, X[1], 11);
159  II(bb, cc, dd, ee, aa, X[9], 12);
160  II(aa, bb, cc, dd, ee, X[11], 14);
161  II(ee, aa, bb, cc, dd, X[10], 15);
162  II(dd, ee, aa, bb, cc, X[0], 14);
163  II(cc, dd, ee, aa, bb, X[8], 15);
164  II(bb, cc, dd, ee, aa, X[12], 9);
165  II(aa, bb, cc, dd, ee, X[4], 8);
166  II(ee, aa, bb, cc, dd, X[13], 9);
167  II(dd, ee, aa, bb, cc, X[3], 14);
168  II(cc, dd, ee, aa, bb, X[7], 5);
169  II(bb, cc, dd, ee, aa, X[15], 6);
170  II(aa, bb, cc, dd, ee, X[14], 8);
171  II(ee, aa, bb, cc, dd, X[5], 6);
172  II(dd, ee, aa, bb, cc, X[6], 5);
173  II(cc, dd, ee, aa, bb, X[2], 12);
174 
175  /* round 5 */
176  JJ(bb, cc, dd, ee, aa, X[4], 9);
177  JJ(aa, bb, cc, dd, ee, X[0], 15);
178  JJ(ee, aa, bb, cc, dd, X[5], 5);
179  JJ(dd, ee, aa, bb, cc, X[9], 11);
180  JJ(cc, dd, ee, aa, bb, X[7], 6);
181  JJ(bb, cc, dd, ee, aa, X[12], 8);
182  JJ(aa, bb, cc, dd, ee, X[2], 13);
183  JJ(ee, aa, bb, cc, dd, X[10], 12);
184  JJ(dd, ee, aa, bb, cc, X[14], 5);
185  JJ(cc, dd, ee, aa, bb, X[1], 12);
186  JJ(bb, cc, dd, ee, aa, X[3], 13);
187  JJ(aa, bb, cc, dd, ee, X[8], 14);
188  JJ(ee, aa, bb, cc, dd, X[11], 11);
189  JJ(dd, ee, aa, bb, cc, X[6], 8);
190  JJ(cc, dd, ee, aa, bb, X[15], 5);
191  JJ(bb, cc, dd, ee, aa, X[13], 6);
192 
193  /* parallel round 1 */
194  JJJ(aaa, bbb, ccc, ddd, eee, X[5], 8);
195  JJJ(eee, aaa, bbb, ccc, ddd, X[14], 9);
196  JJJ(ddd, eee, aaa, bbb, ccc, X[7], 9);
197  JJJ(ccc, ddd, eee, aaa, bbb, X[0], 11);
198  JJJ(bbb, ccc, ddd, eee, aaa, X[9], 13);
199  JJJ(aaa, bbb, ccc, ddd, eee, X[2], 15);
200  JJJ(eee, aaa, bbb, ccc, ddd, X[11], 15);
201  JJJ(ddd, eee, aaa, bbb, ccc, X[4], 5);
202  JJJ(ccc, ddd, eee, aaa, bbb, X[13], 7);
203  JJJ(bbb, ccc, ddd, eee, aaa, X[6], 7);
204  JJJ(aaa, bbb, ccc, ddd, eee, X[15], 8);
205  JJJ(eee, aaa, bbb, ccc, ddd, X[8], 11);
206  JJJ(ddd, eee, aaa, bbb, ccc, X[1], 14);
207  JJJ(ccc, ddd, eee, aaa, bbb, X[10], 14);
208  JJJ(bbb, ccc, ddd, eee, aaa, X[3], 12);
209  JJJ(aaa, bbb, ccc, ddd, eee, X[12], 6);
210 
211  /* parallel round 2 */
212  III(eee, aaa, bbb, ccc, ddd, X[6], 9);
213  III(ddd, eee, aaa, bbb, ccc, X[11], 13);
214  III(ccc, ddd, eee, aaa, bbb, X[3], 15);
215  III(bbb, ccc, ddd, eee, aaa, X[7], 7);
216  III(aaa, bbb, ccc, ddd, eee, X[0], 12);
217  III(eee, aaa, bbb, ccc, ddd, X[13], 8);
218  III(ddd, eee, aaa, bbb, ccc, X[5], 9);
219  III(ccc, ddd, eee, aaa, bbb, X[10], 11);
220  III(bbb, ccc, ddd, eee, aaa, X[14], 7);
221  III(aaa, bbb, ccc, ddd, eee, X[15], 7);
222  III(eee, aaa, bbb, ccc, ddd, X[8], 12);
223  III(ddd, eee, aaa, bbb, ccc, X[12], 7);
224  III(ccc, ddd, eee, aaa, bbb, X[4], 6);
225  III(bbb, ccc, ddd, eee, aaa, X[9], 15);
226  III(aaa, bbb, ccc, ddd, eee, X[1], 13);
227  III(eee, aaa, bbb, ccc, ddd, X[2], 11);
228 
229  /* parallel round 3 */
230  HHH(ddd, eee, aaa, bbb, ccc, X[15], 9);
231  HHH(ccc, ddd, eee, aaa, bbb, X[5], 7);
232  HHH(bbb, ccc, ddd, eee, aaa, X[1], 15);
233  HHH(aaa, bbb, ccc, ddd, eee, X[3], 11);
234  HHH(eee, aaa, bbb, ccc, ddd, X[7], 8);
235  HHH(ddd, eee, aaa, bbb, ccc, X[14], 6);
236  HHH(ccc, ddd, eee, aaa, bbb, X[6], 6);
237  HHH(bbb, ccc, ddd, eee, aaa, X[9], 14);
238  HHH(aaa, bbb, ccc, ddd, eee, X[11], 12);
239  HHH(eee, aaa, bbb, ccc, ddd, X[8], 13);
240  HHH(ddd, eee, aaa, bbb, ccc, X[12], 5);
241  HHH(ccc, ddd, eee, aaa, bbb, X[2], 14);
242  HHH(bbb, ccc, ddd, eee, aaa, X[10], 13);
243  HHH(aaa, bbb, ccc, ddd, eee, X[0], 13);
244  HHH(eee, aaa, bbb, ccc, ddd, X[4], 7);
245  HHH(ddd, eee, aaa, bbb, ccc, X[13], 5);
246 
247  /* parallel round 4 */
248  GGG(ccc, ddd, eee, aaa, bbb, X[8], 15);
249  GGG(bbb, ccc, ddd, eee, aaa, X[6], 5);
250  GGG(aaa, bbb, ccc, ddd, eee, X[4], 8);
251  GGG(eee, aaa, bbb, ccc, ddd, X[1], 11);
252  GGG(ddd, eee, aaa, bbb, ccc, X[3], 14);
253  GGG(ccc, ddd, eee, aaa, bbb, X[11], 14);
254  GGG(bbb, ccc, ddd, eee, aaa, X[15], 6);
255  GGG(aaa, bbb, ccc, ddd, eee, X[0], 14);
256  GGG(eee, aaa, bbb, ccc, ddd, X[5], 6);
257  GGG(ddd, eee, aaa, bbb, ccc, X[12], 9);
258  GGG(ccc, ddd, eee, aaa, bbb, X[2], 12);
259  GGG(bbb, ccc, ddd, eee, aaa, X[13], 9);
260  GGG(aaa, bbb, ccc, ddd, eee, X[9], 12);
261  GGG(eee, aaa, bbb, ccc, ddd, X[7], 5);
262  GGG(ddd, eee, aaa, bbb, ccc, X[10], 15);
263  GGG(ccc, ddd, eee, aaa, bbb, X[14], 8);
264 
265  /* parallel round 5 */
266  FFF(bbb, ccc, ddd, eee, aaa, X[12], 8);
267  FFF(aaa, bbb, ccc, ddd, eee, X[15], 5);
268  FFF(eee, aaa, bbb, ccc, ddd, X[10], 12);
269  FFF(ddd, eee, aaa, bbb, ccc, X[4], 9);
270  FFF(ccc, ddd, eee, aaa, bbb, X[1], 12);
271  FFF(bbb, ccc, ddd, eee, aaa, X[5], 5);
272  FFF(aaa, bbb, ccc, ddd, eee, X[8], 14);
273  FFF(eee, aaa, bbb, ccc, ddd, X[7], 6);
274  FFF(ddd, eee, aaa, bbb, ccc, X[6], 8);
275  FFF(ccc, ddd, eee, aaa, bbb, X[2], 13);
276  FFF(bbb, ccc, ddd, eee, aaa, X[13], 6);
277  FFF(aaa, bbb, ccc, ddd, eee, X[14], 5);
278  FFF(eee, aaa, bbb, ccc, ddd, X[0], 15);
279  FFF(ddd, eee, aaa, bbb, ccc, X[3], 13);
280  FFF(ccc, ddd, eee, aaa, bbb, X[9], 11);
281  FFF(bbb, ccc, ddd, eee, aaa, X[11], 11);
282 
283  /* combine results */
284  ddd += cc + MDbuf[1];
285  MDbuf[1] = MDbuf[2] + dd + eee;
286  MDbuf[2] = MDbuf[3] + ee + aaa;
287  MDbuf[3] = MDbuf[4] + aa + bbb;
288  MDbuf[4] = MDbuf[0] + bb + ccc;
289  MDbuf[0] = ddd;
290 }
#define GGG(a, b, c, d, e, x, s)
Definition: ripemd160.c:73
#define FFF(a, b, c, d, e, x, s)
Definition: ripemd160.c:67
#define GG(a, b, c, d, e, x, s)
Definition: ripemd160.c:43
#define FF(a, b, c, d, e, x, s)
Definition: ripemd160.c:37
#define II(a, b, c, d, e, x, s)
Definition: ripemd160.c:55
#define HHH(a, b, c, d, e, x, s)
Definition: ripemd160.c:79
#define JJJ(a, b, c, d, e, x, s)
Definition: ripemd160.c:91
#define JJ(a, b, c, d, e, x, s)
Definition: ripemd160.c:61
#define III(a, b, c, d, e, x, s)
Definition: ripemd160.c:85
#define HH(a, b, c, d, e, x, s)
Definition: ripemd160.c:49
void ripemd160 ( const uint8_t *  msg,
uint32_t  msg_len,
uint8_t *  hash 
)

Copyright (c) 2013-2014 Tomas Dzetkulic Copyright (c) 2013-2014 Pavol Rusnak

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition at line 292 of file ripemd160.c.

References compress().

Referenced by btc_hdnode_private_ckd(), btc_hdnode_public_ckd(), and btc_pubkey_get_hash160().

293 {
294  uint32_t i;
295  int j;
296  uint32_t digest[5] = {0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0UL};
297 
298  for (i = 0; i < (msg_len >> 6); ++i) {
299  uint32_t chunk[16];
300 
301  for (j = 0; j < 16; ++j) {
302  chunk[j] = (uint32_t)(*(msg++));
303  chunk[j] |= (uint32_t)(*(msg++)) << 8;
304  chunk[j] |= (uint32_t)(*(msg++)) << 16;
305  chunk[j] |= (uint32_t)(*(msg++)) << 24;
306  }
307 
308  compress(digest, chunk);
309  }
310 
311  // Last chunk
312  {
313  uint32_t chunk[16] = {0};
314 
315  for (i = 0; i < (msg_len & 63); ++i) {
316  chunk[i >> 2] ^= (uint32_t)*msg++ << ((i & 3) << 3);
317  }
318 
319  chunk[(msg_len >> 2) & 15] ^= (uint32_t)1 << (8 * (msg_len & 3) + 7);
320 
321  if ((msg_len & 63) > 55) {
322  compress(digest, chunk);
323  memset(chunk, 0, 64);
324  }
325 
326  chunk[14] = msg_len << 3;
327  chunk[15] = (msg_len >> 29);
328  compress(digest, chunk);
329  }
330 
331  for (i = 0; i < 5; ++i) {
332  *(hash++) = digest[i];
333  *(hash++) = digest[i] >> 8;
334  *(hash++) = digest[i] >> 16;
335  *(hash++) = digest[i] >> 24;
336  }
337 }
static void compress(uint32_t *MDbuf, uint32_t *X)
Definition: ripemd160.c:98