/crypto/ |
D | twofish_generic.c | 54 x = G1 (a); y = G2 (b); \ 55 x += y; y += x + ctx->k[2 * (n) + 1]; \ 56 (c) ^= x + ctx->k[2 * (n)]; \ 61 x = G1 (a); y = G2 (b); \ 62 x += y; y += x; \ 66 (c) ^= (x + ctx->k[2 * (n)]) 85 #define INPACK(n, x, m) \ argument 86 x = get_unaligned_le32(in + (n) * 4) ^ ctx->w[m] 88 #define OUTUNPACK(n, x, m) \ argument 89 x ^= ctx->w[m]; \ [all …]
|
D | sha512_generic.c | 43 static inline u64 Ch(u64 x, u64 y, u64 z) in Ch() argument 45 return z ^ (x & (y ^ z)); in Ch() 48 static inline u64 Maj(u64 x, u64 y, u64 z) in Maj() argument 50 return (x & y) | (z & (x | y)); in Maj() 83 #define e0(x) (ror64(x,28) ^ ror64(x,34) ^ ror64(x,39)) argument 84 #define e1(x) (ror64(x,14) ^ ror64(x,18) ^ ror64(x,41)) argument 85 #define s0(x) (ror64(x, 1) ^ ror64(x, 8) ^ (x >> 7)) argument 86 #define s1(x) (ror64(x,19) ^ ror64(x,61) ^ (x >> 6)) argument
|
D | blowfish_common.c | 296 #define GET32_3(x) (((x) & 0xff)) argument 297 #define GET32_2(x) (((x) >> (8)) & (0xff)) argument 298 #define GET32_1(x) (((x) >> (16)) & (0xff)) argument 299 #define GET32_0(x) (((x) >> (24)) & (0xff)) argument 301 #define bf_F(x) (((S[GET32_0(x)] + S[256 + GET32_1(x)]) ^ \ argument 302 S[512 + GET32_2(x)]) + S[768 + GET32_3(x)])
|
D | blowfish_generic.c | 26 #define GET32_3(x) (((x) & 0xff)) argument 27 #define GET32_2(x) (((x) >> (8)) & (0xff)) argument 28 #define GET32_1(x) (((x) >> (16)) & (0xff)) argument 29 #define GET32_0(x) (((x) >> (24)) & (0xff)) argument 31 #define bf_F(x) (((S[GET32_0(x)] + S[256 + GET32_1(x)]) ^ \ argument 32 S[512 + GET32_2(x)]) + S[768 + GET32_3(x)])
|
D | streebog_generic.c | 851 static void streebog_xor(const struct streebog_uint512 *x, in streebog_xor() argument 855 z->qword[0] = x->qword[0] ^ y->qword[0]; in streebog_xor() 856 z->qword[1] = x->qword[1] ^ y->qword[1]; in streebog_xor() 857 z->qword[2] = x->qword[2] ^ y->qword[2]; in streebog_xor() 858 z->qword[3] = x->qword[3] ^ y->qword[3]; in streebog_xor() 859 z->qword[4] = x->qword[4] ^ y->qword[4]; in streebog_xor() 860 z->qword[5] = x->qword[5] ^ y->qword[5]; in streebog_xor() 861 z->qword[6] = x->qword[6] ^ y->qword[6]; in streebog_xor() 862 z->qword[7] = x->qword[7] ^ y->qword[7]; in streebog_xor() 865 static void streebog_xlps(const struct streebog_uint512 *x, in streebog_xlps() argument [all …]
|
D | cast5_generic.c | 400 static void key_schedule(u32 *x, u32 *z, u32 *k) in key_schedule() argument 403 #define xi(i) ((x[(i)/4] >> (8*(3-((i)%4)))) & 0xff) in key_schedule() 406 z[0] = x[0] ^ s5[xi(13)] ^ s6[xi(15)] ^ s7[xi(12)] ^ sb8[xi(14)] ^ in key_schedule() 408 z[1] = x[2] ^ s5[zi(0)] ^ s6[zi(2)] ^ s7[zi(1)] ^ sb8[zi(3)] ^ in key_schedule() 410 z[2] = x[3] ^ s5[zi(7)] ^ s6[zi(6)] ^ s7[zi(5)] ^ sb8[zi(4)] ^ in key_schedule() 412 z[3] = x[1] ^ s5[zi(10)] ^ s6[zi(9)] ^ s7[zi(11)] ^ sb8[zi(8)] ^ in key_schedule() 422 x[0] = z[2] ^ s5[zi(5)] ^ s6[zi(7)] ^ s7[zi(4)] ^ sb8[zi(6)] ^ in key_schedule() 424 x[1] = z[0] ^ s5[xi(0)] ^ s6[xi(2)] ^ s7[xi(1)] ^ sb8[xi(3)] ^ in key_schedule() 426 x[2] = z[1] ^ s5[xi(7)] ^ s6[xi(6)] ^ s7[xi(5)] ^ sb8[xi(4)] ^ in key_schedule() 428 x[3] = z[3] ^ s5[xi(10)] ^ s6[xi(9)] ^ s7[xi(11)] ^ sb8[xi(8)] ^ in key_schedule() [all …]
|
D | sm2.c | 67 MPI x, y; in sm2_ec_ctx_init() local 76 x = mpi_scanval(ecp->g_x); in sm2_ec_ctx_init() 78 if (!x || !y) in sm2_ec_ctx_init() 94 mpi_set(ec->G->x, x); in sm2_ec_ctx_init() 113 mpi_free(x); in sm2_ec_ctx_init() 138 MPI x, y; in sm2_ecc_os2ec() local 158 x = mpi_read_raw_data(buf + 1, n); in sm2_ecc_os2ec() 159 if (!x) in sm2_ecc_os2ec() 165 mpi_normalize(x); in sm2_ecc_os2ec() 167 mpi_set(result->x, x); in sm2_ecc_os2ec() [all …]
|
D | twofish_common.c | 468 #define CALC_S(a, b, c, d, i, w, x, y, z) \ argument 472 (b) ^= exp_to_poly[tmp + (x)]; \ 536 x = CALC_K_2 (k, l, k, l, 0); \ 539 x += y; y += x; ctx->a[j] = x; \ 549 x = CALC_K192_2 (l, l, k, k, 0); \ 552 x += y; y += x; ctx->a[j] = x; \ 562 x = CALC_K256_2 (k, l, 0); \ 565 x += y; y += x; ctx->a[j] = x; \ 575 u32 x, y; in __twofish_setkey() local
|
D | md4.c | 42 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()
|
D | sm3_generic.c | 29 static inline u32 p0(u32 x) in p0() argument 31 return x ^ rol32(x, 9) ^ rol32(x, 17); in p0() 34 static inline u32 p1(u32 x) in p1() argument 36 return x ^ rol32(x, 15) ^ rol32(x, 23); in p1()
|
D | ecrdsa_defs.h | 51 .x = cp256a_g_x, 84 .x = cp256b_g_x, 121 .x = cp256c_g_x, 170 .x = tc512a_g_x, 215 .x = tc512b_g_x,
|
D | gf128mul.c | 139 static void gf128mul_x8_lle(be128 *x) in gf128mul_x8_lle() argument 141 u64 a = be64_to_cpu(x->a); in gf128mul_x8_lle() 142 u64 b = be64_to_cpu(x->b); in gf128mul_x8_lle() 145 x->b = cpu_to_be64((b >> 8) | (a << 56)); in gf128mul_x8_lle() 146 x->a = cpu_to_be64((a >> 8) ^ (_tt << 48)); in gf128mul_x8_lle() 149 static void gf128mul_x8_bbe(be128 *x) in gf128mul_x8_bbe() argument 151 u64 a = be64_to_cpu(x->a); in gf128mul_x8_bbe() 152 u64 b = be64_to_cpu(x->b); in gf128mul_x8_bbe() 155 x->a = cpu_to_be64((a << 8) | (b >> 56)); in gf128mul_x8_bbe() 156 x->b = cpu_to_be64((b << 8) ^ _tt); in gf128mul_x8_bbe() [all …]
|
D | ecc_curve_defs.h | 21 .x = nist_p192_g_x, 47 .x = nist_p256_g_x, 79 .x = nist_p384_g_x, 99 .x = curve25519_g_x,
|
D | md5.c | 32 #define F1(x, y, z) (z ^ (x & (y ^ z))) argument 33 #define F2(x, y, z) F1(z, x, y) argument 34 #define F3(x, y, z) (x ^ y ^ z) argument 35 #define F4(x, y, z) (y ^ (x | ~z)) argument 37 #define MD5STEP(f, w, x, y, z, in, s) \ argument 38 (w += f(x, y, z) + in, w = (w<<s | w>>(32-s)) + x)
|
D | ecdsa.c | 21 u64 x[ECC_MAX_DIGITS]; /* pub key x and y coordinates */ member 124 if (unlikely(vli_cmp(res.x, curve->n, ndigits) == 1)) in _ecdsa_verify() 126 vli_sub(res.x, res.x, curve->n, ndigits); in _ecdsa_verify() 128 if (!vli_cmp(res.x, r, ndigits)) in _ecdsa_verify() 212 ctx->pub_key = ECC_POINT_INIT(ctx->x, ctx->y, in ecdsa_ecc_ctx_reset() 245 ecc_swap_digits(digits, ctx->pub_key.x, ndigits); in ecdsa_set_pub_key()
|
D | ecrdsa.c | 95 !ctx->pub_key.x || in ecrdsa_verify() 140 if (vli_cmp(cc.x, ctx->curve->n, ndigits) >= 0) in ecrdsa_verify() 141 vli_sub(cc.x, cc.x, ctx->curve->n, ndigits); in ecrdsa_verify() 144 if (!vli_cmp(cc.x, r, ndigits)) in ecrdsa_verify() 242 vli_from_le64(ctx->pub_key.x, ctx->key, ndigits); in ecrdsa_set_pub_key()
|
D | ecc.h | 42 #define ECC_POINT_INIT(x, y, ndigits) (struct ecc_point) { x, y, ndigits } argument 242 const u64 *x, const struct ecc_point *p,
|
D | ecc.c | 91 p->x = ecc_alloc_digits_space(ndigits); in ecc_alloc_point() 92 if (!p->x) in ecc_alloc_point() 104 ecc_free_digits_space(p->x); in ecc_alloc_point() 115 kfree_sensitive(p->x); in ecc_free_point() 1067 return (vli_is_zero(point->x, point->ndigits) && in ecc_point_is_zero() 1296 vli_set(rx[1], point->x, ndigits); in ecc_point_mult() 1316 vli_mod_mult_fast(z, z, point->x, curve); in ecc_point_mult() 1331 vli_set(result->x, rx[0], ndigits); in ecc_point_mult() 1345 vli_set(result->x, q->x, ndigits); in ecc_point_add() 1347 vli_mod_sub(z, result->x, p->x, curve->p, ndigits); in ecc_point_add() [all …]
|
D | adiantum.c | 188 u64 x = le64_to_cpu(v1->b); in le128_add() local 191 r->b = cpu_to_le64(x + y); in le128_add() 193 (x + y < x)); in le128_add() 199 u64 x = le64_to_cpu(v1->b); in le128_sub() local 202 r->b = cpu_to_le64(x - y); in le128_sub() 204 (x - y > x)); in le128_sub()
|
D | rmd160.c | 37 #define F1(x, y, z) (x ^ y ^ z) /* XOR */ argument 38 #define F2(x, y, z) (z ^ (x & (y ^ z))) /* x ? y : z */ argument 39 #define F3(x, y, z) ((x | ~y) ^ z) argument 40 #define F4(x, y, z) (y ^ (z & (x ^ y))) /* z ? x : y */ argument 41 #define F5(x, y, z) (x ^ (y | ~z)) argument 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 | fcrypt.c | 73 #define Z(x) cpu_to_be32(x << 3) argument 110 #define Z(x) cpu_to_be32(((x & 0x1f) << 27) | (x >> 5)) argument 147 #define Z(x) cpu_to_be32(x << 11) argument 184 #define Z(x) cpu_to_be32(x << 19) argument
|
D | xor.c | 20 #define XOR_SELECT_TEMPLATE(x) (x) argument
|
D | crypto_user_stat.c | 22 #define null_terminated(x) (strnlen(x, sizeof(x)) < sizeof(x)) argument
|
D | crypto_user_base.c | 25 #define null_terminated(x) (strnlen(x, sizeof(x)) < sizeof(x)) argument
|
/crypto/asymmetric_keys/ |
D | verify_pefile.c | 36 #define chkaddr(base, x, s) \ in pefile_parse_binary() argument 38 if ((x) < base || (s) >= datalen || (x) > datalen - (s)) \ in pefile_parse_binary()
|