Lines Matching +full:- +full:10 +full:v
2 * Copyright 2016-2024 The OpenSSL Project Authors. All Rights Reserved.
33 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } ,
34 { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } ,
35 { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 } ,
36 { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 } ,
37 { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 } ,
38 { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 } ,
39 { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 } ,
40 { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 } ,
41 { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 } ,
42 { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0 } ,
43 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } ,
44 { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 }
50 S->f[0] = -1; in blake2b_set_lastblock()
60 S->h[i] = blake2b_IV[i]; in blake2b_init0()
71 S->outlen = P->digest_length; in blake2b_init_param()
78 S->h[i] ^= load64(p + sizeof(S->h[i]) * i); in blake2b_init_param()
85 P->digest_length = BLAKE2B_DIGEST_LENGTH; in ossl_blake2b_param_init()
86 P->key_length = 0; in ossl_blake2b_param_init()
87 P->fanout = 1; in ossl_blake2b_param_init()
88 P->depth = 1; in ossl_blake2b_param_init()
89 store32(P->leaf_length, 0); in ossl_blake2b_param_init()
90 store64(P->node_offset, 0); in ossl_blake2b_param_init()
91 P->node_depth = 0; in ossl_blake2b_param_init()
92 P->inner_length = 0; in ossl_blake2b_param_init()
93 memset(P->reserved, 0, sizeof(P->reserved)); in ossl_blake2b_param_init()
94 memset(P->salt, 0, sizeof(P->salt)); in ossl_blake2b_param_init()
95 memset(P->personal, 0, sizeof(P->personal)); in ossl_blake2b_param_init()
100 P->digest_length = outlen; in ossl_blake2b_param_set_digest_length()
105 P->key_length = keylen; in ossl_blake2b_param_set_key_length()
111 memcpy(P->personal, personal, len); in ossl_blake2b_param_set_personal()
112 memset(P->personal + len, 0, BLAKE2B_PERSONALBYTES - len); in ossl_blake2b_param_set_personal()
118 memcpy(P->salt, salt, len); in ossl_blake2b_param_set_salt()
119 memset(P->salt + len, 0, BLAKE2B_SALTBYTES - len); in ossl_blake2b_param_set_salt()
145 memcpy(block, key, P->key_length); in ossl_blake2b_init_key()
159 uint64_t v[16]; in blake2b_compress() local
185 v[i] = S->h[i]; in blake2b_compress()
194 S->t[0] += increment; in blake2b_compress()
195 S->t[1] += (S->t[0] < increment); in blake2b_compress()
197 v[8] = blake2b_IV[0]; in blake2b_compress()
198 v[9] = blake2b_IV[1]; in blake2b_compress()
199 v[10] = blake2b_IV[2]; in blake2b_compress()
200 v[11] = blake2b_IV[3]; in blake2b_compress()
201 v[12] = S->t[0] ^ blake2b_IV[4]; in blake2b_compress()
202 v[13] = S->t[1] ^ blake2b_IV[5]; in blake2b_compress()
203 v[14] = S->f[0] ^ blake2b_IV[6]; in blake2b_compress()
204 v[15] = S->f[1] ^ blake2b_IV[7]; in blake2b_compress()
218 G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \ in blake2b_compress()
219 G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \ in blake2b_compress()
220 G(r,2,v[ 2],v[ 6],v[10],v[14]); \ in blake2b_compress()
221 G(r,3,v[ 3],v[ 7],v[11],v[15]); \ in blake2b_compress()
222 G(r,4,v[ 0],v[ 5],v[10],v[15]); \ in blake2b_compress()
223 G(r,5,v[ 1],v[ 6],v[11],v[12]); \ in blake2b_compress()
224 G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \ in blake2b_compress()
225 G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \ in blake2b_compress()
243 ROUND(10); in blake2b_compress()
248 S->h[i] = v[i] ^= v[i + 8] ^ S->h[i]; in blake2b_compress()
253 len -= increment; in blake2b_compress()
264 * Intuitively one would expect intermediate buffer, c->buf, to in ossl_blake2b_update()
271 fill = sizeof(c->buf) - c->buflen; in ossl_blake2b_update()
273 if (c->buflen) { in ossl_blake2b_update()
274 memcpy(c->buf + c->buflen, in, fill); /* Fill buffer */ in ossl_blake2b_update()
275 blake2b_compress(c, c->buf, BLAKE2B_BLOCKBYTES); in ossl_blake2b_update()
276 c->buflen = 0; in ossl_blake2b_update()
278 datalen -= fill; in ossl_blake2b_update()
287 datalen -= stashlen; in ossl_blake2b_update()
296 memcpy(c->buf + c->buflen, in, datalen); in ossl_blake2b_update()
297 c->buflen += datalen; /* Be lazy, do not compress */ in ossl_blake2b_update()
310 int iter = (c->outlen + 7) / 8; in ossl_blake2b_final()
314 if ((c->outlen % sizeof(c->h[0])) == 0) in ossl_blake2b_final()
319 memset(c->buf + c->buflen, 0, sizeof(c->buf) - c->buflen); in ossl_blake2b_final()
320 blake2b_compress(c, c->buf, c->buflen); in ossl_blake2b_final()
324 store64(target + sizeof(c->h[i]) * i, c->h[i]); in ossl_blake2b_final()
327 memcpy(md, target, c->outlen); in ossl_blake2b_final()