/crypto/ |
D | cast5_generic.c | 295 #define F1(D, m, r) ((I = ((m) + (D))), (I = rol32(I, (r))), \ argument 297 #define F2(D, m, r) ((I = ((m) ^ (D))), (I = rol32(I, (r))), \ argument 299 #define F3(D, m, r) ((I = ((m) - (D))), (I = rol32(I, (r))), \ argument 305 u32 l, r, t; in __cast5_encrypt() local 317 r = get_unaligned_be32(inbuf + 4); in __cast5_encrypt() 327 t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]); in __cast5_encrypt() 328 t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]); in __cast5_encrypt() 329 t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]); in __cast5_encrypt() 330 t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]); in __cast5_encrypt() 331 t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]); in __cast5_encrypt() [all …]
|
D | gf128mul.c | 159 void gf128mul_x8_ble(le128 *r, const le128 *x) in gf128mul_x8_ble() argument 165 r->a = cpu_to_le64((a << 8) | (b >> 56)); in gf128mul_x8_ble() 166 r->b = cpu_to_le64((b << 8) ^ _tt); in gf128mul_x8_ble() 170 void gf128mul_lle(be128 *r, const be128 *b) in gf128mul_lle() argument 175 p[0] = *r; in gf128mul_lle() 179 memset(r, 0, sizeof(*r)); in gf128mul_lle() 184 be128_xor(r, r, &p[0]); in gf128mul_lle() 186 be128_xor(r, r, &p[1]); in gf128mul_lle() 188 be128_xor(r, r, &p[2]); in gf128mul_lle() 190 be128_xor(r, r, &p[3]); in gf128mul_lle() [all …]
|
D | michael_mic.c | 18 u32 l, r; member 25 u32 l, r; member 34 #define michael_block(l, r) \ argument 36 r ^= rol32(l, 17); \ 37 l += r; \ 38 r ^= xswap(l); \ 39 l += r; \ 40 r ^= rol32(l, 3); \ 41 l += r; \ 42 r ^= ror32(l, 2); \ [all …]
|
D | khazad.c | 761 int r; in khazad_setkey() local 770 for (r = 0; r <= KHAZAD_ROUNDS; r++) { in khazad_setkey() 771 ctx->E[r] = T0[(int)(K1 >> 56) ] ^ in khazad_setkey() 779 c[r] ^ K2; in khazad_setkey() 781 K1 = ctx->E[r]; in khazad_setkey() 785 for (r = 1; r < KHAZAD_ROUNDS; r++) { in khazad_setkey() 786 K1 = ctx->E[KHAZAD_ROUNDS - r]; in khazad_setkey() 787 ctx->D[r] = T0[(int)S[(int)(K1 >> 56) ] & 0xff] ^ in khazad_setkey() 807 int r; in khazad_crypt() local 812 for (r = 1; r < KHAZAD_ROUNDS; r++) { in khazad_crypt() [all …]
|
D | anubis.c | 467 int N, R, i, r; in anubis_setkey() local 490 for (r = 0; r <= R; r++) { in anubis_setkey() 522 ctx->E[r][0] = K0; in anubis_setkey() 523 ctx->E[r][1] = K1; in anubis_setkey() 524 ctx->E[r][2] = K2; in anubis_setkey() 525 ctx->E[r][3] = K3; in anubis_setkey() 530 if (r == R) in anubis_setkey() 545 kappa[0] = inter[0] ^ rc[r]; in anubis_setkey() 558 for (r = 1; r < R; r++) { in anubis_setkey() 560 u32 v = ctx->E[R - r][i]; in anubis_setkey() [all …]
|
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]]; \ 52 a = a + b + m[blake2b_sigma[r][2*i+1]]; \ 58 #define ROUND(r) \ argument 60 G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \ 61 G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \ 62 G(r,2,v[ 2],v[ 6],v[10],v[14]); \ 63 G(r,3,v[ 3],v[ 7],v[11],v[15]); \ 64 G(r,4,v[ 0],v[ 5],v[10],v[15]); \ 65 G(r,5,v[ 1],v[ 6],v[11],v[12]); \ [all …]
|
D | fcrypt.c | 237 __be32 l, r; in fcrypt_encrypt() member 242 F_ENCRYPT(X.r, X.l, ctx->sched[0x0]); in fcrypt_encrypt() 243 F_ENCRYPT(X.l, X.r, ctx->sched[0x1]); in fcrypt_encrypt() 244 F_ENCRYPT(X.r, X.l, ctx->sched[0x2]); in fcrypt_encrypt() 245 F_ENCRYPT(X.l, X.r, ctx->sched[0x3]); in fcrypt_encrypt() 246 F_ENCRYPT(X.r, X.l, ctx->sched[0x4]); in fcrypt_encrypt() 247 F_ENCRYPT(X.l, X.r, ctx->sched[0x5]); in fcrypt_encrypt() 248 F_ENCRYPT(X.r, X.l, ctx->sched[0x6]); in fcrypt_encrypt() 249 F_ENCRYPT(X.l, X.r, ctx->sched[0x7]); in fcrypt_encrypt() 250 F_ENCRYPT(X.r, X.l, ctx->sched[0x8]); in fcrypt_encrypt() [all …]
|
D | ecc.c | 532 u64 r[ECC_MAX_DIGITS * 2]; in vli_mmod_special() local 534 vli_set(r, product, ndigits * 2); in vli_mmod_special() 535 while (!vli_is_zero(r + ndigits, ndigits)) { in vli_mmod_special() 536 vli_umult(t, r + ndigits, c, ndigits); in vli_mmod_special() 537 vli_clear(r + ndigits, ndigits); in vli_mmod_special() 538 vli_add(r, r, t, ndigits * 2); in vli_mmod_special() 542 while (vli_cmp(r, t, ndigits * 2) >= 0) in vli_mmod_special() 543 vli_sub(r, r, t, ndigits * 2); in vli_mmod_special() 544 vli_set(result, r, ndigits); in vli_mmod_special() 566 u64 r[ECC_MAX_DIGITS * 2]; in vli_mmod_special2() local [all …]
|
D | ecdsa.c | 28 u64 r[ECC_MAX_DIGITS]; member 81 return ecdsa_get_signature_rs(sig->r, hdrlen, tag, value, vlen, in ecdsa_get_signature_r() 94 static int _ecdsa_verify(struct ecc_ctx *ctx, const u64 *hash, const u64 *r, const u64 *s) in _ecdsa_verify() argument 106 if (vli_is_zero(r, ndigits) || vli_cmp(r, curve->n, ndigits) >= 0 || in _ecdsa_verify() 119 vli_mod_mult_slow(u2, r, s1, curve->n, ndigits); in _ecdsa_verify() 128 if (!vli_cmp(res.x, r, ndigits)) in _ecdsa_verify() 180 ret = _ecdsa_verify(ctx, hash, sig_ctx.r, sig_ctx.s); in ecdsa_verify()
|
D | ecrdsa.c | 78 u64 r[ECRDSA_MAX_DIGITS]; /* witness (r) */ in ecrdsa_verify() local 112 vli_from_be64(r, sig + ndigits * sizeof(u64), ndigits); in ecrdsa_verify() 115 if (vli_is_zero(r, ndigits) || in ecrdsa_verify() 116 vli_cmp(r, ctx->curve->n, ndigits) >= 0 || in ecrdsa_verify() 134 vli_sub(_r, ctx->curve->n, r, ndigits); in ecrdsa_verify() 144 if (!vli_cmp(cc.x, r, ndigits)) in ecrdsa_verify()
|
D | cast6_generic.c | 27 #define F1(D, r, m) ((I = ((m) + (D))), (I = rol32(I, (r))), \ argument 29 #define F2(D, r, m) ((I = ((m) ^ (D))), (I = rol32(I, (r))), \ argument 31 #define F3(D, r, m) ((I = ((m) - (D))), (I = rol32(I, (r))), \ argument
|
D | wp512.c | 783 int i, r; in wp512_process_buffer() local 802 for (r = 0; r < WHIRLPOOL_ROUNDS; r++) { in wp512_process_buffer() 812 rc[r]; in wp512_process_buffer()
|
D | adiantum.c | 186 static inline void le128_add(le128 *r, const le128 *v1, const le128 *v2) in le128_add() argument 191 r->b = cpu_to_le64(x + y); in le128_add() 192 r->a = cpu_to_le64(le64_to_cpu(v1->a) + le64_to_cpu(v2->a) + in le128_add() 197 static inline void le128_sub(le128 *r, const le128 *v1, const le128 *v2) in le128_sub() argument 202 r->b = cpu_to_le64(x - y); in le128_sub() 203 r->a = cpu_to_le64(le64_to_cpu(v1->a) - le64_to_cpu(v2->a) - in le128_sub()
|
D | ecdsasignature.asn1 | 2 r INTEGER ({ ecdsa_get_signature_r }),
|
D | streebog_generic.c | 935 struct streebog_uint512 *r) in streebog_add512() argument 947 r->qword[i] = cpu_to_le64(sum); in streebog_add512()
|
/crypto/asymmetric_keys/ |
D | asym_tpm.c | 511 int r; in tpm_key_decrypt() local 521 r = tpm_buf_init(&tb, 0, 0); in tpm_key_decrypt() 522 if (r) in tpm_key_decrypt() 523 return r; in tpm_key_decrypt() 528 r = tpm_loadkey2(&tb, SRKHANDLE, srkauth, in tpm_key_decrypt() 530 if (r < 0) { in tpm_key_decrypt() 531 pr_devel("loadkey2 failed (%d)\n", r); in tpm_key_decrypt() 538 r = tpm_unbind(&tb, keyhandle, keyauth, in tpm_key_decrypt() 540 if (r < 0) in tpm_key_decrypt() 541 pr_devel("tpm_unbind failed (%d)\n", r); in tpm_key_decrypt() [all …]
|