Lines Matching +full:3 +full:rd
29 #define CR_ST_WORD(state, i) ((state).words[(3 - (i)) ^ 2])
182 static inline void crypto_sha1_3reg(uint64_t *rd, uint64_t *rn, in crypto_sha1_3reg() argument
186 union CRYPTO_STATE d = { .l = { rd[0], rd[1] } }; in crypto_sha1_3reg()
197 CR_ST_WORD(n, 0) = CR_ST_WORD(d, 3); in crypto_sha1_3reg()
198 CR_ST_WORD(d, 3) = CR_ST_WORD(d, 2); in crypto_sha1_3reg()
203 rd[0] = d.l[0]; in crypto_sha1_3reg()
204 rd[1] = d.l[1]; in crypto_sha1_3reg()
206 clear_tail_16(rd, desc); in crypto_sha1_3reg()
211 return cho(CR_ST_WORD(*d, 1), CR_ST_WORD(*d, 2), CR_ST_WORD(*d, 3)); in do_sha1c()
221 return par(CR_ST_WORD(*d, 1), CR_ST_WORD(*d, 2), CR_ST_WORD(*d, 3)); in do_sha1p()
231 return maj(CR_ST_WORD(*d, 1), CR_ST_WORD(*d, 2), CR_ST_WORD(*d, 3)); in do_sha1m()
241 uint64_t *rd = vd; in HELPER() local
246 CR_ST_WORD(m, 1) = CR_ST_WORD(m, 2) = CR_ST_WORD(m, 3) = 0; in HELPER()
248 rd[0] = m.l[0]; in HELPER()
249 rd[1] = m.l[1]; in HELPER()
256 uint64_t *rd = vd; in HELPER() local
258 union CRYPTO_STATE d = { .l = { rd[0], rd[1] } }; in HELPER()
263 CR_ST_WORD(d, 2) = rol32(CR_ST_WORD(d, 2) ^ CR_ST_WORD(m, 3), 1); in HELPER()
264 CR_ST_WORD(d, 3) = rol32(CR_ST_WORD(d, 3) ^ CR_ST_WORD(d, 0), 1); in HELPER()
266 rd[0] = d.l[0]; in HELPER()
267 rd[1] = d.l[1]; in HELPER()
289 return ror32(x, 7) ^ ror32(x, 18) ^ (x >> 3); in s0()
299 uint64_t *rd = vd; in HELPER() local
302 union CRYPTO_STATE d = { .l = { rd[0], rd[1] } }; in HELPER()
309 + CR_ST_WORD(n, 3) + S1(CR_ST_WORD(n, 0)) in HELPER()
312 CR_ST_WORD(n, 3) = CR_ST_WORD(n, 2); in HELPER()
315 CR_ST_WORD(n, 0) = CR_ST_WORD(d, 3) + t; in HELPER()
320 CR_ST_WORD(d, 3) = CR_ST_WORD(d, 2); in HELPER()
326 rd[0] = d.l[0]; in HELPER()
327 rd[1] = d.l[1]; in HELPER()
334 uint64_t *rd = vd; in HELPER() local
337 union CRYPTO_STATE d = { .l = { rd[0], rd[1] } }; in HELPER()
344 + CR_ST_WORD(d, 3) + S1(CR_ST_WORD(d, 0)) in HELPER()
347 CR_ST_WORD(d, 3) = CR_ST_WORD(d, 2); in HELPER()
350 CR_ST_WORD(d, 0) = CR_ST_WORD(n, 3 - i) + t; in HELPER()
353 rd[0] = d.l[0]; in HELPER()
354 rd[1] = d.l[1]; in HELPER()
361 uint64_t *rd = vd; in HELPER() local
363 union CRYPTO_STATE d = { .l = { rd[0], rd[1] } }; in HELPER()
368 CR_ST_WORD(d, 2) += s0(CR_ST_WORD(d, 3)); in HELPER()
369 CR_ST_WORD(d, 3) += s0(CR_ST_WORD(m, 0)); in HELPER()
371 rd[0] = d.l[0]; in HELPER()
372 rd[1] = d.l[1]; in HELPER()
379 uint64_t *rd = vd; in HELPER() local
382 union CRYPTO_STATE d = { .l = { rd[0], rd[1] } }; in HELPER()
387 CR_ST_WORD(d, 1) += s1(CR_ST_WORD(m, 3)) + CR_ST_WORD(n, 2); in HELPER()
388 CR_ST_WORD(d, 2) += s1(CR_ST_WORD(d, 0)) + CR_ST_WORD(n, 3); in HELPER()
389 CR_ST_WORD(d, 3) += s1(CR_ST_WORD(d, 1)) + CR_ST_WORD(m, 0); in HELPER()
391 rd[0] = d.l[0]; in HELPER()
392 rd[1] = d.l[1]; in HELPER()
433 uint64_t *rd = vd; in HELPER() local
436 uint64_t d0 = rd[0]; in HELPER()
437 uint64_t d1 = rd[1]; in HELPER()
442 rd[0] = d0; in HELPER()
443 rd[1] = d1; in HELPER()
450 uint64_t *rd = vd; in HELPER() local
453 uint64_t d0 = rd[0]; in HELPER()
454 uint64_t d1 = rd[1]; in HELPER()
459 rd[0] = d0; in HELPER()
460 rd[1] = d1; in HELPER()
467 uint64_t *rd = vd; in HELPER() local
469 uint64_t d0 = rd[0]; in HELPER()
470 uint64_t d1 = rd[1]; in HELPER()
472 d0 += s0_512(rd[1]); in HELPER()
475 rd[0] = d0; in HELPER()
476 rd[1] = d1; in HELPER()
483 uint64_t *rd = vd; in HELPER() local
487 rd[0] += s1_512(rn[0]) + rm[0]; in HELPER()
488 rd[1] += s1_512(rn[1]) + rm[1]; in HELPER()
495 uint64_t *rd = vd; in HELPER() local
498 union CRYPTO_STATE d = { .l = { rd[0], rd[1] } }; in HELPER()
509 t = CR_ST_WORD(d, 2) ^ CR_ST_WORD(n, 2) ^ ror32(CR_ST_WORD(m, 3), 17); in HELPER()
512 t = CR_ST_WORD(d, 3) ^ CR_ST_WORD(n, 3) ^ ror32(CR_ST_WORD(d, 0), 17); in HELPER()
513 CR_ST_WORD(d, 3) = t ^ ror32(t, 17) ^ ror32(t, 9); in HELPER()
515 rd[0] = d.l[0]; in HELPER()
516 rd[1] = d.l[1]; in HELPER()
523 uint64_t *rd = vd; in HELPER() local
526 union CRYPTO_STATE d = { .l = { rd[0], rd[1] } }; in HELPER()
534 CR_ST_WORD(d, 3) ^= CR_ST_WORD(n, 3) ^ ror32(CR_ST_WORD(m, 3), 25) ^ in HELPER()
537 rd[0] = d.l[0]; in HELPER()
538 rd[1] = d.l[1]; in HELPER()
544 crypto_sm3tt(uint64_t *rd, uint64_t *rn, uint64_t *rm, in crypto_sm3tt() argument
547 union CRYPTO_STATE d = { .l = { rd[0], rd[1] } }; in crypto_sm3tt()
557 t = par(CR_ST_WORD(d, 3), CR_ST_WORD(d, 2), CR_ST_WORD(d, 1)); in crypto_sm3tt()
560 t = maj(CR_ST_WORD(d, 3), CR_ST_WORD(d, 2), CR_ST_WORD(d, 1)); in crypto_sm3tt()
561 } else if (opcode == 3) { in crypto_sm3tt()
563 t = cho(CR_ST_WORD(d, 3), CR_ST_WORD(d, 2), CR_ST_WORD(d, 1)); in crypto_sm3tt()
574 t += CR_ST_WORD(n, 3) ^ ror32(CR_ST_WORD(d, 3), 20); in crypto_sm3tt()
579 t += CR_ST_WORD(n, 3); in crypto_sm3tt()
585 CR_ST_WORD(d, 2) = CR_ST_WORD(d, 3); in crypto_sm3tt()
586 CR_ST_WORD(d, 3) = t; in crypto_sm3tt()
588 rd[0] = d.l[0]; in crypto_sm3tt()
589 rd[1] = d.l[1]; in crypto_sm3tt()
591 clear_tail_16(rd, desc); in crypto_sm3tt()
601 DO_SM3TT(crypto_sm3tt2b, 3)
605 static void do_crypto_sm4e(uint64_t *rd, uint64_t *rn, uint64_t *rm) in do_crypto_sm4e() argument
614 CR_ST_WORD(d, (i + 3) % 4) ^ in do_crypto_sm4e()
623 rd[0] = d.l[0]; in do_crypto_sm4e()
624 rd[1] = d.l[1]; in do_crypto_sm4e()
637 static void do_crypto_sm4ekey(uint64_t *rd, uint64_t *rn, uint64_t *rm) in do_crypto_sm4ekey() argument
648 CR_ST_WORD(d, (i + 3) % 4) ^ in do_crypto_sm4ekey()
656 rd[0] = d.l[0]; in do_crypto_sm4ekey()
657 rd[1] = d.l[1]; in do_crypto_sm4ekey()