| /crypto/ |
| A D | twofish_common.c | 648 for ( i = 0; i < 8; i += 2 ) { in __twofish_setkey() 649 CALC_K256 (w, i, q0[i], q1[i], q0[i+1], q1[i+1]); in __twofish_setkey() 651 for ( i = 0; i < 32; i += 2 ) { in __twofish_setkey() 652 CALC_K256 (k, i, q0[i+8], q1[i+8], q0[i+9], q1[i+9]); in __twofish_setkey() 661 for ( i = 0; i < 8; i += 2 ) { in __twofish_setkey() 662 CALC_K192 (w, i, q0[i], q1[i], q0[i+1], q1[i+1]); in __twofish_setkey() 664 for ( i = 0; i < 32; i += 2 ) { in __twofish_setkey() 665 CALC_K192 (k, i, q0[i+8], q1[i+8], q0[i+9], q1[i+9]); in __twofish_setkey() 674 for ( i = 0; i < 8; i += 2 ) { in __twofish_setkey() 675 CALC_K (w, i, q0[i], q1[i], q0[i+1], q1[i+1]); in __twofish_setkey() [all …]
|
| A D | anubis.c | 483 for (i = 0; i < N; i++) in anubis_setkey() 498 for (i = N - 2; i >= 0; i--) { in anubis_setkey() 531 for (i = 0; i < N; i++) { in anubis_setkey() 545 for (i = 1; i < N; i++) in anubis_setkey() 546 kappa[i] = inter[i]; in anubis_setkey() 553 for (i = 0; i < 4; i++) { in anubis_setkey() 554 ctx->D[0][i] = ctx->E[R][i]; in anubis_setkey() 555 ctx->D[R][i] = ctx->E[0][i]; in anubis_setkey() 558 for (i = 0; i < 4; i++) { in anubis_setkey() 582 for (i = 0; i < 4; i++) in anubis_crypt() [all …]
|
| A D | blowfish_common.c | 350 short i, j, count; in blowfish_setkey() local 354 for (i = 0, count = 0; i < 256; i++) in blowfish_setkey() 359 for (i = 0; i < 16 + 2; i++) in blowfish_setkey() 360 P[i] = bf_pbox[i]; in blowfish_setkey() 363 for (j = 0, i = 0; i < 16 + 2; i++) { in blowfish_setkey() 369 P[i] = P[i] ^ temp; in blowfish_setkey() 376 for (i = 0; i < 16 + 2; i += 2) { in blowfish_setkey() 379 P[i] = data[0]; in blowfish_setkey() 380 P[i + 1] = data[1]; in blowfish_setkey() 383 for (i = 0; i < 4; i++) { in blowfish_setkey() [all …]
|
| A D | sm4.c | 124 int i; in sm4_expandkey() local 134 for (i = 0; i < 32; i += 4) { in sm4_expandkey() 140 ctx->rkey_enc[i + 0] = rk[0]; in sm4_expandkey() 141 ctx->rkey_enc[i + 1] = rk[1]; in sm4_expandkey() 142 ctx->rkey_enc[i + 2] = rk[2]; in sm4_expandkey() 143 ctx->rkey_enc[i + 3] = rk[3]; in sm4_expandkey() 144 ctx->rkey_dec[31 - 0 - i] = rk[0]; in sm4_expandkey() 145 ctx->rkey_dec[31 - 1 - i] = rk[1]; in sm4_expandkey() 146 ctx->rkey_dec[31 - 2 - i] = rk[2]; in sm4_expandkey() 162 u32 x[4], i; in sm4_crypt_block() local [all …]
|
| A D | tcrypt.c | 82 for (i = 0; i < XBUFSIZE; i++) { in testmgr_alloc_buf() 101 for (i = 0; i < XBUFSIZE; i++) in testmgr_free_buf() 155 for (i = 0; i < num_mb; i++) { in do_mult_aead_op() 163 for (i = 0; i < num_mb; i++) { in do_mult_aead_op() 215 for (i = 0; i < 4; i++) { in test_mb_aead_cycles() 222 for (i = 0; i < 8; i++) { in test_mb_aead_cycles() 291 for (i = 0; i < num_mb; ++i) in test_mb_aead_speed() 298 for (i = 0; i < num_mb; ++i) in test_mb_aead_speed() 305 for (i = 0; i < num_mb; ++i) in test_mb_aead_speed() 483 for (i = 0; i < 4; i++) { in test_aead_cycles() [all …]
|
| A D | ecc.c | 150 for (i = 0; i < ndigits; i++) in vli_clear() 159 for (i = 0; i < ndigits; i++) { in vli_is_zero() 188 for (i = ndigits - 1; i >= 0 && vli[i] == 0; i--); in vli_num_digits() 217 for (i = 0; i < ndigits; i++) in vli_from_be64() 227 for (i = 0; i < ndigits; i++) in vli_from_le64() 237 for (i = 0; i < ndigits; i++) in vli_set() 266 for (i = 0; i < ndigits; i++) { in vli_lshift() 298 for (i = 0; i < ndigits; i++) { in vli_add() 433 for (i = min; i <= k && i < ndigits; i++) { in vli_mult() 487 for (i = min; i <= k && i <= k - i; i++) { in vli_square() [all …]
|
| A D | blake2b_generic.c | 46 #define G(r,i,a,b,c,d) \ argument 48 a = a + b + m[blake2b_sigma[r][2*i+0]]; \ 52 a = a + b + m[blake2b_sigma[r][2*i+1]]; \ 75 size_t i; in blake2b_compress_one_generic() local 77 for (i = 0; i < 16; ++i) in blake2b_compress_one_generic() 78 m[i] = get_unaligned_le64(block + i * sizeof(m[i])); in blake2b_compress_one_generic() 80 for (i = 0; i < 8; ++i) in blake2b_compress_one_generic() 81 v[i] = S->h[i]; in blake2b_compress_one_generic() 107 for (i = 0; i < 8; ++i) in blake2b_compress_one_generic() 108 S->h[i] = S->h[i] ^ v[i] ^ v[i + 8]; in blake2b_compress_one_generic()
|
| A D | streebog_generic.c | 871 int i; in streebog_xlps() local 882 for (i = 0; i <= 7; i++) { in streebog_xlps() 905 streebog_xlps(Ki, &C[i], Ki); in streebog_round() 913 unsigned int i; in streebog_init() local 916 for (i = 0; i < 8; i++) { in streebog_init() 928 int i; in streebog_add512() local 930 for (i = 0; i < 8; i++) { in streebog_add512() 937 r->qword[i] = cpu_to_le64(sum); in streebog_add512() 946 unsigned int i; in streebog_g() local 954 for (i = 0; i < 11; i++) in streebog_g() [all …]
|
| A D | crypto_engine.c | 523 int i, ret; in crypto_engine_register_aeads() local 525 for (i = 0; i < count; i++) { in crypto_engine_register_aeads() 542 int i; in crypto_engine_unregister_aeads() local 544 for (i = count - 1; i >= 0; --i) in crypto_engine_unregister_aeads() 565 int i, ret; in crypto_engine_register_ahashes() local 567 for (i = 0; i < count; i++) { in crypto_engine_register_ahashes() 585 int i; in crypto_engine_unregister_ahashes() local 587 for (i = count - 1; i >= 0; --i) in crypto_engine_unregister_ahashes() 639 for (i = 0; i < count; i++) { in crypto_engine_register_skciphers() 657 int i; in crypto_engine_unregister_skciphers() local [all …]
|
| A D | simd.c | 211 int i; in simd_register_skciphers_compat() local 221 for (i = 0; i < count; i++) { in simd_register_skciphers_compat() 231 simd_algs[i] = simd; in simd_register_skciphers_compat() 244 int i; in simd_unregister_skciphers() local 248 for (i = 0; i < count; i++) { in simd_unregister_skciphers() 249 if (simd_algs[i]) { in simd_unregister_skciphers() 434 int i; in simd_register_aeads_compat() local 444 for (i = 0; i < count; i++) { in simd_register_aeads_compat() 467 int i; in simd_unregister_aeads() local 471 for (i = 0; i < count; i++) { in simd_unregister_aeads() [all …]
|
| A D | cast6_generic.c | 96 key[6] ^= F1(key[7], Tr[i % 4][0], Tm[i][0]); in W() 97 key[5] ^= F2(key[6], Tr[i % 4][1], Tm[i][1]); in W() 98 key[4] ^= F3(key[5], Tr[i % 4][2], Tm[i][2]); in W() 99 key[3] ^= F1(key[4], Tr[i % 4][3], Tm[i][3]); in W() 100 key[2] ^= F2(key[3], Tr[i % 4][4], Tm[i][4]); in W() 101 key[1] ^= F3(key[2], Tr[i % 4][5], Tm[i][5]); in W() 102 key[0] ^= F1(key[1], Tr[i % 4][6], Tm[i][6]); in W() 103 key[7] ^= F2(key[0], Tr[i % 4][7], Tm[i][7]); in W() 108 int i; in __cast6_setkey() local 127 for (i = 0; i < 12; i++) { in __cast6_setkey() [all …]
|
| A D | testmgr.c | 176 for (i = 0; i < XBUFSIZE; i++) { in __testmgr_alloc_buf() 200 for (i = 0; i < XBUFSIZE; i++) in __testmgr_free_buf() 612 for (i = 0; i < ndivs; i++) { in build_test_sglist() 634 for (i = 0; i < tsgl->nents; i++) { in build_test_sglist() 964 for (i = 0; i < num_flips; i++) in mutate_buffer() 971 for (i = 0; i < num_flips; i++) in mutate_buffer() 2442 for (i = 0; i < 10; i++) { in try_to_generate_inauthentic_testvec() 2741 for (i = 0; i < tcount; i++) { in test_cipher() 3463 for (i = 0; i < tcount; i++) { in test_cprng() 3658 for (i = 0; i < tcount; i++) { in alg_test_drbg() [all …]
|
| A D | aria_generic.c | 152 int i; in aria_set_decrypt_key() local 154 for (i = 0; i < 4; i++) { in aria_set_decrypt_key() 155 ctx->dec_key[0][i] = ctx->enc_key[ctx->rounds][i]; in aria_set_decrypt_key() 156 ctx->dec_key[ctx->rounds][i] = ctx->enc_key[0][i]; in aria_set_decrypt_key() 159 for (i = 1; i < ctx->rounds; i++) { in aria_set_decrypt_key() 160 ctx->dec_key[i][0] = aria_m(ctx->enc_key[ctx->rounds - i][0]); in aria_set_decrypt_key() 165 aria_diff_word(&ctx->dec_key[i][0], &ctx->dec_key[i][1], in aria_set_decrypt_key() 166 &ctx->dec_key[i][2], &ctx->dec_key[i][3]); in aria_set_decrypt_key() 168 &ctx->dec_key[i][2], &ctx->dec_key[i][3]); in aria_set_decrypt_key() 169 aria_diff_word(&ctx->dec_key[i][0], &ctx->dec_key[i][1], in aria_set_decrypt_key() [all …]
|
| A D | hkdf.c | 90 for (i = 0; i < okmlen; i += hashlen) { in hkdf_expand() 108 if (okmlen - i < hashlen) { in hkdf_expand() 112 memcpy(&okm[i], tmp, okmlen - i); in hkdf_expand() 115 err = crypto_shash_finup(desc, &counter, 1, &okm[i]); in hkdf_expand() 120 prev = &okm[i]; in hkdf_expand() 544 int ret = 0, i; in crypto_hkdf_module_init() local 549 for (i = 0; i < ARRAY_SIZE(hkdf_sha256_tv); i++) { in crypto_hkdf_module_init() 550 ret = hkdf_test("hmac(sha256)", &hkdf_sha256_tv[i]); in crypto_hkdf_module_init() 554 for (i = 0; i < ARRAY_SIZE(hkdf_sha384_tv); i++) { in crypto_hkdf_module_init() 555 ret = hkdf_test("hmac(sha384)", &hkdf_sha384_tv[i]); in crypto_hkdf_module_init() [all …]
|
| A D | rng.c | 194 int i, ret; in crypto_register_rngs() local 196 for (i = 0; i < count; i++) { in crypto_register_rngs() 197 ret = crypto_register_rng(algs + i); in crypto_register_rngs() 205 for (--i; i >= 0; --i) in crypto_register_rngs() 206 crypto_unregister_rng(algs + i); in crypto_register_rngs() 214 int i; in crypto_unregister_rngs() local 216 for (i = count - 1; i >= 0; --i) in crypto_unregister_rngs() 217 crypto_unregister_rng(algs + i); in crypto_unregister_rngs()
|
| A D | scompress.c | 72 int i; in crypto_scomp_free_scratches() local 74 for_each_possible_cpu(i) { in crypto_scomp_free_scratches() 118 scratch = per_cpu_ptr(&scomp_scratch, i); in crypto_scomp_alloc_scratches() 119 return scomp_alloc_scratch(scratch, i); in crypto_scomp_alloc_scratches() 382 int i, ret; in crypto_register_scomps() local 384 for (i = 0; i < count; i++) { in crypto_register_scomps() 393 for (--i; i >= 0; --i) in crypto_register_scomps() 394 crypto_unregister_scomp(&algs[i]); in crypto_register_scomps() 402 int i; in crypto_unregister_scomps() local 404 for (i = count - 1; i >= 0; --i) in crypto_unregister_scomps() [all …]
|
| A D | wp512.c | 781 int i, r; in wp512_process_buffer() local 787 for (i = 0; i < 8; i++) in wp512_process_buffer() 788 block[i] = get_unaligned_be64(buffer + i * 8); in wp512_process_buffer() 988 int i; in wp512_init() local 991 for (i = 0; i < 8; i++) { in wp512_init() 992 wctx->hash[i] = 0L; in wp512_init() 1001 int i; in wp512_add_length() local 1003 for (i = 31, carry = 0; i >= 0 && (carry != 0 || value != 0ULL); i--) { in wp512_add_length() 1033 int i; in wp512_finup() local 1056 for (i = 0; i < WP512_DIGEST_SIZE/8; i++) in wp512_finup() [all …]
|
| A D | ansi_cprng.c | 71 int i; in xor_vectors() local 73 for (i = 0; i < size; i++) in xor_vectors() 74 out[i] = in1[i] ^ in2[i]; in xor_vectors() 83 int i; in _get_more_prng_bytes() local 98 for (i = 0; i < 3; i++) { in _get_more_prng_bytes() 100 switch (i) { in _get_more_prng_bytes() 163 for (i = DEFAULT_BLK_SZ - 1; i >= 0; i--) { in _get_more_prng_bytes() 164 ctx->DT[i] += 1; in _get_more_prng_bytes() 165 if (ctx->DT[i] != 0) in _get_more_prng_bytes()
|
| A D | sha3_generic.c | 178 int i; in crypto_sha3_update() local 180 for (i = 0; i < rsizw; i++) in crypto_sha3_update() 181 sctx->st[i] ^= get_unaligned_le64(data + 8 * i); in crypto_sha3_update() 200 int i; in crypto_sha3_finup() local 206 for (i = 0; i < rsizw; i++) in crypto_sha3_finup() 207 sctx->st[i] ^= le64_to_cpu(block[i]); in crypto_sha3_finup() 212 for (i = 0; i < digest_size / 8; i++) in crypto_sha3_finup() 213 put_unaligned_le64(sctx->st[i], digest++); in crypto_sha3_finup() 216 put_unaligned_le32(sctx->st[i], (__le32 *)digest); in crypto_sha3_finup()
|
| A D | aead.c | 252 int i, ret; in crypto_register_aeads() local 254 for (i = 0; i < count; i++) { in crypto_register_aeads() 255 ret = crypto_register_aead(&algs[i]); in crypto_register_aeads() 263 for (--i; i >= 0; --i) in crypto_register_aeads() 264 crypto_unregister_aead(&algs[i]); in crypto_register_aeads() 272 int i; in crypto_unregister_aeads() local 274 for (i = count - 1; i >= 0; --i) in crypto_unregister_aeads() 275 crypto_unregister_aead(&algs[i]); in crypto_unregister_aeads()
|
| A D | camellia_generic.c | 854 SUBKEY_L(i + 2), SUBKEY_R(i + 2), \ in camellia_do_encrypt() 857 SUBKEY_L(i + 3), SUBKEY_R(i + 3), \ in camellia_do_encrypt() 860 SUBKEY_L(i + 4), SUBKEY_R(i + 4), \ in camellia_do_encrypt() 863 SUBKEY_L(i + 5), SUBKEY_R(i + 5), \ in camellia_do_encrypt() 866 SUBKEY_L(i + 6), SUBKEY_R(i + 6), \ in camellia_do_encrypt() 869 SUBKEY_L(i + 7), SUBKEY_R(i + 7), \ in camellia_do_encrypt() 909 SUBKEY_L(i + 7), SUBKEY_R(i + 7), \ in camellia_do_decrypt() 912 SUBKEY_L(i + 6), SUBKEY_R(i + 6), \ in camellia_do_decrypt() 915 SUBKEY_L(i + 5), SUBKEY_R(i + 5), \ in camellia_do_decrypt() 918 SUBKEY_L(i + 4), SUBKEY_R(i + 4), \ in camellia_do_decrypt() [all …]
|
| /crypto/async_tx/ |
| A D | raid6test.c | 37 int i; in makedata() local 39 for (i = 0; i < disks; i++) { in makedata() 41 dataptrs[i] = data[i]; in makedata() 85 for (i = disks; i-- ; ) { in raid6_dual_recov() 86 if (i == faila || i == failb) in raid6_dual_recov() 143 __func__, i, j, i, disk_type(i, disks), j, disk_type(j, disks), in test_disks() 146 dataptrs[i] = data[i]; in test_disks() 182 for (i = 0; i < disks-1; i++) in test() 196 int i; in raid6_test() local 198 for (i = 0; i < NDISKS+3; i++) { in raid6_test() [all …]
|
| A D | async_xor.c | 104 int i; in do_sync_xor_offs() local 116 for (i = 0; i < src_cnt; i++) in do_sync_xor_offs() 117 if (src_list[i]) in do_sync_xor_offs() 144 int i; in dma_xor_aligned_offsets() local 152 for (i = 0; i < src_cnt; i++) { in dma_xor_aligned_offsets() 200 int i, j; in async_xor_offs() local 206 for (i = 0, j = 0; i < src_cnt; i++) { in async_xor_offs() 207 if (!src_list[i]) in async_xor_offs() 333 int i; in async_xor_val_offs() local 342 for (i = 0; i < src_cnt; i++) { in async_xor_val_offs() [all …]
|
| A D | async_pq.c | 111 int i; in do_sync_gen_syndrome() local 119 for (i = 0; i < disks; i++) { in do_sync_gen_syndrome() 124 srcs[i] = page_address(blocks[i]) + offsets[i]; in do_sync_gen_syndrome() 126 if (i < disks - 2) { in do_sync_gen_syndrome() 127 stop = i; in do_sync_gen_syndrome() 129 start = i; in do_sync_gen_syndrome() 146 int i; in is_dma_pq_aligned_offs() local 148 for (i = 0; i < src_cnt; i++) { in is_dma_pq_aligned_offs() 200 int i, j; in async_gen_syndrome() local 210 for (i = 0, j = 0; i < src_cnt; i++) { in async_gen_syndrome() [all …]
|
| A D | async_raid6_recov.c | 221 for (i = 0; i < disks-2; i++) { in __2data_recov_5() 224 if (i == faila || i == failb) in __2data_recov_5() 226 good = i; in __2data_recov_5() 415 for (i = 0; i < disks; i++) in async_raid6_2data_recov() 419 ptrs[i] = page_address(blocks[i]) + offs[i]; in async_raid6_2data_recov() 429 for (i = 0; i < disks-2 && non_zero_srcs < 4; i++) in async_raid6_2data_recov() 430 if (blocks[i]) in async_raid6_2data_recov() 498 for (i = 0; i < disks; i++) in async_raid6_datap_recov() 502 ptrs[i] = page_address(blocks[i]) + offs[i]; in async_raid6_datap_recov() 513 for (i = 0; i < disks-2; i++) { in async_raid6_datap_recov() [all …]
|