Home
last modified time | relevance | path

Searched refs:ndigits (Results 1 – 9 of 9) sorted by relevance

/Linux-v5.4/crypto/
Decc.c58 static u64 *ecc_alloc_digits_space(unsigned int ndigits) in ecc_alloc_digits_space() argument
60 size_t len = ndigits * sizeof(u64); in ecc_alloc_digits_space()
73 static struct ecc_point *ecc_alloc_point(unsigned int ndigits) in ecc_alloc_point() argument
80 p->x = ecc_alloc_digits_space(ndigits); in ecc_alloc_point()
84 p->y = ecc_alloc_digits_space(ndigits); in ecc_alloc_point()
88 p->ndigits = ndigits; in ecc_alloc_point()
109 static void vli_clear(u64 *vli, unsigned int ndigits) in vli_clear() argument
113 for (i = 0; i < ndigits; i++) in vli_clear()
118 bool vli_is_zero(const u64 *vli, unsigned int ndigits) in vli_is_zero() argument
122 for (i = 0; i < ndigits; i++) { in vli_is_zero()
[all …]
Decrdsa.c76 unsigned int ndigits = req->dst_len / sizeof(u64); in ecrdsa_verify() local
84 struct ecc_point cc = ECC_POINT_INIT(s, e, ndigits); /* reuse s, e */ in ecrdsa_verify()
96 req->dst_len != ctx->curve->g.ndigits * sizeof(u64) || in ecrdsa_verify()
97 ctx->pub_key.ndigits != ctx->curve->g.ndigits || in ecrdsa_verify()
110 vli_from_be64(s, sig, ndigits); in ecrdsa_verify()
111 vli_from_be64(r, sig + ndigits * sizeof(u64), ndigits); in ecrdsa_verify()
114 if (vli_is_zero(r, ndigits) || in ecrdsa_verify()
115 vli_cmp(r, ctx->curve->n, ndigits) == 1 || in ecrdsa_verify()
116 vli_is_zero(s, ndigits) || in ecrdsa_verify()
117 vli_cmp(s, ctx->curve->n, ndigits) == 1) in ecrdsa_verify()
[all …]
Decc.h46 u8 ndigits; member
49 #define ECC_POINT_INIT(x, y, ndigits) (struct ecc_point) { x, y, ndigits } argument
83 int ecc_is_key_valid(unsigned int curve_id, unsigned int ndigits,
98 int ecc_gen_privkey(unsigned int curve_id, unsigned int ndigits, u64 *privkey);
111 int ecc_make_pub_key(const unsigned int curve_id, unsigned int ndigits,
129 int crypto_ecdh_shared_secret(unsigned int curve_id, unsigned int ndigits,
156 bool vli_is_zero(const u64 *vli, unsigned int ndigits);
168 int vli_cmp(const u64 *left, const u64 *right, unsigned int ndigits);
183 unsigned int ndigits);
192 void vli_from_be64(u64 *dest, const void *src, unsigned int ndigits);
[all …]
Decdh.c17 unsigned int ndigits; member
40 unsigned int ndigits; in ecdh_set_secret() local
45 ndigits = ecdh_supported_curve(params.curve_id); in ecdh_set_secret()
46 if (!ndigits) in ecdh_set_secret()
50 ctx->ndigits = ndigits; in ecdh_set_secret()
53 return ecc_gen_privkey(ctx->curve_id, ctx->ndigits, in ecdh_set_secret()
56 if (ecc_is_key_valid(ctx->curve_id, ctx->ndigits, in ecdh_set_secret()
75 nbytes = ctx->ndigits << ECC_DIGITS_TO_BYTES_SHIFT; in ecdh_compute_value()
102 ret = crypto_ecdh_shared_secret(ctx->curve_id, ctx->ndigits, in ecdh_compute_value()
108 ret = ecc_make_pub_key(ctx->curve_id, ctx->ndigits, in ecdh_compute_value()
[all …]
Decrdsa_defs.h53 .ndigits = 256 / 64,
86 .ndigits = 256 / 64,
123 .ndigits = 256 / 64,
172 .ndigits = 512 / 64,
217 .ndigits = 512 / 64,
Decc_curve_defs.h23 .ndigits = 3,
49 .ndigits = 4,
/Linux-v5.4/net/bluetooth/
Decdh_helper.c44 static inline void swap_digits(u64 *in, u64 *out, unsigned int ndigits) in swap_digits() argument
48 for (i = 0; i < ndigits; i++) in swap_digits()
49 out[i] = __swab64(in[ndigits - 1 - i]); in swap_digits()
/Linux-v5.4/scripts/mod/
Dfile2alias.c268 int ndigits; in do_usb_entry_multi() local
285 for (ndigits = 0 ; ndigits < sizeof(bcdDevice_lo) * 2 ; ndigits++) { in do_usb_entry_multi()
286 clo = (devlo >> (ndigits << 2)) & 0xf; in do_usb_entry_multi()
287 chi = ((devhi > 0x9999 ? 0x9999 : devhi) >> (ndigits << 2)) & 0xf; in do_usb_entry_multi()
302 for (ndigits = sizeof(bcdDevice_lo) * 2 - 1; devlo <= devhi; ndigits--) { in do_usb_entry_multi()
310 if (devlo == devhi || !ndigits) { in do_usb_entry_multi()
311 do_usb_entry(symval, devlo, ndigits, clo, chi, max, mod); in do_usb_entry_multi()
319 ndigits, clo, max, max, mod); in do_usb_entry_multi()
325 ndigits, 0x0, chi, max, mod); in do_usb_entry_multi()
/Linux-v5.4/lib/
Dbitmap.c380 int c, old_c, totaldigits, ndigits, nchunks, nbits; in __bitmap_parse() local
389 ndigits = totaldigits; in __bitmap_parse()
430 if (ndigits == totaldigits) in __bitmap_parse()