/crypto/ |
D | md5.c | 42 u32 a, b, c, d; in md5_transform() local 46 c = hash[2]; 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 | 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 73 c = hash[2]; 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 | cast6_generic.c | 106 int __cast6_setkey(struct cast6_ctx *c, const u8 *in_key, unsigned int key_len) in __cast6_setkey() argument 131 c->Kr[i][0] = key[0] & 0x1f; in __cast6_setkey() 132 c->Kr[i][1] = key[2] & 0x1f; in __cast6_setkey() 133 c->Kr[i][2] = key[4] & 0x1f; in __cast6_setkey() 134 c->Kr[i][3] = key[6] & 0x1f; in __cast6_setkey() 136 c->Km[i][0] = key[7]; in __cast6_setkey() 137 c->Km[i][1] = key[5]; in __cast6_setkey() 138 c->Km[i][2] = key[3]; in __cast6_setkey() 139 c->Km[i][3] = key[1]; in __cast6_setkey() 174 const struct cast6_ctx *c = ctx; in __cast6_encrypt() local [all …]
|
D | tgr192.c | 34 u64 a, b, c; member 401 u64 c = *rc; in tgr192_round() local 403 c ^= x; in tgr192_round() 404 a -= sbox1[c & 0xff] ^ sbox2[(c >> 16) & 0xff] in tgr192_round() 405 ^ sbox3[(c >> 32) & 0xff] ^ sbox4[(c >> 48) & 0xff]; in tgr192_round() 406 b += sbox4[(c >> 8) & 0xff] ^ sbox3[(c >> 24) & 0xff] in tgr192_round() 407 ^ sbox2[(c >> 40) & 0xff] ^ sbox1[(c >> 56) & 0xff]; in tgr192_round() 412 *rc = c; in tgr192_round() 420 u64 c = *rc; in tgr192_pass() local 422 tgr192_round(&a, &b, &c, x[0], mul); in tgr192_pass() [all …]
|
D | twofish_generic.c | 53 #define ENCROUND(n, a, b, c, d) \ argument 56 (c) ^= x + ctx->k[2 * (n)]; \ 57 (c) = ror32((c), 1); \ 60 #define DECROUND(n, a, b, c, d) \ argument 65 (c) = rol32((c), 1); \ 66 (c) ^= (x + ctx->k[2 * (n)]) 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); \ 77 DECROUND (2 * (n), a, b, c, d) [all …]
|
D | rsa.c | 25 static int _rsa_enc(const struct rsa_mpi_key *key, MPI c, MPI m) in _rsa_enc() argument 32 return mpi_powm(c, m, key->e, key->n); in _rsa_enc() 39 static int _rsa_dec(const struct rsa_mpi_key *key, MPI m, MPI c) in _rsa_dec() argument 42 if (mpi_cmp_ui(c, 0) < 0 || mpi_cmp(c, key->n) >= 0) in _rsa_dec() 46 return mpi_powm(m, c, key->d, key->n); in _rsa_dec() 58 MPI m, c = mpi_alloc(0); in rsa_enc() local 62 if (!c) in rsa_enc() 75 ret = _rsa_enc(pkey, c, m); in rsa_enc() 79 ret = mpi_write_to_sgl(c, req->dst, req->dst_len, &sign); in rsa_enc() 89 mpi_free(c); in rsa_enc() [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() 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() 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() 137 t2 = e0(d) + Maj(d,e,f); g+=t1; c=t1+t2; in sha512_transform() 139 t2 = e0(c) + Maj(c,d,e); f+=t1; b=t1+t2; in sha512_transform() [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 83 c = m[2]; in sm3_compress() 96 tt1 = ff(i, a, b, c) + d + ss2 + *wt; in sm3_compress() 102 d = c; in sm3_compress() 103 c = rol32(b, 9); in sm3_compress() 114 m[2] = c ^ m[2]; in sm3_compress() 121 a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0; in sm3_compress()
|
D | blake2b_generic.c | 46 #define G(r,i,a,b,c,d) \ argument 50 c = c + d; \ 51 b = ror64(b ^ c, 24); \ 54 c = c + d; \ 55 b = ror64(b ^ c, 63); \
|
D | cast5_generic.c | 303 void __cast5_encrypt(struct cast5_ctx *c, u8 *outbuf, const u8 *inbuf) in __cast5_encrypt() argument 312 Km = c->Km; in __cast5_encrypt() 313 Kr = c->Kr; in __cast5_encrypt() 341 if (!(c->rr)) { in __cast5_encrypt() 360 void __cast5_decrypt(struct cast5_ctx *c, u8 *outbuf, const u8 *inbuf) in __cast5_decrypt() argument 369 Km = c->Km; in __cast5_decrypt() 370 Kr = c->Kr; in __cast5_decrypt() 375 if (!(c->rr)) { in __cast5_decrypt() 481 struct cast5_ctx *c = crypto_tfm_ctx(tfm); in cast5_setkey() local 488 c->rr = key_len <= 10 ? 1 : 0; in cast5_setkey() [all …]
|
D | Makefile | 34 $(obj)/rsapubkey.asn1.o: $(obj)/rsapubkey.asn1.c $(obj)/rsapubkey.asn1.h 35 $(obj)/rsaprivkey.asn1.o: $(obj)/rsaprivkey.asn1.c $(obj)/rsaprivkey.asn1.h 45 $(obj)/sm2signature.asn1.o: $(obj)/sm2signature.asn1.c $(obj)/sm2signature.asn1.h 183 $(obj)/ecrdsa_params.asn1.o: $(obj)/ecrdsa_params.asn1.c $(obj)/ecrdsa_params.asn1.h 184 $(obj)/ecrdsa_pub_key.asn1.o: $(obj)/ecrdsa_pub_key.asn1.c $(obj)/ecrdsa_pub_key.asn1.h 226 $(obj)/%-fips.o: $(src)/%.c FORCE 228 $(obj)/lib-%-fips.o: $(srctree)/lib/%.c FORCE 230 $(obj)/lib-crypto-%-fips.o: $(srctree)/lib/crypto/%.c FORCE
|
D | twofish_common.c | 468 #define CALC_S(a, b, c, d, i, w, x, y, z) \ argument 473 (c) ^= exp_to_poly[tmp + (y)]; \ 529 #define CALC_K_2(a, b, c, d, j) \ argument 532 ^ mds[2][q1[c ^ key[(j) + 10]] ^ key[(j) + 2]] \ 542 #define CALC_K192_2(a, b, c, d, j) \ argument 545 q0[c ^ key[(j) + 18]], \
|
D | khazad.c | 750 static const u64 c[KHAZAD_ROUNDS + 1] = { variable 779 c[r] ^ K2; in khazad_setkey()
|
D | algapi.c | 969 u8 c; in crypto_inc_byte() local 972 c = *--b + 1; in crypto_inc_byte() 973 *b = c; in crypto_inc_byte() 974 if (c) in crypto_inc_byte() 982 u32 c; in crypto_inc() local 987 c = be32_to_cpu(*--b) + 1; in crypto_inc() 988 *b = cpu_to_be32(c); in crypto_inc() 989 if (likely(c)) in crypto_inc()
|
D | fcrypt.c | 228 union lc4 { __be32 l; u8 c[4]; } u; \ 230 L ^= sbox0[u.c[0]] ^ sbox1[u.c[1]] ^ sbox2[u.c[2]] ^ sbox3[u.c[3]]; \
|
D | testmgr.h | 153 const unsigned char *c; member 206 .c = 246 .c = 304 .c = 346 .c = 529 .c = 585 .c = 611 .c = 637 .c = 666 .c = [all …]
|
D | rmd160.c | 43 #define ROUND(a, b, c, d, e, f, k, x, s) { \ argument 44 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \ 46 (c) = rol32((c), 10); \
|
D | rmd320.c | 43 #define ROUND(a, b, c, d, e, f, k, x, s) { \ argument 44 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \ 46 (c) = rol32((c), 10); \
|
D | crypto_user_base.c | 451 struct netlink_dump_control c = { in crypto_user_rcv_msg() local 456 err = netlink_dump_start(net->crypto_nlsk, skb, nlh, &c); in crypto_user_rcv_msg()
|
D | serpent_generic.c | 29 #define keyiter(a, b, c, d, i, j) \ argument 30 ({ b ^= d; b ^= c; b ^= a; b ^= PHI ^ i; b = rol32(b, 11); k[j] = b; }) 452 void __serpent_encrypt(const void *c, u8 *dst, const u8 *src) in __serpent_encrypt() argument 454 const struct serpent_ctx *ctx = c; in __serpent_encrypt() 518 void __serpent_decrypt(const void *c, u8 *dst, const u8 *src) in __serpent_decrypt() argument 520 const struct serpent_ctx *ctx = c; in __serpent_decrypt()
|
D | aegis128-neon-inner.c | 23 void *memset(void *s, int c, size_t n);
|
D | rmd256.c | 40 #define ROUND(a, b, c, d, f, k, x, s) { \ argument 41 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
|
D | rmd128.c | 40 #define ROUND(a, b, c, d, f, k, x, s) { \ argument 41 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
|
/crypto/asymmetric_keys/ |
D | Makefile | 30 $(obj)/x509.asn1.o: $(obj)/x509.asn1.c $(obj)/x509.asn1.h 31 $(obj)/x509_akid.asn1.o: $(obj)/x509_akid.asn1.c $(obj)/x509_akid.asn1.h 42 $(obj)/pkcs8-asn1.o: $(obj)/pkcs8.asn1.c $(obj)/pkcs8.asn1.h 44 clean-files += pkcs8.asn1.c pkcs8.asn1.h 57 $(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h 77 $(obj)/mscode.asn1.o: $(obj)/mscode.asn1.c $(obj)/mscode.asn1.h 88 $(obj)/tpm.asn1.o: $(obj)/tpm.asn1.c $(obj)/tpm.asn1.h
|
/crypto/async_tx/ |
D | async_raid6_recov.c | 28 u8 *a, *b, *c; in async_sum_product() local 75 c = page_address(dest) + d_off; in async_sum_product() 80 *c++ = ax ^ bx; in async_sum_product()
|