Home
last modified time | relevance | path

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

/crypto/
Dmd5.c42 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 …]
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, 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 …]
Dsm3.c38 #define R(i, a, b, c, d, e, f, g, h, t, w1, w2) \ argument
42 d += FF ## i(a, b, c) + ss2 + ((w1) ^ (w2)); \
49 #define R1(a, b, c, d, e, f, g, h, t, w1, w2) \ argument
50 R(1, a, b, c, d, e, f, g, h, t, w1, w2)
51 #define R2(a, b, c, d, e, f, g, h, t, w1, w2) \ argument
52 R(2, a, b, c, d, e, f, g, h, t, w1, w2)
74 u32 a, b, c, d, e, f, g, h, ss1, ss2; in sm3_transform() local
78 c = sctx->state[2]; in sm3_transform()
85 R1(a, b, c, d, e, f, g, h, K[0], I(0), I(4)); in sm3_transform()
86 R1(d, a, b, c, h, e, f, g, K[1], I(1), I(5)); in sm3_transform()
[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.c31 static int _rsa_enc(const struct rsa_mpi_key *key, MPI c, MPI m) in _rsa_enc() argument
38 return mpi_powm(c, m, key->e, key->n); in _rsa_enc()
48 static int _rsa_dec_crt(const struct rsa_mpi_key *key, MPI m_or_m1_or_h, MPI c) in _rsa_dec_crt() argument
54 if (mpi_cmp_ui(c, 0) < 0 || mpi_cmp(c, key->n) >= 0) in _rsa_dec_crt()
63 ret = mpi_powm(m_or_m1_or_h, c, key->dp, key->p); in _rsa_dec_crt()
68 ret = mpi_powm(m2, c, key->dq, key->q); in _rsa_dec_crt()
97 MPI m, c = mpi_alloc(0); in rsa_enc() local
101 if (!c) in rsa_enc()
114 ret = _rsa_enc(pkey, c, m); in rsa_enc()
118 ret = mpi_write_to_sgl(c, req->dst, req->dst_len, &sign); 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 …]
Dblake2b_generic.c46 #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); \
Dcast5_generic.c303 void __cast5_encrypt(struct cast5_ctx *c, u8 *outbuf, const u8 *inbuf) in __cast5_encrypt() argument
310 Km = c->Km; in __cast5_encrypt()
311 Kr = c->Kr; in __cast5_encrypt()
339 if (!(c->rr)) { in __cast5_encrypt()
358 void __cast5_decrypt(struct cast5_ctx *c, u8 *outbuf, const u8 *inbuf) in __cast5_decrypt() argument
365 Km = c->Km; in __cast5_decrypt()
366 Kr = c->Kr; in __cast5_decrypt()
371 if (!(c->rr)) { in __cast5_decrypt()
477 struct cast5_ctx *c = crypto_tfm_ctx(tfm); in cast5_setkey() local
484 c->rr = key_len <= 10 ? 1 : 0; in cast5_setkey()
[all …]
Dfips140-module.c684 u8 c; in crypto_inc_byte() local
687 c = *--b + 1; in crypto_inc_byte()
688 *b = c; in crypto_inc_byte()
689 if (c) in crypto_inc_byte()
697 u32 c; in crypto_inc() local
702 c = be32_to_cpu(*--b) + 1; in crypto_inc()
703 *b = cpu_to_be32(c); in crypto_inc()
704 if (likely(c)) in crypto_inc()
DMakefile34 $(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
53 $(obj)/ecdsasignature.asn1.o: $(obj)/ecdsasignature.asn1.c $(obj)/ecdsasignature.asn1.h
193 $(obj)/ecrdsa_params.asn1.o: $(obj)/ecrdsa_params.asn1.c $(obj)/ecrdsa_params.asn1.h
194 $(obj)/ecrdsa_pub_key.asn1.o: $(obj)/ecrdsa_pub_key.asn1.c $(obj)/ecrdsa_pub_key.asn1.h
242 $(obj)/%-fips.o: $(src)/%.c FORCE
244 $(obj)/lib-%-fips.o: $(srctree)/lib/%.c FORCE
246 $(obj)/lib-crypto-%-fips.o: $(srctree)/lib/crypto/%.c FORCE
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]], \
Dkhazad.c750 static const u64 c[KHAZAD_ROUNDS + 1] = { variable
779 c[r] ^ K2; in khazad_setkey()
Dtestmgr.h155 const unsigned char *c; member
221 .c =
284 .c =
385 .c =
427 .c =
610 .c =
670 .c =
694 .c =
718 .c =
743 .c =
[all …]
Dalgapi.c997 u8 c; in crypto_inc_byte() local
1000 c = *--b + 1; in crypto_inc_byte()
1001 *b = c; in crypto_inc_byte()
1002 if (c) in crypto_inc_byte()
1010 u32 c; in crypto_inc() local
1015 c = be32_to_cpu(*--b) + 1; in crypto_inc()
1016 *b = cpu_to_be32(c); in crypto_inc()
1017 if (likely(c)) in crypto_inc()
Dfcrypt.c225 union lc4 { __be32 l; u8 c[4]; } u; \
227 L ^= sbox0[u.c[0]] ^ sbox1[u.c[1]] ^ sbox2[u.c[2]] ^ sbox3[u.c[3]]; \
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); \
Dcrypto_user_base.c451 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()
Dserpent_generic.c24 #define keyiter(a, b, c, d, i, j) \ argument
25 ({ b ^= d; b ^= c; b ^= a; b ^= PHI ^ i; b = rol32(b, 11); k[j] = b; })
458 void __serpent_encrypt(const void *c, u8 *dst, const u8 *src) in __serpent_encrypt() argument
460 const struct serpent_ctx *ctx = c; in __serpent_encrypt()
517 void __serpent_decrypt(const void *c, u8 *dst, const u8 *src) in __serpent_decrypt() argument
519 const struct serpent_ctx *ctx = c; in __serpent_decrypt()
Dtestmgr.c4078 const char *m, *c; in test_akcipher_one() local
4122 c = vecs->c; in test_akcipher_one()
4129 m = vecs->c; /* signature */ in test_akcipher_one()
4131 c = vecs->m; /* digest */ in test_akcipher_one()
4147 memcpy(xbuf[1], c, c_size); in test_akcipher_one()
4167 if (!vecs->siggen_sigver_test && c) { in test_akcipher_one()
4175 if (memcmp(c, outbuf_enc, c_size) != 0) { in test_akcipher_one()
4198 if (!vecs->siggen_sigver_test && !c) { in test_akcipher_one()
4199 c = outbuf_enc; in test_akcipher_one()
4207 memcpy(xbuf[0], c, c_size); in test_akcipher_one()
Decc.c533 u64 c = -mod[0]; in vli_mmod_special() local
539 vli_umult(t, r + ndigits, c, ndigits); in vli_mmod_special()
DKconfig486 generic c and the assembler implementations.
505 generic c and the assembler implementations.
645 generic c and the assembler implementations.
/crypto/asymmetric_keys/
DMakefile31 $(obj)/x509.asn1.o: $(obj)/x509.asn1.c $(obj)/x509.asn1.h
32 $(obj)/x509_akid.asn1.o: $(obj)/x509_akid.asn1.c $(obj)/x509_akid.asn1.h
43 $(obj)/pkcs8-asn1.o: $(obj)/pkcs8.asn1.c $(obj)/pkcs8.asn1.h
45 clean-files += pkcs8.asn1.c pkcs8.asn1.h
58 $(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h
78 $(obj)/mscode.asn1.o: $(obj)/mscode.asn1.c $(obj)/mscode.asn1.h
/crypto/async_tx/
Dasync_raid6_recov.c28 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()