/crypto/ |
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 69 u32 a, b, c, d; in md4_transform() local 71 a = hash[0]; in md4_transform() 76 ROUND1(a, b, c, d, in[0], 3); in md4_transform() 77 ROUND1(d, a, b, c, in[1], 7); in md4_transform() 78 ROUND1(c, d, a, b, in[2], 11); in md4_transform() 79 ROUND1(b, c, d, a, in[3], 19); in md4_transform() 80 ROUND1(a, b, c, d, in[4], 3); in md4_transform() [all …]
|
D | md5.c | 42 u32 a, b, c, d; in md5_transform() local 44 a = hash[0]; in md5_transform() 49 MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); in md5_transform() 50 MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); in md5_transform() 51 MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); in md5_transform() 52 MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); in md5_transform() 53 MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); in md5_transform() 54 MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); in md5_transform() 55 MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); in md5_transform() 56 MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); in md5_transform() [all …]
|
D | twofish_generic.c | 40 #define G1(a) \ argument 41 (ctx->s[0][(a) & 0xFF]) ^ (ctx->s[1][((a) >> 8) & 0xFF]) \ 42 ^ (ctx->s[2][((a) >> 16) & 0xFF]) ^ (ctx->s[3][(a) >> 24]) 53 #define ENCROUND(n, a, b, c, d) \ argument 54 x = G1 (a); y = G2 (b); \ 60 #define DECROUND(n, a, b, c, d) \ argument 61 x = G1 (a); y = G2 (b); \ 72 ENCROUND (2 * (n), a, b, c, d); \ 73 ENCROUND (2 * (n) + 1, c, d, a, b) 76 DECROUND (2 * (n) + 1, c, d, a, b); \ [all …]
|
D | twofish_common.c | 468 #define CALC_S(a, b, c, d, i, w, x, y, z) \ argument 471 (a) ^= exp_to_poly[tmp + (w)]; \ 483 #define CALC_SB_2(i, a, b) \ argument 484 ctx->s[0][i] = mds[0][q0[(a) ^ sa] ^ se]; \ 486 ctx->s[2][i] = mds[2][q1[(a) ^ sc] ^ sg]; \ 491 #define CALC_SB192_2(i, a, b) \ argument 494 ctx->s[2][i] = mds[2][q1[q0[(a) ^ sc] ^ sg] ^ sk]; \ 495 ctx->s[3][i] = mds[3][q1[q1[(a) ^ sd] ^ sh] ^ sl]; 499 #define CALC_SB256_2(i, a, b) \ argument 501 ctx->s[1][i] = mds[1][q0[q1[q1[(a) ^ sb] ^ sf] ^ sj] ^ sn]; \ [all …]
|
D | gf128mul.c | 141 u64 a = be64_to_cpu(x->a); in gf128mul_x8_lle() local 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() 151 u64 a = be64_to_cpu(x->a); in gf128mul_x8_bbe() local 153 u64 _tt = gf128mul_table_be[a >> 56]; in gf128mul_x8_bbe() 155 x->a = cpu_to_be64((a << 8) | (b >> 56)); in gf128mul_x8_bbe() 161 u64 a = le64_to_cpu(x->a); in gf128mul_x8_ble() local 163 u64 _tt = gf128mul_table_be[a >> 56]; in gf128mul_x8_ble() 165 r->a = cpu_to_le64((a << 8) | (b >> 56)); in gf128mul_x8_ble() 312 void gf128mul_64k_bbe(be128 *a, const struct gf128mul_64k *t) in gf128mul_64k_bbe() argument [all …]
|
D | sm3_generic.c | 39 static inline u32 ff(unsigned int n, u32 a, u32 b, u32 c) in ff() argument 41 return (n < 16) ? (a ^ b ^ c) : ((a & b) | (a & c) | (b & c)); in ff() 78 u32 a, b, c, d, e, f, g, h; in sm3_compress() local 81 a = m[0]; in sm3_compress() 92 ss1 = rol32((rol32(a, 12) + e + rol32(t(i), i & 31)), 7); in sm3_compress() 94 ss2 = ss1 ^ rol32(a, 12); in sm3_compress() 96 tt1 = ff(i, a, b, c) + d + ss2 + *wt; in sm3_compress() 104 b = a; in sm3_compress() 105 a = tt1; in sm3_compress() 112 m[0] = a ^ m[0]; in sm3_compress() [all …]
|
D | sha512_generic.c | 101 u64 a, b, c, d, e, f, g, h, t1, t2; in sha512_transform() local 107 a=state[0]; b=state[1]; c=state[2]; d=state[3]; in sha512_transform() 127 t2 = e0(a) + Maj(a,b,c); d+=t1; h=t1+t2; in sha512_transform() 129 t2 = e0(h) + Maj(h,a,b); c+=t1; g=t1+t2; in sha512_transform() 131 t2 = e0(g) + Maj(g,h,a); b+=t1; f=t1+t2; in sha512_transform() 133 t2 = e0(f) + Maj(f,g,h); a+=t1; e=t1+t2; in sha512_transform() 134 t1 = d + e1(a) + Ch(a,b,c) + sha512_K[i+4] + W[(i & 15) + 4]; in sha512_transform() 136 t1 = c + e1(h) + Ch(h,a,b) + sha512_K[i+5] + W[(i & 15) + 5]; in sha512_transform() 138 t1 = b + e1(g) + Ch(g,h,a) + sha512_K[i+6] + W[(i & 15) + 6]; in sha512_transform() 140 t1 = a + e1(f) + Ch(f,g,h) + sha512_K[i+7] + W[(i & 15) + 7]; in sha512_transform() [all …]
|
D | sm2.c | 39 const char *a, *b; /* The coefficients. For Twisted Edwards member 55 .a = "0xfffffffeffffffffffffffffffffffffffffffff00000000fffffffffffffffc", 66 MPI p, a, b; in sm2_ec_ctx_init() local 71 a = mpi_scanval(ecp->a); in sm2_ec_ctx_init() 73 if (!p || !a || !b) in sm2_ec_ctx_init() 108 mpi_ec_init(ec, ecp->model, ecp->dialect, 0, p, a, b); in sm2_ec_ctx_init() 117 mpi_free(a); in sm2_ec_ctx_init() 285 if (sm2_z_digest_update(desc, ec->a, pbytes) || in sm2_compute_z_digest() 394 MPI a; in sm2_set_pub_key() local 398 a = mpi_read_raw_data(key, keylen); in sm2_set_pub_key() [all …]
|
D | polyval-generic.c | 72 u64 a = get_unaligned((const u64 *)&src[0]); in copy_and_reverse() local 75 put_unaligned(swab64(a), (u64 *)&dst[8]); in copy_and_reverse() 89 be128 a, b; in polyval_mul_non4k() local 92 copy_and_reverse((u8 *)&a, op1); in polyval_mul_non4k() 94 gf128mul_x_lle(&a, &a); in polyval_mul_non4k() 95 gf128mul_lle(&a, &b); in polyval_mul_non4k() 96 copy_and_reverse(op1, (u8 *)&a); in polyval_mul_non4k()
|
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]]; \ 49 d = ror64(d ^ a, 32); \ 52 a = a + b + m[blake2b_sigma[r][2*i+1]]; \ 53 d = ror64(d ^ a, 16); \
|
D | ecrdsa_defs.h | 57 .a = cp256a_a, 90 .a = cp256b_a, 127 .a = cp256c_a, 176 .a = tc512a_a, 221 .a = tc512b_a,
|
D | ecc_curve_defs.h | 27 .a = nist_p192_a, 53 .a = nist_p256_a, 85 .a = nist_p384_a, 103 .a = curve25519_a,
|
D | echainiv.c | 72 u64 a; in echainiv_encrypt() local 74 memcpy(&a, ctx->salt + ivsize - 8, 8); in echainiv_encrypt() 76 a |= 1; in echainiv_encrypt() 77 a *= seqno; in echainiv_encrypt() 79 memcpy(info + ivsize - 8, &a, 8); in echainiv_encrypt()
|
D | Kconfig | 32 required if you want the system to operate in a FIPS 200 46 This option enables building a loadable module fips140.ko, which 63 errors and support for a userspace interface to some of the module's 209 This converts an arbitrary crypto algorithm into a parallel 218 This is a generic software asynchronous crypto daemon that 220 into an asynchronous algorithm that executes in a kernel thread. 390 This IV generator generates an IV based on a sequence number by 391 xoring it with a salt. This algorithm is mainly useful for CTR 401 a sequence number xored with a salt. This is the default 443 See: https://csrc.nist.gov/publications/detail/sp/800-38a/addendum/final [all …]
|
D | aegis128-neon-inner.c | 181 static uint8x16_t vqtbl1q_u8(uint8x16_t a, uint8x16_t b) in vqtbl1q_u8() argument 186 } __a = { a }; in vqtbl1q_u8() 192 static uint8x16_t vqtbx1q_u8(uint8x16_t v, uint8x16_t a, uint8x16_t b) in vqtbx1q_u8() argument 197 } __a = { a }; in vqtbx1q_u8()
|
D | adiantum.c | 192 r->a = cpu_to_le64(le64_to_cpu(v1->a) + le64_to_cpu(v2->a) + in le128_add() 203 r->a = cpu_to_le64(le64_to_cpu(v1->a) - le64_to_cpu(v2->a) - in le128_sub()
|
D | blowfish_common.c | 304 #define ROUND(a, b, n) ({ b ^= P[n]; a ^= bf_F(b); }) argument
|
D | blowfish_generic.c | 34 #define ROUND(a, b, n) ({ b ^= P[n]; a ^= bf_F(b); }) argument
|
D | ecc.c | 378 static uint128_t add_128_128(uint128_t a, uint128_t b) in add_128_128() argument 382 result.m_low = a.m_low + b.m_low; in add_128_128() 383 result.m_high = a.m_high + b.m_high + (result.m_low < a.m_low); in add_128_128() 990 u64 a[ECC_MAX_DIGITS], b[ECC_MAX_DIGITS]; in vli_mod_inv() local 1000 vli_set(a, input, ndigits); in vli_mod_inv() 1006 while ((cmp_result = vli_cmp(a, b, ndigits)) != 0) { in vli_mod_inv() 1009 if (EVEN(a)) { in vli_mod_inv() 1010 vli_rshift1(a, ndigits); in vli_mod_inv() 1028 vli_sub(a, a, b, ndigits); in vli_mod_inv() 1029 vli_rshift1(a, ndigits); in vli_mod_inv() [all …]
|
D | skcipher.c | 230 unsigned a; in skcipher_next_slow() local 244 a = crypto_tfm_ctx_alignment() - 1; in skcipher_next_slow() 249 a &= (sizeof(*p) ^ (sizeof(*p) - 1)) >> 1; in skcipher_next_slow() 254 n += alignmask & ~a; in skcipher_next_slow() 257 n += (bsize - 1) & ~(alignmask | a); in skcipher_next_slow() 399 unsigned a = crypto_tfm_ctx_alignment() - 1; in skcipher_copy_iv() local 410 size = alignmask & ~a; in skcipher_copy_iv() 418 size += (bs - 1) & ~(alignmask | a); in skcipher_copy_iv()
|
D | fips140-module.c | 596 void crypto_inc(u8 *a, unsigned int size) in crypto_inc() argument 598 a += size; in crypto_inc() 601 if (++*--a) in crypto_inc()
|
D | Makefile | 226 extra-$(CONFIG_CRYPTO_FIPS140_MOD) += crypto-fips.a 236 $(obj)/crypto-fips.a: $(addprefix $(obj)/,$(crypto-fips-objs)) FORCE 244 crypto-fips.a
|
/crypto/asymmetric_keys/ |
D | Kconfig | 6 This option provides support for a key type that holds the data for 44 data and provides the ability to instantiate a crypto key from a 54 private key data and provides the ability to instantiate a crypto key 63 private key data and provides the ability to instantiate a crypto key 80 This option provides a type of key that can be loaded up from a 81 PKCS#7 message - provided the message is signed by a trusted key. If 96 This option provides support for verifying the signature(s) on a
|
D | x509_public_key.c | 119 bool a = asymmetric_key_id_same(cert->skid, cert->sig->auth_ids[1]); in x509_check_for_self_signed() local 122 if (!a && !b) in x509_check_for_self_signed() 126 if (((a && !b) || (b && !a)) && in x509_check_for_self_signed()
|
/crypto/async_tx/ |
D | async_raid6_recov.c | 28 u8 *a, *b, *c; in async_sum_product() local 73 a = page_address(srcs[0]) + src_offs[0]; in async_sum_product() 78 ax = amul[*a++]; in async_sum_product() 158 struct page *p, *q, *a, *b; in __2data_recov_4() local 173 a = blocks[faila]; in __2data_recov_4() 196 tx = async_xor_offs(a, a_off, srcs, src_offs, 2, bytes, submit); in __2data_recov_4()
|