/crypto/ |
D | serpent_generic.c | 30 ({ b ^= d; b ^= c; b ^= a; b ^= PHI ^ i; b = rol32(b, 11); k[j] = b; }) 33 ({ x0 = k[i]; x1 = k[i+1]; x2 = k[i+2]; x3 = k[i+3]; }) 36 ({ k[i] = x0; k[i+1] = x1; k[i+2] = x2; k[i+3] = x3; }) 42 x3 ^= k[4*(i)+3]; x2 ^= k[4*(i)+2]; \ 43 x1 ^= k[4*(i)+1]; x0 ^= k[4*(i)+0]; \ 53 x0 ^= x3; x2 ^= x4; x3 ^= k[4*i+3]; \ 54 x1 ^= k[4*i+1]; x0 = rol32(x0, 5); x2 = rol32(x2, 22);\ 55 x0 ^= k[4*i+0]; x2 ^= k[4*i+2]; \ 59 x0 ^= k[4*i+0]; x1 ^= k[4*i+1]; x2 ^= k[4*i+2]; \ 60 x3 ^= k[4*i+3]; x0 = ror32(x0, 5); x2 = ror32(x2, 22);\ [all …]
|
D | aes_generic.c | 1153 #define f_rn(bo, bi, n, k) do { \ argument 1157 crypto_ft_tab[3][byte(bi[(n + 3) & 3], 3)] ^ *(k + n); \ 1160 #define f_nround(bo, bi, k) do {\ argument 1161 f_rn(bo, bi, 0, k); \ 1162 f_rn(bo, bi, 1, k); \ 1163 f_rn(bo, bi, 2, k); \ 1164 f_rn(bo, bi, 3, k); \ 1165 k += 4; \ 1168 #define f_rl(bo, bi, n, k) do { \ argument 1172 crypto_fl_tab[3][byte(bi[(n + 3) & 3], 3)] ^ *(k + n); \ [all …]
|
D | fcrypt.c | 66 #define ror56_64(k, n) \ argument 68 k = (k >> n) | ((k & ((1 << n) - 1)) << (56 - n)); \ 311 u64 k; /* k holds all 56 non-parity bits */ in fcrypt_setkey() local 314 k = (*key++) >> 1; in fcrypt_setkey() 315 k <<= 7; in fcrypt_setkey() 316 k |= (*key++) >> 1; in fcrypt_setkey() 317 k <<= 7; in fcrypt_setkey() 318 k |= (*key++) >> 1; in fcrypt_setkey() 319 k <<= 7; in fcrypt_setkey() 320 k |= (*key++) >> 1; in fcrypt_setkey() [all …]
|
D | twofish_common.c | 535 #define CALC_K(a, j, k, l, m, n) \ argument 536 x = CALC_K_2 (k, l, k, l, 0); \ 548 #define CALC_K192(a, j, k, l, m, n) \ argument 549 x = CALC_K192_2 (l, l, k, k, 0); \ 561 #define CALC_K256(a, j, k, l, m, n) \ argument 562 x = CALC_K256_2 (k, l, 0); \ 572 int i, j, k; in __twofish_setkey() local 637 for ( i = j = 0, k = 1; i < 256; i++, j += 2, k += 2 ) { in __twofish_setkey() 638 CALC_SB256_2( i, calc_sb_tbl[j], calc_sb_tbl[k] ); in __twofish_setkey() 655 CALC_K256 (k, i, q0[i+8], q1[i+8], q0[i+9], q1[i+9]); in __twofish_setkey() [all …]
|
D | cast5_generic.c | 404 static void key_schedule(u32 *x, u32 *z, u32 *k) in key_schedule() argument 418 k[0] = s5[zi(8)] ^ s6[zi(9)] ^ s7[zi(7)] ^ sb8[zi(6)] ^ s5[zi(2)]; in key_schedule() 419 k[1] = s5[zi(10)] ^ s6[zi(11)] ^ s7[zi(5)] ^ sb8[zi(4)] ^ in key_schedule() 421 k[2] = s5[zi(12)] ^ s6[zi(13)] ^ s7[zi(3)] ^ sb8[zi(2)] ^ in key_schedule() 423 k[3] = s5[zi(14)] ^ s6[zi(15)] ^ s7[zi(1)] ^ sb8[zi(0)] ^ in key_schedule() 434 k[4] = s5[xi(3)] ^ s6[xi(2)] ^ s7[xi(12)] ^ sb8[xi(13)] ^ in key_schedule() 436 k[5] = s5[xi(1)] ^ s6[xi(0)] ^ s7[xi(14)] ^ sb8[xi(15)] ^ in key_schedule() 438 k[6] = s5[xi(7)] ^ s6[xi(6)] ^ s7[xi(8)] ^ sb8[xi(9)] ^ s7[xi(3)]; in key_schedule() 439 k[7] = s5[xi(5)] ^ s6[xi(4)] ^ s7[xi(10)] ^ sb8[xi(11)] ^ in key_schedule() 450 k[8] = s5[zi(3)] ^ s6[zi(2)] ^ s7[zi(12)] ^ sb8[zi(13)] ^ in key_schedule() [all …]
|
D | gf128mul.c | 263 int i, j, k; in gf128mul_init_64k_bbe() local 284 for (k = 1; k < j; ++k) in gf128mul_init_64k_bbe() 285 be128_xor(&t->t[i]->t[j + k], in gf128mul_init_64k_bbe() 286 &t->t[i]->t[j], &t->t[i]->t[k]); in gf128mul_init_64k_bbe() 344 int j, k; in gf128mul_init_4k_lle() local 355 for (k = 1; k < j; ++k) in gf128mul_init_4k_lle() 356 be128_xor(&t->t[j + k], &t->t[j], &t->t[k]); in gf128mul_init_4k_lle() 366 int j, k; in gf128mul_init_4k_bbe() local 377 for (k = 1; k < j; ++k) in gf128mul_init_4k_bbe() 378 be128_xor(&t->t[j + k], &t->t[j], &t->t[k]); in gf128mul_init_4k_bbe()
|
D | ghash-generic.c | 59 be128 k; in ghash_setkey() local 69 BUILD_BUG_ON(sizeof(k) != GHASH_BLOCK_SIZE); in ghash_setkey() 70 memcpy(&k, key, GHASH_BLOCK_SIZE); /* avoid violating alignment rules */ in ghash_setkey() 71 ctx->gf128 = gf128mul_init_4k_lle(&k); in ghash_setkey() 72 memzero_explicit(&k, GHASH_BLOCK_SIZE); in ghash_setkey()
|
D | ecc.c | 382 unsigned int i, k; in vli_mult() local 387 for (k = 0; k < ndigits * 2 - 1; k++) { in vli_mult() 390 if (k < ndigits) in vli_mult() 393 min = (k + 1) - ndigits; in vli_mult() 395 for (i = min; i <= k && i < ndigits; i++) { in vli_mult() 398 product = mul_64_64(left[i], right[k - i]); in vli_mult() 404 result[k] = r01.m_low; in vli_mult() 418 unsigned int k; in vli_umult() local 420 for (k = 0; k < ndigits; k++) { in vli_umult() 423 product = mul_64_64(left[k], right); in vli_umult() [all …]
|
D | twofish_generic.c | 55 x += y; y += x + ctx->k[2 * (n) + 1]; \ 56 (c) ^= x + ctx->k[2 * (n)]; \ 63 (d) ^= y + ctx->k[2 * (n) + 1]; \ 66 (c) ^= (x + ctx->k[2 * (n)])
|
D | tcrypt.c | 117 int k, rem; in sg_init_aead() local 132 for (k = 0; k < np; k++) in sg_init_aead() 133 sg_set_buf(&sg[k + 1], xbuf[k], PAGE_SIZE); in sg_init_aead() 136 sg_set_buf(&sg[k + 1], xbuf[k], rem); in sg_init_aead() 816 unsigned int i, j, k; in test_mb_ahash_speed() local 870 for (k = 0; k < num_mb; k++) in test_mb_ahash_speed() 871 ahash_request_set_crypt(data[k].req, data[k].sg, in test_mb_ahash_speed() 872 data[k].result, speed[i].blen); in test_mb_ahash_speed() 895 for (k = 0; k < num_mb; ++k) in test_mb_ahash_speed() 896 ahash_request_free(data[k].req); in test_mb_ahash_speed() [all …]
|
D | md4.c | 63 #define ROUND1(a,b,c,d,k,s) (a = lshift(a + F(b,c,d) + k, s)) argument 64 #define ROUND2(a,b,c,d,k,s) (a = lshift(a + G(b,c,d) + k + (u32)0x5A827999,s)) argument 65 #define ROUND3(a,b,c,d,k,s) (a = lshift(a + H(b,c,d) + k + (u32)0x6ED9EBA1,s)) argument
|
D | jitterentropy.c | 379 unsigned int k = 0; in jent_gen_entropy() local 393 if (++k >= (DATA_SIZE_BITS * ec->osr)) in jent_gen_entropy()
|
D | rmd256.c | 40 #define ROUND(a, b, c, d, f, k, x, s) { \ argument 41 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
|
D | rmd128.c | 40 #define ROUND(a, b, c, d, f, k, x, s) { \ argument 41 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
|
D | rmd160.c | 43 #define ROUND(a, b, c, d, e, f, k, x, s) { \ argument 44 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
|
D | rmd320.c | 43 #define ROUND(a, b, c, d, e, f, k, x, s) { \ argument 44 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
|
D | testmgr.c | 2352 unsigned int i, j, k; in test_cipher() local 2406 for (k = 0; k < template[i].len; in test_cipher() 2407 k += crypto_cipher_blocksize(tfm)) { in test_cipher() 2409 crypto_cipher_encrypt_one(tfm, data + k, in test_cipher() 2410 data + k); in test_cipher() 2412 crypto_cipher_decrypt_one(tfm, data + k, in test_cipher() 2413 data + k); in test_cipher()
|