/crypto/ |
D | memneq.c | 68 __crypto_memneq_generic(const void *a, const void *b, size_t size) in __crypto_memneq_generic() argument 74 neq |= *(unsigned long *)a ^ *(unsigned long *)b; in __crypto_memneq_generic() 76 b += sizeof(unsigned long); in __crypto_memneq_generic() 81 neq |= *(unsigned char *)a ^ *(unsigned char *)b; in __crypto_memneq_generic() 83 b += 1; in __crypto_memneq_generic() 90 static inline unsigned long __crypto_memneq_16(const void *a, const void *b) in __crypto_memneq_16() argument 94 return ((*(unsigned long *)(a) ^ *(unsigned long *)(b)) in __crypto_memneq_16() 95 | (*(unsigned long *)(a+8) ^ *(unsigned long *)(b+8))); in __crypto_memneq_16() 97 return ((*(unsigned int *)(a) ^ *(unsigned int *)(b)) in __crypto_memneq_16() 98 | (*(unsigned int *)(a+4) ^ *(unsigned int *)(b+4)) in __crypto_memneq_16() [all …]
|
D | des_generic.c | 617 #define DES_PC2(a, b, c, d) (T4(d) | T3(c) | T2(b) | T1(a)) argument 634 unsigned long a, b, c, d, w; in des_ekey() local 639 b = k[6]; b &= 0x0e; b <<= 4; b |= k[2] & 0x1e; b = pc1[b]; in des_ekey() 642 pe[15 * 2 + 0] = DES_PC2(a, b, c, d); d = rs[d]; in des_ekey() 643 pe[14 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey() 644 pe[13 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey() 645 pe[12 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey() 646 pe[11 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey() 647 pe[10 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey() 648 pe[ 9 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey() [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 86 u32 a, b, c, d; in md4_transform() local 89 b = hash[1]; in md4_transform() 93 ROUND1(a, b, c, d, in[0], 3); in md4_transform() 94 ROUND1(d, a, b, c, in[1], 7); in md4_transform() 95 ROUND1(c, d, a, b, in[2], 11); in md4_transform() 96 ROUND1(b, c, d, a, in[3], 19); in md4_transform() 97 ROUND1(a, b, c, d, in[4], 3); in md4_transform() [all …]
|
D | sha256_generic.c | 55 u32 a, b, c, d, e, f, g, h, t1, t2; in sha256_transform() local 68 a=state[0]; b=state[1]; c=state[2]; d=state[3]; in sha256_transform() 73 t2 = e0(a) + Maj(a,b,c); d+=t1; h=t1+t2; in sha256_transform() 75 t2 = e0(h) + Maj(h,a,b); c+=t1; g=t1+t2; in sha256_transform() 77 t2 = e0(g) + Maj(g,h,a); b+=t1; f=t1+t2; in sha256_transform() 78 t1 = e + e1(b) + Ch(b,c,d) + 0xe9b5dba5 + W[ 3]; in sha256_transform() 80 t1 = d + e1(a) + Ch(a,b,c) + 0x3956c25b + W[ 4]; in sha256_transform() 82 t1 = c + e1(h) + Ch(h,a,b) + 0x59f111f1 + W[ 5]; in sha256_transform() 84 t1 = b + e1(g) + Ch(g,h,a) + 0x923f82a4 + W[ 6]; in sha256_transform() 85 t2 = e0(c) + Maj(c,d,e); f+=t1; b=t1+t2; in sha256_transform() [all …]
|
D | twofish_generic.c | 58 #define G2(b) \ argument 59 (ctx->s[1][(b) & 0xFF]) ^ (ctx->s[2][((b) >> 8) & 0xFF]) \ 60 ^ (ctx->s[3][((b) >> 16) & 0xFF]) ^ (ctx->s[0][(b) >> 24]) 67 #define ENCROUND(n, a, b, c, d) \ argument 68 x = G1 (a); y = G2 (b); \ 74 #define DECROUND(n, a, b, c, d) \ argument 75 x = G1 (a); y = G2 (b); \ 86 ENCROUND (2 * (n), a, b, c, d); \ 87 ENCROUND (2 * (n) + 1, c, d, a, b) 90 DECROUND (2 * (n) + 1, c, d, a, b); \ [all …]
|
D | tgr192.c | 38 u64 a, b, c; member 404 u64 b = *rb; in tgr192_round() local 410 b += sbox4[(c >> 8) & 0xff] ^ sbox3[(c >> 24) & 0xff] in tgr192_round() 412 b *= mul; in tgr192_round() 415 *rb = b; in tgr192_round() 423 u64 b = *rb; in tgr192_pass() local 426 tgr192_round(&a, &b, &c, x[0], mul); in tgr192_pass() 427 tgr192_round(&b, &c, &a, x[1], mul); in tgr192_pass() 428 tgr192_round(&c, &a, &b, x[2], mul); in tgr192_pass() 429 tgr192_round(&a, &b, &c, x[3], mul); in tgr192_pass() [all …]
|
D | gf128mul.c | 128 u64 b = be64_to_cpu(x->b); in gf128mul_x_lle() local 129 u64 _tt = gf128mul_table_lle[(b << 7) & 0xff]; in gf128mul_x_lle() 131 r->b = cpu_to_be64((b >> 1) | (a << 63)); in gf128mul_x_lle() 138 u64 b = be64_to_cpu(x->b); in gf128mul_x_bbe() local 141 r->a = cpu_to_be64((a << 1) | (b >> 63)); in gf128mul_x_bbe() 142 r->b = cpu_to_be64((b << 1) ^ _tt); in gf128mul_x_bbe() 148 u64 b = le64_to_cpu(x->b); in gf128mul_x_ble() local 149 u64 _tt = gf128mul_table_bbe[b >> 63]; in gf128mul_x_ble() 152 r->b = cpu_to_le64((b << 1) | (a >> 63)); in gf128mul_x_ble() 159 u64 b = be64_to_cpu(x->b); in gf128mul_x8_lle() local [all …]
|
D | twofish_common.c | 482 #define CALC_S(a, b, c, d, i, w, x, y, z) \ argument 486 (b) ^= exp_to_poly[tmp + (x)]; \ 497 #define CALC_SB_2(i, a, b) \ argument 499 ctx->s[1][i] = mds[1][q0[(b) ^ sb] ^ sf]; \ 501 ctx->s[3][i] = mds[3][q1[(b) ^ sd] ^ sh] 505 #define CALC_SB192_2(i, a, b) \ argument 506 ctx->s[0][i] = mds[0][q0[q0[(b) ^ sa] ^ se] ^ si]; \ 507 ctx->s[1][i] = mds[1][q0[q1[(b) ^ sb] ^ sf] ^ sj]; \ 513 #define CALC_SB256_2(i, a, b) \ argument 514 ctx->s[0][i] = mds[0][q0[q0[q1[(b) ^ sa] ^ se] ^ si] ^ sm]; \ [all …]
|
D | sha512_generic.c | 82 u64 a, b, c, d, e, f, g, h, t1, t2; in sha512_transform() local 88 a=state[0]; b=state[1]; c=state[2]; d=state[3]; in sha512_transform() 108 t2 = e0(a) + Maj(a,b,c); d+=t1; h=t1+t2; in sha512_transform() 110 t2 = e0(h) + Maj(h,a,b); c+=t1; g=t1+t2; in sha512_transform() 112 t2 = e0(g) + Maj(g,h,a); b+=t1; f=t1+t2; in sha512_transform() 113 t1 = e + e1(b) + Ch(b,c,d) + sha512_K[i+3] + W[(i & 15) + 3]; in sha512_transform() 115 t1 = d + e1(a) + Ch(a,b,c) + sha512_K[i+4] + W[(i & 15) + 4]; in sha512_transform() 117 t1 = c + e1(h) + Ch(h,a,b) + sha512_K[i+5] + W[(i & 15) + 5]; in sha512_transform() 119 t1 = b + e1(g) + Ch(g,h,a) + sha512_K[i+6] + W[(i & 15) + 6]; in sha512_transform() 120 t2 = e0(c) + Maj(c,d,e); f+=t1; b=t1+t2; in sha512_transform() [all …]
|
D | arc4.c | 57 u32 x, y, a, b; in arc4_crypt() local 68 b = S[y]; in arc4_crypt() 72 a = (a + b) & 0xff; in arc4_crypt() 73 S[x] = b; in arc4_crypt() 83 b = tb; in arc4_crypt()
|
D | wp512.c | 1012 u32 b, carry; in wp512_update() local 1026 b = ((source[sourcePos] << sourceGap) & 0xff) | in wp512_update() 1028 buffer[bufferPos++] |= (u8)(b >> bufferRem); in wp512_update() 1034 buffer[bufferPos] = b << (8 - bufferRem); in wp512_update() 1040 b = (source[sourcePos] << sourceGap) & 0xff; in wp512_update() 1041 buffer[bufferPos] |= b >> bufferRem; in wp512_update() 1043 b = 0; in wp512_update() 1055 buffer[bufferPos] = b << (8 - bufferRem); in wp512_update()
|
D | algapi.c | 910 u8 *b = (a + size); in crypto_inc_byte() local 914 c = *--b + 1; in crypto_inc_byte() 915 *b = c; in crypto_inc_byte() 923 __be32 *b = (__be32 *)(a + size); in crypto_inc() local 927 c = be32_to_cpu(*--b) + 1; in crypto_inc() 928 *b = cpu_to_be32(c); in crypto_inc() 937 static inline void crypto_xor_byte(u8 *a, const u8 *b, unsigned int size) in crypto_xor_byte() argument 940 *a++ ^= *b++; in crypto_xor_byte() 946 u32 *b = (u32 *)src; in crypto_xor() local 949 *a++ ^= *b++; in crypto_xor() [all …]
|
D | blowfish_common.c | 309 #define ROUND(a, b, n) ({ b ^= P[n]; a ^= bf_F(b); }) argument
|
D | blowfish_generic.c | 39 #define ROUND(a, b, n) ({ b ^= P[n]; a ^= bf_F(b); }) argument
|
D | lrw.c | 37 static inline void setbit128_bbe(void *b, int bit) in setbit128_bbe() argument 45 ), b); in setbit128_bbe() 107 be64_add_cpu(&iv->b, 1); in inc() 108 if (!iv->b) in inc()
|
D | serpent_generic.c | 33 #define keyiter(a, b, c, d, i, j) \ argument 34 ({ b ^= d; b ^= c; b ^= a; b ^= PHI ^ i; b = rol32(b, 11); k[j] = b; })
|
D | rmd256.c | 45 #define ROUND(a, b, c, d, f, k, x, s) { \ argument 46 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
|
D | rmd128.c | 45 #define ROUND(a, b, c, d, f, k, x, s) { \ argument 46 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
|
D | rmd160.c | 48 #define ROUND(a, b, c, d, e, f, k, x, s) { \ argument 49 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
|
D | rmd320.c | 48 #define ROUND(a, b, c, d, e, f, k, x, s) { \ argument 49 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
|
D | gcm.c | 267 lengths.b = cpu_to_be64(gctx->cryptlen * 8); in gcm_hash_len()
|
/crypto/async_tx/ |
D | async_raid6_recov.c | 39 u8 *a, *b, *c; in async_sum_product() local 73 b = page_address(srcs[1]); in async_sum_product() 78 bx = bmul[*b++]; in async_sum_product() 139 struct page *p, *q, *a, *b; in __2data_recov_4() local 151 b = blocks[failb]; in __2data_recov_4() 160 tx = async_sum_product(b, srcs, coef, bytes, submit); in __2data_recov_4() 164 srcs[1] = b; in __2data_recov_4()
|
D | async_pq.c | 42 #define P(b, d) (b[d-2]) argument 43 #define Q(b, d) (b[d-1]) argument
|