Home
last modified time | relevance | path

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

/crypto/
Dsalsa20_generic.c60 u32 x[16]; in salsa20_wordtobyte() local
63 memcpy(x, input, sizeof(x)); in salsa20_wordtobyte()
65 x[ 4] ^= rol32((x[ 0] + x[12]), 7); in salsa20_wordtobyte()
66 x[ 8] ^= rol32((x[ 4] + x[ 0]), 9); in salsa20_wordtobyte()
67 x[12] ^= rol32((x[ 8] + x[ 4]), 13); in salsa20_wordtobyte()
68 x[ 0] ^= rol32((x[12] + x[ 8]), 18); in salsa20_wordtobyte()
69 x[ 9] ^= rol32((x[ 5] + x[ 1]), 7); in salsa20_wordtobyte()
70 x[13] ^= rol32((x[ 9] + x[ 5]), 9); in salsa20_wordtobyte()
71 x[ 1] ^= rol32((x[13] + x[ 9]), 13); in salsa20_wordtobyte()
72 x[ 5] ^= rol32((x[ 1] + x[13]), 18); in salsa20_wordtobyte()
[all …]
Dtgr192.c401 static void tgr192_round(u64 * ra, u64 * rb, u64 * rc, u64 x, int mul) in tgr192_round() argument
407 c ^= x; in tgr192_round()
420 static void tgr192_pass(u64 * ra, u64 * rb, u64 * rc, u64 * x, int mul) in tgr192_pass() argument
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()
430 tgr192_round(&b, &c, &a, x[4], mul); in tgr192_pass()
431 tgr192_round(&c, &a, &b, x[5], mul); in tgr192_pass()
432 tgr192_round(&a, &b, &c, x[6], mul); in tgr192_pass()
[all …]
Dtwofish_generic.c68 x = G1 (a); y = G2 (b); \
69 x += y; y += x + ctx->k[2 * (n) + 1]; \
70 (c) ^= x + ctx->k[2 * (n)]; \
75 x = G1 (a); y = G2 (b); \
76 x += y; y += x; \
80 (c) ^= (x + ctx->k[2 * (n)])
99 #define INPACK(n, x, m) \ argument
100 x = le32_to_cpu(src[n]) ^ ctx->w[m]
102 #define OUTUNPACK(n, x, m) \ argument
103 x ^= ctx->w[m]; \
[all …]
Dblowfish_common.c301 #define GET32_3(x) (((x) & 0xff)) argument
302 #define GET32_2(x) (((x) >> (8)) & (0xff)) argument
303 #define GET32_1(x) (((x) >> (16)) & (0xff)) argument
304 #define GET32_0(x) (((x) >> (24)) & (0xff)) argument
306 #define bf_F(x) (((S[GET32_0(x)] + S[256 + GET32_1(x)]) ^ \ argument
307 S[512 + GET32_2(x)]) + S[768 + GET32_3(x)])
Dblowfish_generic.c31 #define GET32_3(x) (((x) & 0xff)) argument
32 #define GET32_2(x) (((x) >> (8)) & (0xff)) argument
33 #define GET32_1(x) (((x) >> (16)) & (0xff)) argument
34 #define GET32_0(x) (((x) >> (24)) & (0xff)) argument
36 #define bf_F(x) (((S[GET32_0(x)] + S[256 + GET32_1(x)]) ^ \ argument
37 S[512 + GET32_2(x)]) + S[768 + GET32_3(x)])
Dsha512_generic.c24 static inline u64 Ch(u64 x, u64 y, u64 z) in Ch() argument
26 return z ^ (x & (y ^ z)); in Ch()
29 static inline u64 Maj(u64 x, u64 y, u64 z) in Maj() argument
31 return (x & y) | (z & (x | y)); in Maj()
64 #define e0(x) (ror64(x,28) ^ ror64(x,34) ^ ror64(x,39)) argument
65 #define e1(x) (ror64(x,14) ^ ror64(x,18) ^ ror64(x,41)) argument
66 #define s0(x) (ror64(x, 1) ^ ror64(x, 8) ^ (x >> 7)) argument
67 #define s1(x) (ror64(x,19) ^ ror64(x,61) ^ (x >> 6)) argument
Darc4.c26 u32 x, y; member
35 ctx->x = 1; in arc4_set_key()
57 u32 x, y, a, b; in arc4_crypt() local
63 x = ctx->x; in arc4_crypt()
66 a = S[x]; in arc4_crypt()
73 S[x] = b; in arc4_crypt()
74 x = (x + 1) & 0xff; in arc4_crypt()
75 ta = S[x]; in arc4_crypt()
86 ctx->x = x; in arc4_crypt()
Dcast5_generic.c412 static void key_schedule(u32 *x, u32 *z, u32 *k) in key_schedule() argument
415 #define xi(i) ((x[(i)/4] >> (8*(3-((i)%4)))) & 0xff) in key_schedule()
418 z[0] = x[0] ^ s5[xi(13)] ^ s6[xi(15)] ^ s7[xi(12)] ^ sb8[xi(14)] ^ in key_schedule()
420 z[1] = x[2] ^ s5[zi(0)] ^ s6[zi(2)] ^ s7[zi(1)] ^ sb8[zi(3)] ^ in key_schedule()
422 z[2] = x[3] ^ s5[zi(7)] ^ s6[zi(6)] ^ s7[zi(5)] ^ sb8[zi(4)] ^ in key_schedule()
424 z[3] = x[1] ^ s5[zi(10)] ^ s6[zi(9)] ^ s7[zi(11)] ^ sb8[zi(8)] ^ in key_schedule()
434 x[0] = z[2] ^ s5[zi(5)] ^ s6[zi(7)] ^ s7[zi(4)] ^ sb8[zi(6)] ^ in key_schedule()
436 x[1] = z[0] ^ s5[xi(0)] ^ s6[xi(2)] ^ s7[xi(1)] ^ sb8[xi(3)] ^ in key_schedule()
438 x[2] = z[1] ^ s5[xi(7)] ^ s6[xi(6)] ^ s7[xi(5)] ^ sb8[xi(4)] ^ in key_schedule()
440 x[3] = z[3] ^ s5[xi(10)] ^ s6[xi(9)] ^ s7[xi(11)] ^ sb8[xi(8)] ^ in key_schedule()
[all …]
Dtwofish_common.c482 #define CALC_S(a, b, c, d, i, w, x, y, z) \ argument
486 (b) ^= exp_to_poly[tmp + (x)]; \
550 x = CALC_K_2 (k, l, k, l, 0); \
553 x += y; y += x; ctx->a[j] = x; \
563 x = CALC_K192_2 (l, l, k, k, 0); \
566 x += y; y += x; ctx->a[j] = x; \
576 x = CALC_K256_2 (k, l, 0); \
579 x += y; y += x; ctx->a[j] = x; \
589 u32 x, y; in __twofish_setkey() local
Dgf128mul.c100 #define xx(p, q) 0x##p##q
125 static void gf128mul_x_lle(be128 *r, const be128 *x) in gf128mul_x_lle() argument
127 u64 a = be64_to_cpu(x->a); in gf128mul_x_lle()
128 u64 b = be64_to_cpu(x->b); in gf128mul_x_lle()
135 static void gf128mul_x_bbe(be128 *r, const be128 *x) in gf128mul_x_bbe() argument
137 u64 a = be64_to_cpu(x->a); in gf128mul_x_bbe()
138 u64 b = be64_to_cpu(x->b); in gf128mul_x_bbe()
145 void gf128mul_x_ble(be128 *r, const be128 *x) in gf128mul_x_ble() argument
147 u64 a = le64_to_cpu(x->a); in gf128mul_x_ble()
148 u64 b = le64_to_cpu(x->b); in gf128mul_x_ble()
[all …]
Dmd4.c42 static inline u32 lshift(u32 x, unsigned int s) in lshift() argument
44 x &= 0xFFFFFFFF; in lshift()
45 return ((x << s) & 0xFFFFFFFF) | (x >> (32 - s)); in lshift()
48 static inline u32 F(u32 x, u32 y, u32 z) in F() argument
50 return (x & y) | ((~x) & z); in F()
53 static inline u32 G(u32 x, u32 y, u32 z) in G() argument
55 return (x & y) | (x & z) | (y & z); in G()
58 static inline u32 H(u32 x, u32 y, u32 z) in H() argument
60 return x ^ y ^ z; in H()
Daes_generic.c58 static inline u8 byte(const u32 x, const unsigned n) in byte() argument
60 return x >> (n << 3); in byte()
1128 #define star_x(x) (((x) & 0x7f7f7f7f) << 1) ^ ((((x) & 0x80808080) >> 7) * 0x1b) argument
1130 #define imix_col(y, x) do { \ argument
1131 u = star_x(x); \
1134 t = w ^ (x); \
1141 #define ls_box(x) \ argument
1142 crypto_fl_tab[0][byte(x, 0)] ^ \
1143 crypto_fl_tab[1][byte(x, 1)] ^ \
1144 crypto_fl_tab[2][byte(x, 2)] ^ \
[all …]
Dsha256_generic.c28 static inline u32 Ch(u32 x, u32 y, u32 z) in Ch() argument
30 return z ^ (x & (y ^ z)); in Ch()
33 static inline u32 Maj(u32 x, u32 y, u32 z) in Maj() argument
35 return (x & y) | (z & (x | y)); in Maj()
38 #define e0(x) (ror32(x, 2) ^ ror32(x,13) ^ ror32(x,22)) argument
39 #define e1(x) (ror32(x, 6) ^ ror32(x,11) ^ ror32(x,25)) argument
40 #define s0(x) (ror32(x, 7) ^ ror32(x,18) ^ (x >> 3)) argument
41 #define s1(x) (ror32(x,17) ^ ror32(x,19) ^ (x >> 10)) argument
Ddes_generic.c25 #define ROL(x, r) ((x) = rol32((x), (r))) argument
26 #define ROR(x, r) ((x) = ror32((x), (r))) argument
612 #define T1(x) pt[2 * (x) + 0] argument
613 #define T2(x) pt[2 * (x) + 1] argument
614 #define T3(x) pt[2 * (x) + 2] argument
615 #define T4(x) pt[2 * (x) + 3] argument
Dlrw.c123 int x; in get_index128() local
126 for (p += 3, x = 0; x < 128; p--, x += 32) { in get_index128()
132 return x + ffz(val); in get_index128()
135 return x; in get_index128()
Drmd256.c40 #define F1(x, y, z) (x ^ y ^ z) /* XOR */ argument
41 #define F2(x, y, z) (z ^ (x & (y ^ z))) /* x ? y : z */ argument
42 #define F3(x, y, z) ((x | ~y) ^ z) argument
43 #define F4(x, y, z) (y ^ (z & (x ^ y))) /* z ? x : y */ argument
45 #define ROUND(a, b, c, d, f, k, x, s) { \ argument
46 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
Drmd128.c40 #define F1(x, y, z) (x ^ y ^ z) /* XOR */ argument
41 #define F2(x, y, z) (z ^ (x & (y ^ z))) /* x ? y : z */ argument
42 #define F3(x, y, z) ((x | ~y) ^ z) argument
43 #define F4(x, y, z) (y ^ (z & (x ^ y))) /* z ? x : y */ argument
45 #define ROUND(a, b, c, d, f, k, x, s) { \ argument
46 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
Drmd160.c42 #define F1(x, y, z) (x ^ y ^ z) /* XOR */ argument
43 #define F2(x, y, z) (z ^ (x & (y ^ z))) /* x ? y : z */ argument
44 #define F3(x, y, z) ((x | ~y) ^ z) argument
45 #define F4(x, y, z) (y ^ (z & (x ^ y))) /* z ? x : y */ argument
46 #define F5(x, y, z) (x ^ (y | ~z)) argument
48 #define ROUND(a, b, c, d, e, f, k, x, s) { \ argument
49 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
Drmd320.c42 #define F1(x, y, z) (x ^ y ^ z) /* XOR */ argument
43 #define F2(x, y, z) (z ^ (x & (y ^ z))) /* x ? y : z */ argument
44 #define F3(x, y, z) ((x | ~y) ^ z) argument
45 #define F4(x, y, z) (y ^ (z & (x ^ y))) /* z ? x : y */ argument
46 #define F5(x, y, z) (x ^ (y | ~z)) argument
48 #define ROUND(a, b, c, d, e, f, k, x, s) { \ argument
49 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
Dfcrypt.c76 #define Z(x) cpu_to_be32(x << 3) argument
113 #define Z(x) cpu_to_be32((x << 27) | (x >> 5)) argument
150 #define Z(x) cpu_to_be32(x << 11) argument
187 #define Z(x) cpu_to_be32(x << 19) argument
Dcrypto_user.c33 #define null_terminated(x) (strnlen(x, sizeof(x)) < sizeof(x)) argument
Dseed.c31 byte(const u32 x, const unsigned n) in byte() argument
33 return x >> (n << 3); in byte()
Dvmac.c40 #define UINT64_C(x) x##ULL argument
/crypto/asymmetric_keys/
Drsa.c123 static int RSA_I2OSP(MPI x, size_t xLen, u8 **_X) in RSA_I2OSP() argument
133 x_size = mpi_get_nbits(x); in RSA_I2OSP()
138 X = mpi_get_buffer(x, &X_size, &X_sign); in RSA_I2OSP()
Dx509_cert_parser.c483 #define DD2bin(P) ({ unsigned x = dec2bin(P[0]) * 10 + dec2bin(P[1]); P += 2; x; }) in x509_note_time()