Home
last modified time | relevance | path

Searched refs:n (Results 1 – 25 of 34) sorted by relevance

12

/crypto/
Daes_generic.c59 static inline u8 byte(const u32 x, const unsigned n) in byte() argument
61 return x >> (n << 3); in byte()
1153 #define f_rn(bo, bi, n, k) do { \ argument
1154 bo[n] = crypto_ft_tab[0][byte(bi[n], 0)] ^ \
1155 crypto_ft_tab[1][byte(bi[(n + 1) & 3], 1)] ^ \
1156 crypto_ft_tab[2][byte(bi[(n + 2) & 3], 2)] ^ \
1157 crypto_ft_tab[3][byte(bi[(n + 3) & 3], 3)] ^ *(k + n); \
1168 #define f_rl(bo, bi, n, k) do { \ argument
1169 bo[n] = crypto_fl_tab[0][byte(bi[n], 0)] ^ \
1170 crypto_fl_tab[1][byte(bi[(n + 1) & 3], 1)] ^ \
[all …]
Dtwofish_generic.c53 #define ENCROUND(n, a, b, c, d) \ argument
55 x += y; y += x + ctx->k[2 * (n) + 1]; \
56 (c) ^= x + ctx->k[2 * (n)]; \
60 #define DECROUND(n, a, b, c, d) \ argument
63 (d) ^= y + ctx->k[2 * (n) + 1]; \
66 (c) ^= (x + ctx->k[2 * (n)])
71 #define ENCCYCLE(n) \ argument
72 ENCROUND (2 * (n), a, b, c, d); \
73 ENCROUND (2 * (n) + 1, c, d, a, b)
75 #define DECCYCLE(n) \ argument
[all …]
Drsa.c16 MPI n; member
28 if (mpi_cmp_ui(m, 0) < 0 || mpi_cmp(m, key->n) >= 0) in _rsa_enc()
32 return mpi_powm(c, m, key->e, key->n); in _rsa_enc()
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()
65 if (unlikely(!pkey->n || !pkey->e)) { in rsa_enc()
104 if (unlikely(!pkey->n || !pkey->d)) { in rsa_dec()
135 mpi_free(key->n); in rsa_free_mpi_key()
138 key->n = NULL; in rsa_free_mpi_key()
174 mpi_key->n = mpi_read_raw_data(raw_key.n, raw_key.n_sz); in rsa_set_pub_key()
[all …]
Dablkcipher.c70 unsigned int n) in ablkcipher_done_slow() argument
75 if (len_this_page > n) in ablkcipher_done_slow()
76 len_this_page = n; in ablkcipher_done_slow()
77 scatterwalk_advance(&walk->out, n); in ablkcipher_done_slow()
78 if (n == len_this_page) in ablkcipher_done_slow()
80 n -= len_this_page; in ablkcipher_done_slow()
86 unsigned int n) in ablkcipher_done_fast() argument
88 scatterwalk_advance(&walk->in, n); in ablkcipher_done_fast()
89 scatterwalk_advance(&walk->out, n); in ablkcipher_done_fast()
99 unsigned int n; /* bytes processed */ in ablkcipher_walk_done() local
[all …]
Dblkcipher.c79 unsigned int n) in blkcipher_done_fast() argument
83 memcpy(walk->dst.virt.addr, walk->page, n); in blkcipher_done_fast()
91 scatterwalk_advance(&walk->in, n); in blkcipher_done_fast()
92 scatterwalk_advance(&walk->out, n); in blkcipher_done_fast()
98 unsigned int n; /* bytes processed */ in blkcipher_walk_done() local
104 n = walk->nbytes - err; in blkcipher_walk_done()
105 walk->total -= n; in blkcipher_walk_done()
109 blkcipher_done_fast(walk, n); in blkcipher_walk_done()
116 blkcipher_done_slow(walk, n); in blkcipher_walk_done()
144 unsigned int n; in blkcipher_next_slow() local
[all …]
Decrdsa.c115 vli_cmp(r, ctx->curve->n, ndigits) == 1 || in ecrdsa_verify()
117 vli_cmp(s, ctx->curve->n, ndigits) == 1) in ecrdsa_verify()
123 if (vli_cmp(e, ctx->curve->n, ndigits) == 1) in ecrdsa_verify()
124 vli_sub(e, e, ctx->curve->n, ndigits); in ecrdsa_verify()
129 vli_mod_inv(v, e, ctx->curve->n, ndigits); in ecrdsa_verify()
132 vli_mod_mult_slow(z1, s, v, ctx->curve->n, ndigits); in ecrdsa_verify()
133 vli_sub(_r, ctx->curve->n, r, ndigits); in ecrdsa_verify()
134 vli_mod_mult_slow(z2, _r, v, ctx->curve->n, ndigits); in ecrdsa_verify()
139 if (vli_cmp(cc.x, ctx->curve->n, ndigits) == 1) in ecrdsa_verify()
140 vli_sub(cc.x, cc.x, ctx->curve->n, ndigits); in ecrdsa_verify()
Decrdsa_defs.h56 .n = cp256a_n,
89 .n = cp256b_n,
126 .n = cp256c_n,
175 .n = tc512a_n,
220 .n = tc512b_n,
Dskcipher.c106 unsigned int n = walk->nbytes; in skcipher_walk_done() local
109 if (!n) in skcipher_walk_done()
113 n -= err; in skcipher_walk_done()
114 nbytes = walk->total - n; in skcipher_walk_done()
128 memcpy(walk->dst.virt.addr, walk->page, n); in skcipher_walk_done()
141 n = skcipher_done_slow(walk, n); in skcipher_walk_done()
150 scatterwalk_advance(&walk->in, n); in skcipher_walk_done()
151 scatterwalk_advance(&walk->out, n); in skcipher_walk_done()
230 unsigned n; in skcipher_next_slow() local
244 n = bsize; in skcipher_next_slow()
[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()
44 static inline u32 gg(unsigned int n, u32 e, u32 f, u32 g) in gg() argument
46 return (n < 16) ? (e ^ f ^ g) : ((e & f) | ((~e) & g)); in gg()
49 static inline u32 t(unsigned int n) in t() argument
51 return (n < 16) ? SM3_T1 : SM3_T2; in t()
Dvmac.c497 unsigned int n; in vmac_update() local
501 n = min(len, VMAC_NONCEBYTES - dctx->nonce_size); in vmac_update()
502 memcpy(&dctx->nonce.bytes[dctx->nonce_size], p, n); in vmac_update()
503 dctx->nonce_size += n; in vmac_update()
504 p += n; in vmac_update()
505 len -= n; in vmac_update()
509 n = min(len, VMAC_NHBYTES - dctx->partial_size); in vmac_update()
510 memcpy(&dctx->partial[dctx->partial_size], p, n); in vmac_update()
511 dctx->partial_size += n; in vmac_update()
512 p += n; in vmac_update()
[all …]
Dghash-generic.c88 int n = min(srclen, dctx->bytes); in ghash_update() local
91 dctx->bytes -= n; in ghash_update()
92 srclen -= n; in ghash_update()
94 while (n--) in ghash_update()
Dtwofish_common.c535 #define CALC_K(a, j, k, l, m, n) \ argument
537 y = CALC_K_2 (m, n, m, n, 4); \
548 #define CALC_K192(a, j, k, l, m, n) \ argument
550 y = CALC_K192_2 (n, n, m, m, 4); \
561 #define CALC_K256(a, j, k, l, m, n) \ argument
563 y = CALC_K256_2 (m, n, 4); \
Dtea.c59 u32 y, z, n, sum = 0; in tea_encrypt() local
73 n = TEA_ROUNDS; in tea_encrypt()
75 while (n-- > 0) { in tea_encrypt()
87 u32 y, z, n, sum; in tea_decrypt() local
103 n = TEA_ROUNDS; in tea_decrypt()
105 while (n-- > 0) { in tea_decrypt()
Dalgapi.c90 struct crypto_spawn *spawn, *n; in crypto_more_spawns() local
96 n = list_next_entry(spawn, list); in crypto_more_spawns()
98 if (spawn->alg && &n->list != stack && !n->alg) in crypto_more_spawns()
99 n->alg = (n->list.next == stack) ? alg : in crypto_more_spawns()
100 &list_next_entry(n, list)->inst->alg; in crypto_more_spawns()
104 return &n->list == stack ? top : &n->inst->alg.cra_users; in crypto_more_spawns()
133 struct crypto_spawn *spawn, *n; in crypto_remove_spawns() local
140 list_for_each_entry_safe(spawn, n, spawns, list) { in crypto_remove_spawns()
181 list_for_each_entry_safe(spawn, n, &secondary_spawns, list) { in crypto_remove_spawns()
336 struct crypto_alg *n; in crypto_remove_final() local
[all …]
Decc_curve_defs.h26 .n = nist_p192_n,
52 .n = nist_p256_n,
Dfcrypt.c58 #define ror56(hi, lo, n) \ argument
60 u32 t = lo & ((1 << n) - 1); \
61 lo = (lo >> n) | ((hi & ((1 << n) - 1)) << (32 - n)); \
62 hi = (hi >> n) | (t << (24-n)); \
66 #define ror56_64(k, n) \ argument
68 k = (k >> n) | ((k & ((1 << n) - 1)) << (56 - n)); \
Djitterentropy-kcapi.c79 void jent_memcpy(void *dest, const void *src, unsigned int n) in jent_memcpy() argument
81 memcpy(dest, src, n); in jent_memcpy()
Dblowfish_common.c304 #define ROUND(a, b, n) ({ b ^= P[n]; a ^= bf_F(b); }) argument
Drsapubkey.asn12 n INTEGER ({ rsa_get_n }),
Dblowfish_generic.c34 #define ROUND(a, b, n) ({ b ^= P[n]; a ^= bf_F(b); }) argument
Drsaprivkey.asn13 n INTEGER ({ rsa_get_n }),
Daegis128-neon-inner.c22 void *memcpy(void *dest, const void *src, size_t n);
23 void *memset(void *s, int c, size_t n);
Daf_alg.c396 ssize_t n; in af_alg_make_sg() local
399 n = iov_iter_get_pages(iter, sgl->pages, len, ALG_MAX_PAGES, &off); in af_alg_make_sg()
400 if (n < 0) in af_alg_make_sg()
401 return n; in af_alg_make_sg()
403 npages = (off + n + PAGE_SIZE - 1) >> PAGE_SHIFT; in af_alg_make_sg()
409 for (i = 0, len = n; i < npages; i++) { in af_alg_make_sg()
420 return n; in af_alg_make_sg()
/crypto/asymmetric_keys/
Dasymmetric_type.c336 int n; in asymmetric_key_describe() local
347 n = kid->len; in asymmetric_key_describe()
349 if (n > 4) { in asymmetric_key_describe()
350 p += n - 4; in asymmetric_key_describe()
351 n = 4; in asymmetric_key_describe()
353 seq_printf(m, "%*phN", n, p); in asymmetric_key_describe()
Dpublic_key.c68 int n; in software_key_determine_akcipher() local
76 n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME, in software_key_determine_akcipher()
80 n = snprintf(alg_name, CRYPTO_MAX_ALG_NAME, in software_key_determine_akcipher()
83 return n >= CRYPTO_MAX_ALG_NAME ? -EINVAL : 0; in software_key_determine_akcipher()

12