Searched refs:nlimbs (Results 1 - 7 of 7) sorted by relevance
/linux-4.1.27/lib/mpi/ |
H A D | mpiutil.c | 30 MPI mpi_alloc(unsigned nlimbs) mpi_alloc() argument 38 if (nlimbs) { mpi_alloc() 39 a->d = mpi_alloc_limb_space(nlimbs); mpi_alloc() 48 a->alloced = nlimbs; mpi_alloc() 49 a->nlimbs = 0; mpi_alloc() 57 mpi_ptr_t mpi_alloc_limb_space(unsigned nlimbs) mpi_alloc_limb_space() argument 59 size_t len = nlimbs * sizeof(mpi_limb_t); mpi_alloc_limb_space() 75 void mpi_assign_limb_space(MPI a, mpi_ptr_t ap, unsigned nlimbs) mpi_assign_limb_space() argument 79 a->alloced = nlimbs; mpi_assign_limb_space() 86 int mpi_resize(MPI a, unsigned nlimbs) mpi_resize() argument 90 if (nlimbs <= a->alloced) mpi_resize() 94 p = kmalloc(nlimbs * sizeof(mpi_limb_t), GFP_KERNEL); mpi_resize() 101 a->d = kzalloc(nlimbs * sizeof(mpi_limb_t), GFP_KERNEL); mpi_resize() 105 a->alloced = nlimbs; mpi_resize()
|
H A D | mpicoder.c | 36 unsigned nbits, nlimbs; mpi_read_raw_data() local 55 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); mpi_read_raw_data() 56 val = mpi_alloc(nlimbs); mpi_read_raw_data() 61 val->nlimbs = nlimbs; mpi_read_raw_data() 66 for (j = nlimbs; j > 0; j--) { mpi_read_raw_data() 84 unsigned nbits, nbytes, nlimbs, nread = 0; mpi_read_from_buffer() local 100 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); mpi_read_from_buffer() 101 val = mpi_alloc(nlimbs); mpi_read_from_buffer() 107 j = val->nlimbs = nlimbs; mpi_read_from_buffer() 147 *nbytes = n = a->nlimbs * BYTES_PER_MPI_LIMB; mpi_get_buffer() 154 for (i = a->nlimbs - 1; i >= 0; i--) { mpi_get_buffer() 193 int nlimbs; mpi_set_buffer() local 196 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); mpi_set_buffer() 197 if (RESIZE_IF_NEEDED(a, nlimbs) < 0) mpi_set_buffer() 251 a->nlimbs = i; mpi_set_buffer() 253 if (i != nlimbs) { mpi_set_buffer() 255 nlimbs); mpi_set_buffer()
|
H A D | mpi-bit.c | 32 for (; a->nlimbs && !a->d[a->nlimbs - 1]; a->nlimbs--) mpi_normalize() 45 if (a->nlimbs) { mpi_get_nbits() 46 mpi_limb_t alimb = a->d[a->nlimbs - 1]; mpi_get_nbits() 51 n = BITS_PER_MPI_LIMB - n + (a->nlimbs - 1) * BITS_PER_MPI_LIMB; mpi_get_nbits()
|
H A D | mpi-cmp.c | 28 if (!u->nlimbs && !limb) mpi_cmp_ui() 32 if (u->nlimbs > 1) mpi_cmp_ui() 51 usize = u->nlimbs; mpi_cmp() 52 vsize = v->nlimbs; mpi_cmp()
|
H A D | mpi-pow.c | 52 esize = exp->nlimbs; mpi_powm() 53 msize = mod->nlimbs; mpi_powm() 68 res->nlimbs = (msize == 1 && mod->d[0] == 1) ? 0 : 1; mpi_powm() 86 bsize = base->nlimbs; mpi_powm() 106 res->nlimbs = 0; mpi_powm() 303 res->nlimbs = rsize; mpi_powm()
|
H A D | mpi-internal.h | 162 mpi_ptr_t mpi_alloc_limb_space(unsigned nlimbs); 164 void mpi_assign_limb_space(MPI a, mpi_ptr_t ap, unsigned nlimbs);
|
/linux-4.1.27/include/linux/ |
H A D | mpi.h | 49 int nlimbs; /* number of valid limbs */ member in struct:gcry_mpi 60 #define mpi_get_nlimbs(a) ((a)->nlimbs) 64 MPI mpi_alloc(unsigned nlimbs); 65 MPI mpi_alloc_secure(unsigned nlimbs); 68 int mpi_resize(MPI a, unsigned nlimbs);
|
Completed in 203 milliseconds