Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 61) sorted by relevance

123

/crypto/
Dtwofish_common.c468 #define CALC_S(a, b, c, d, i, w, x, y, z) \ argument
469 if (key[i]) { \
470 tmp = poly_to_exp[key[i] - 1]; \
483 #define CALC_SB_2(i, a, b) \ argument
484 ctx->s[0][i] = mds[0][q0[(a) ^ sa] ^ se]; \
485 ctx->s[1][i] = mds[1][q0[(b) ^ sb] ^ sf]; \
486 ctx->s[2][i] = mds[2][q1[(a) ^ sc] ^ sg]; \
487 ctx->s[3][i] = mds[3][q1[(b) ^ sd] ^ sh]
491 #define CALC_SB192_2(i, a, b) \ argument
492 ctx->s[0][i] = mds[0][q0[q0[(b) ^ sa] ^ se] ^ si]; \
[all …]
Danubis.c467 int N, R, i, r; in anubis_setkey() local
484 for (i = 0; i < N; i++) in anubis_setkey()
485 kappa[i] = be32_to_cpu(key[i]); in anubis_setkey()
499 for (i = N - 2; i >= 0; i--) { in anubis_setkey()
500 K0 = T4[(kappa[i] >> 24) ] ^ in anubis_setkey()
505 K1 = T4[(kappa[i] >> 16) & 0xff] ^ in anubis_setkey()
510 K2 = T4[(kappa[i] >> 8) & 0xff] ^ in anubis_setkey()
515 K3 = T4[(kappa[i] ) & 0xff] ^ in anubis_setkey()
532 for (i = 0; i < N; i++) { in anubis_setkey()
533 int j = i; in anubis_setkey()
[all …]
Dgf128mul.c115 #define xda_be(i) ( \ argument
116 (i & 0x80 ? 0x4380 : 0) ^ (i & 0x40 ? 0x21c0 : 0) ^ \
117 (i & 0x20 ? 0x10e0 : 0) ^ (i & 0x10 ? 0x0870 : 0) ^ \
118 (i & 0x08 ? 0x0438 : 0) ^ (i & 0x04 ? 0x021c : 0) ^ \
119 (i & 0x02 ? 0x010e : 0) ^ (i & 0x01 ? 0x0087 : 0) \
122 #define xda_le(i) ( \ argument
123 (i & 0x80 ? 0xe100 : 0) ^ (i & 0x40 ? 0x7080 : 0) ^ \
124 (i & 0x20 ? 0x3840 : 0) ^ (i & 0x10 ? 0x1c20 : 0) ^ \
125 (i & 0x08 ? 0x0e10 : 0) ^ (i & 0x04 ? 0x0708 : 0) ^ \
126 (i & 0x02 ? 0x0384 : 0) ^ (i & 0x01 ? 0x01c2 : 0) \
[all …]
Dvmac.c151 int i; u64 th, tl; \
153 for (i = 0; i < nw; i += 2) { \
154 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \
155 pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \
162 int i; u64 th, tl; \
164 for (i = 0; i < nw; i += 2) { \
165 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i], \
166 pe64_to_cpup((mp)+i+1)+(kp)[i+1]); \
168 MUL64(th, tl, pe64_to_cpup((mp)+i)+(kp)[i+2], \
169 pe64_to_cpup((mp)+i+1)+(kp)[i+3]); \
[all …]
Dtcrypt.c88 int i; in testmgr_alloc_buf() local
90 for (i = 0; i < XBUFSIZE; i++) { in testmgr_alloc_buf()
91 buf[i] = (void *)__get_free_page(GFP_KERNEL); in testmgr_alloc_buf()
92 if (!buf[i]) in testmgr_alloc_buf()
99 while (i-- > 0) in testmgr_alloc_buf()
100 free_page((unsigned long)buf[i]); in testmgr_alloc_buf()
107 int i; in testmgr_free_buf() local
109 for (i = 0; i < XBUFSIZE; i++) in testmgr_free_buf()
110 free_page((unsigned long)buf[i]); in testmgr_free_buf()
160 int i, err = 0; in do_mult_aead_op() local
[all …]
Dblowfish_common.c349 short i, j, count; in blowfish_setkey() local
353 for (i = 0, count = 0; i < 256; i++) in blowfish_setkey()
358 for (i = 0; i < 16 + 2; i++) in blowfish_setkey()
359 P[i] = bf_pbox[i]; in blowfish_setkey()
362 for (j = 0, i = 0; i < 16 + 2; i++) { in blowfish_setkey()
368 P[i] = P[i] ^ temp; in blowfish_setkey()
375 for (i = 0; i < 16 + 2; i += 2) { in blowfish_setkey()
378 P[i] = data[0]; in blowfish_setkey()
379 P[i + 1] = data[1]; in blowfish_setkey()
382 for (i = 0; i < 4; i++) { in blowfish_setkey()
[all …]
Dsm3_generic.c56 int i; in sm3_expand() local
60 for (i = 0; i <= 15; i++) in sm3_expand()
61 w[i] = get_unaligned_be32((__u32 *)t + i); in sm3_expand()
63 for (i = 16; i <= 67; i++) { in sm3_expand()
64 tmp = w[i - 16] ^ w[i - 9] ^ rol32(w[i - 3], 15); in sm3_expand()
65 w[i] = p1(tmp) ^ (rol32(w[i - 13], 7)) ^ w[i - 6]; in sm3_expand()
68 for (i = 0; i <= 63; i++) in sm3_expand()
69 wt[i] = w[i] ^ w[i + 4]; in sm3_expand()
79 int i; in sm3_compress() local
90 for (i = 0; i <= 63; i++) { in sm3_compress()
[all …]
Dfips140_gen_hmac.c37 int i; in find_symtab_section() local
39 for (i = 0; i < num_shdr; i++) in find_symtab_section()
40 if (shdr[i].sh_type == SHT_SYMTAB) in find_symtab_section()
41 return &shdr[i]; in find_symtab_section()
47 int i; in get_section_idx() local
49 for (i = 0; i < num_shdr; i++) in get_section_idx()
50 if (!strcmp(shstrtab + shdr[i].sh_name, name)) in get_section_idx()
51 return i; in get_section_idx()
57 int i; in get_sym_idx() local
59 for (i = 0; i < num_syms; i++) in get_sym_idx()
[all …]
Dfips140-alg-registration.c308 int i; in fips140_crypto_register_algs() local
311 for (i = 0; i < count; i++) { in fips140_crypto_register_algs()
312 err = fips140_prepare_alg(&algs[i]); in fips140_crypto_register_algs()
322 int i; in fips140_crypto_register_aeads() local
325 for (i = 0; i < count; i++) { in fips140_crypto_register_aeads()
326 err = fips140_prepare_aead_alg(&algs[i]); in fips140_crypto_register_aeads()
336 int i; in fips140_crypto_register_ahashes() local
339 for (i = 0; i < count; i++) { in fips140_crypto_register_ahashes()
340 err = fips140_prepare_ahash_alg(&algs[i]); in fips140_crypto_register_ahashes()
350 int i; in fips140_crypto_register_rngs() local
[all …]
Dblake2b_generic.c46 #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()
Decc.c122 int i; in vli_clear() local
124 for (i = 0; i < ndigits; i++) in vli_clear()
125 vli[i] = 0; in vli_clear()
131 int i; in vli_is_zero() local
133 for (i = 0; i < ndigits; i++) { in vli_is_zero()
134 if (vli[i]) in vli_is_zero()
156 int i; in vli_num_digits() local
162 for (i = ndigits - 1; i >= 0 && vli[i] == 0; i--); in vli_num_digits()
164 return (i + 1); in vli_num_digits()
170 unsigned int i, num_digits; in vli_num_bits() local
[all …]
Dstreebog_generic.c870 int i; in streebog_xlps() local
881 for (i = 0; i <= 7; i++) { in streebog_xlps()
882 data->qword[i] = cpu_to_le64(Ax[0][r0 & 0xFF]); in streebog_xlps()
883 data->qword[i] ^= cpu_to_le64(Ax[1][r1 & 0xFF]); in streebog_xlps()
884 data->qword[i] ^= cpu_to_le64(Ax[2][r2 & 0xFF]); in streebog_xlps()
885 data->qword[i] ^= cpu_to_le64(Ax[3][r3 & 0xFF]); in streebog_xlps()
886 data->qword[i] ^= cpu_to_le64(Ax[4][r4 & 0xFF]); in streebog_xlps()
887 data->qword[i] ^= cpu_to_le64(Ax[5][r5 & 0xFF]); in streebog_xlps()
888 data->qword[i] ^= cpu_to_le64(Ax[6][r6 & 0xFF]); in streebog_xlps()
889 data->qword[i] ^= cpu_to_le64(Ax[7][r7 & 0xFF]); in streebog_xlps()
[all …]
Dtestmgr.c170 int i; in __testmgr_alloc_buf() local
172 for (i = 0; i < XBUFSIZE; i++) { in __testmgr_alloc_buf()
173 buf[i] = (char *)__get_free_pages(GFP_KERNEL, order); in __testmgr_alloc_buf()
174 if (!buf[i]) in __testmgr_alloc_buf()
181 while (i-- > 0) in __testmgr_alloc_buf()
182 free_pages((unsigned long)buf[i], order); in __testmgr_alloc_buf()
194 int i; in __testmgr_free_buf() local
196 for (i = 0; i < XBUFSIZE; i++) in __testmgr_free_buf()
197 free_pages((unsigned long)buf[i], order); in __testmgr_free_buf()
463 unsigned int i; in valid_sg_divisions() local
[all …]
Dcast6_generic.c93 static inline void W(u32 *key, unsigned int i) in W() argument
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
[all …]
Dsha512_generic.c103 int i; in sha512_transform() local
111 for (i=0; i<80; i+=8) { in sha512_transform()
112 if (!(i & 8)) { in sha512_transform()
115 if (i < 16) { in sha512_transform()
118 LOAD_OP(i + j, W, input); in sha512_transform()
121 BLEND_OP(i + j, W); in sha512_transform()
126 t1 = h + e1(e) + Ch(e,f,g) + sha512_K[i ] + W[(i & 15)]; in sha512_transform()
128 t1 = g + e1(d) + Ch(d,e,f) + sha512_K[i+1] + W[(i & 15) + 1]; in sha512_transform()
130 t1 = f + e1(c) + Ch(c,d,e) + sha512_K[i+2] + W[(i & 15) + 2]; in sha512_transform()
132 t1 = e + e1(b) + Ch(b,c,d) + sha512_K[i+3] + W[(i & 15) + 3]; in sha512_transform()
[all …]
Dscompress.c71 int i; in crypto_scomp_free_scratches() local
73 for_each_possible_cpu(i) { in crypto_scomp_free_scratches()
74 scratch = per_cpu_ptr(&scomp_scratch, i); in crypto_scomp_free_scratches()
86 int i; in crypto_scomp_alloc_scratches() local
88 for_each_possible_cpu(i) { in crypto_scomp_alloc_scratches()
91 scratch = per_cpu_ptr(&scomp_scratch, i); in crypto_scomp_alloc_scratches()
93 mem = vmalloc_node(SCOMP_SCRATCH_SIZE, cpu_to_node(i)); in crypto_scomp_alloc_scratches()
97 mem = vmalloc_node(SCOMP_SCRATCH_SIZE, cpu_to_node(i)); in crypto_scomp_alloc_scratches()
283 int i, ret; in crypto_register_scomps() local
285 for (i = 0; i < count; i++) { in crypto_register_scomps()
[all …]
Dsimd.c233 int i; in simd_register_skciphers_compat() local
243 for (i = 0; i < count; i++) { in simd_register_skciphers_compat()
244 WARN_ON(strncmp(algs[i].base.cra_name, "__", 2)); in simd_register_skciphers_compat()
245 WARN_ON(strncmp(algs[i].base.cra_driver_name, "__", 2)); in simd_register_skciphers_compat()
246 algname = algs[i].base.cra_name + 2; in simd_register_skciphers_compat()
247 drvname = algs[i].base.cra_driver_name + 2; in simd_register_skciphers_compat()
248 basename = algs[i].base.cra_driver_name; in simd_register_skciphers_compat()
253 simd_algs[i] = simd; in simd_register_skciphers_compat()
266 int i; in simd_unregister_skciphers() local
270 for (i = 0; i < count; i++) { in simd_unregister_skciphers()
[all …]
Dacompress.c170 int i, ret; in crypto_register_acomps() local
172 for (i = 0; i < count; i++) { in crypto_register_acomps()
173 ret = crypto_register_acomp(&algs[i]); in crypto_register_acomps()
181 for (--i; i >= 0; --i) in crypto_register_acomps()
182 crypto_unregister_acomp(&algs[i]); in crypto_register_acomps()
190 int i; in crypto_unregister_acomps() local
192 for (i = count - 1; i >= 0; --i) in crypto_unregister_acomps()
193 crypto_unregister_acomp(&algs[i]); in crypto_unregister_acomps()
Drng.c200 int i, ret; in crypto_register_rngs() local
202 for (i = 0; i < count; i++) { in crypto_register_rngs()
203 ret = crypto_register_rng(algs + i); in crypto_register_rngs()
211 for (--i; i >= 0; --i) in crypto_register_rngs()
212 crypto_unregister_rng(algs + i); in crypto_register_rngs()
220 int i; in crypto_unregister_rngs() local
222 for (i = count - 1; i >= 0; --i) in crypto_unregister_rngs()
223 crypto_unregister_rng(algs + i); in crypto_unregister_rngs()
Dwp512.c783 int i, r; in wp512_process_buffer() local
790 for (i = 0; i < 8; i++) in wp512_process_buffer()
791 block[i] = be64_to_cpu(buffer[i]); in wp512_process_buffer()
991 int i; in wp512_init() local
996 for (i = 0; i < 8; i++) { in wp512_init()
997 wctx->hash[i] = 0L; in wp512_init()
1011 int i; in wp512_update() local
1019 for (i = 31, carry = 0; i >= 0 && (carry != 0 || value != 0ULL); i--) { in wp512_update()
1020 carry += bitLength[i] + ((u32)value & 0xff); in wp512_update()
1021 bitLength[i] = (u8)carry; in wp512_update()
[all …]
Djitterentropy.c345 unsigned int i = 0; in jent_loop_shuffle() local
359 for (i = 0; ((DATA_SIZE_BITS + bits - 1) / bits) > i; i++) { in jent_loop_shuffle()
399 unsigned int i; in jent_lfsr_time() local
415 for (i = 1; (DATA_SIZE_BITS) >= i; i++) { in jent_lfsr_time()
416 __u64 tmp = time << (DATA_SIZE_BITS - i); in jent_lfsr_time()
480 __u64 i = 0; in jent_memaccess() local
497 for (i = 0; i < (ec->memaccessloops + acc_loop_cnt); i++) { in jent_memaccess()
718 int i; in jent_entropy_init() local
756 for (i = 0; (TESTLOOPCOUNT + CLEARCACHE) > i; i++) { in jent_entropy_init()
790 if (i < CLEARCACHE) in jent_entropy_init()
/crypto/async_tx/
Draid6test.c37 int i; in makedata() local
39 for (i = 0; i < disks; i++) { in makedata()
40 prandom_bytes(page_address(data[i]), PAGE_SIZE); in makedata()
41 dataptrs[i] = data[i]; in makedata()
42 dataoffs[i] = 0; in makedata()
78 int i; in raid6_dual_recov() local
85 for (i = disks; i-- ; ) { in raid6_dual_recov()
86 if (i == faila || i == failb) in raid6_dual_recov()
88 blocks[count++] = ptrs[i]; in raid6_dual_recov()
127 static int test_disks(int i, int j, int disks) in test_disks() argument
[all …]
Dasync_pq.c111 int i; in do_sync_gen_syndrome() local
119 for (i = 0; i < disks; i++) { in do_sync_gen_syndrome()
120 if (blocks[i] == NULL) { in do_sync_gen_syndrome()
121 BUG_ON(i > disks - 3); /* P or Q can't be zero */ in do_sync_gen_syndrome()
122 srcs[i] = (void*)raid6_empty_zero_page; 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
[all …]
Dasync_xor.c104 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()
118 srcs[xor_src_cnt++] = page_address(src_list[i]) + in do_sync_xor_offs()
119 (src_offs ? src_offs[i] : offset); 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()
153 if (!is_dma_xor_aligned(device, src_offs[i], 0, len)) 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()
[all …]
Dasync_raid6_recov.c217 int good_srcs, good, i; in __2data_recov_5() local
221 for (i = 0; i < disks-2; i++) { in __2data_recov_5()
222 if (blocks[i] == NULL) in __2data_recov_5()
224 if (i == faila || i == failb) in __2data_recov_5()
226 good = i; in __2data_recov_5()
398 int non_zero_srcs, i; in async_raid6_2data_recov() local
415 for (i = 0; i < disks; i++) in async_raid6_2data_recov()
416 if (blocks[i] == NULL) in async_raid6_2data_recov()
417 ptrs[i] = (void *) raid6_empty_zero_page; in async_raid6_2data_recov()
419 ptrs[i] = page_address(blocks[i]) + offs[i]; in async_raid6_2data_recov()
[all …]

123