Home
last modified time | relevance | path

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

12

/crypto/
Dmd5.c45 u32 a, b, c, d; in md5_transform() local
49 c = hash[2]; in md5_transform()
52 MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); in md5_transform()
53 MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); in md5_transform()
54 MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); in md5_transform()
55 MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); in md5_transform()
56 MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); in md5_transform()
57 MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); in md5_transform()
58 MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); in md5_transform()
59 MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); in md5_transform()
[all …]
Dmd4.c63 #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 …]
Dcast6_generic.c106 int __cast6_setkey(struct cast6_ctx *c, const u8 *in_key, in __cast6_setkey() argument
134 c->Kr[i][0] = key[0] & 0x1f; in __cast6_setkey()
135 c->Kr[i][1] = key[2] & 0x1f; in __cast6_setkey()
136 c->Kr[i][2] = key[4] & 0x1f; in __cast6_setkey()
137 c->Kr[i][3] = key[6] & 0x1f; in __cast6_setkey()
139 c->Km[i][0] = key[7]; in __cast6_setkey()
140 c->Km[i][1] = key[5]; in __cast6_setkey()
141 c->Km[i][2] = key[3]; in __cast6_setkey()
142 c->Km[i][3] = key[1]; in __cast6_setkey()
176 void __cast6_encrypt(struct cast6_ctx *c, u8 *outbuf, const u8 *inbuf) in __cast6_encrypt() argument
[all …]
Dtgr192.c34 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 …]
Dtwofish_generic.c53 #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 …]
Drsa.c25 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 …]
Dsha512_generic.c101 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 …]
Dsm3_generic.c39 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()
Dcast5_generic.c303 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 …]
Dtwofish_common.c468 #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]], \
DMakefile36 $(obj)/rsapubkey.asn1.o: $(obj)/rsapubkey.asn1.c $(obj)/rsapubkey.asn1.h
37 $(obj)/rsaprivkey.asn1.o: $(obj)/rsaprivkey.asn1.c $(obj)/rsaprivkey.asn1.h
174 $(obj)/ecrdsa_params.asn1.o: $(obj)/ecrdsa_params.asn1.c $(obj)/ecrdsa_params.asn1.h
175 $(obj)/ecrdsa_pub_key.asn1.o: $(obj)/ecrdsa_pub_key.asn1.c $(obj)/ecrdsa_pub_key.asn1.h
Dkhazad.c750 static const u64 c[KHAZAD_ROUNDS + 1] = { variable
779 c[r] ^ K2; in khazad_setkey()
Dalgapi.c939 u8 c; in crypto_inc_byte() local
942 c = *--b + 1; in crypto_inc_byte()
943 *b = c; in crypto_inc_byte()
944 if (c) in crypto_inc_byte()
952 u32 c; in crypto_inc() local
957 c = be32_to_cpu(*--b) + 1; in crypto_inc()
958 *b = cpu_to_be32(c); in crypto_inc()
959 if (likely(c)) in crypto_inc()
Dfcrypt.c228 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]]; \
Dtestmgr.h147 const unsigned char *c; member
200 .c =
240 .c =
298 .c =
340 .c =
523 .c =
579 .c =
605 .c =
631 .c =
660 .c =
[all …]
Drmd160.c43 #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); \
Drmd320.c43 #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); \
Dcrypto_user_base.c450 struct netlink_dump_control c = { in crypto_user_rcv_msg() local
455 err = netlink_dump_start(net->crypto_nlsk, skb, nlh, &c); in crypto_user_rcv_msg()
Daegis128-neon-inner.c23 void *memset(void *s, int c, size_t n);
Drmd256.c40 #define ROUND(a, b, c, d, f, k, x, s) { \ argument
41 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
Drmd128.c40 #define ROUND(a, b, c, d, f, k, x, s) { \ argument
41 (a) += f((b), (c), (d)) + le32_to_cpup(&(x)) + (k); \
Dtestmgr.c3656 const char *m, *c; in test_akcipher_one() local
3700 c = vecs->c; in test_akcipher_one()
3707 m = vecs->c; /* signature */ in test_akcipher_one()
3709 c = vecs->m; /* digest */ in test_akcipher_one()
3724 memcpy(xbuf[1], c, c_size); in test_akcipher_one()
3752 if (memcmp(c, outbuf_enc, c_size) != 0) { in test_akcipher_one()
3778 memcpy(xbuf[0], c, c_size); in test_akcipher_one()
Decc.c519 u64 c = -mod[0]; in vli_mmod_special() local
525 vli_umult(t, r + ndigits, c, ndigits); in vli_mmod_special()
/crypto/asymmetric_keys/
DMakefile30 $(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/
Dasync_raid6_recov.c27 u8 *a, *b, *c; in async_sum_product() local
71 c = page_address(dest); in async_sum_product()
76 *c++ = ax ^ bx; in async_sum_product()

12