Lines Matching refs:MPI
53 typedef struct gcry_mpi *MPI; typedef
59 MPI mpi_alloc(unsigned nlimbs);
60 MPI mpi_alloc_secure(unsigned nlimbs);
61 MPI mpi_alloc_like(MPI a);
62 void mpi_free(MPI a);
63 int mpi_resize(MPI a, unsigned nlimbs);
64 int mpi_copy(MPI *copy, const MPI a);
65 void mpi_clear(MPI a);
66 int mpi_set(MPI w, MPI u);
67 int mpi_set_ui(MPI w, ulong u);
68 MPI mpi_alloc_set_ui(unsigned long u);
69 void mpi_m_check(MPI a);
70 void mpi_swap(MPI a, MPI b);
73 MPI do_encode_md(const void *sha_buffer, unsigned nbits);
74 MPI mpi_read_raw_data(const void *xbuffer, size_t nbytes);
75 MPI mpi_read_from_buffer(const void *buffer, unsigned *ret_nread);
76 MPI mpi_read_raw_from_sgl(struct scatterlist *sgl, unsigned int len);
77 int mpi_fromstr(MPI val, const char *str);
78 u32 mpi_get_keyid(MPI a, u32 *keyid);
79 void *mpi_get_buffer(MPI a, unsigned *nbytes, int *sign);
80 int mpi_read_buffer(MPI a, uint8_t *buf, unsigned buf_len, unsigned *nbytes,
82 void *mpi_get_secure_buffer(MPI a, unsigned *nbytes, int *sign);
83 int mpi_set_buffer(MPI a, const void *buffer, unsigned nbytes, int sign);
84 int mpi_write_to_sgl(MPI a, struct scatterlist *sg, unsigned *nbytes,
90 int mpi_add_ui(MPI w, MPI u, ulong v);
91 int mpi_add(MPI w, MPI u, MPI v);
92 int mpi_addm(MPI w, MPI u, MPI v, MPI m);
93 int mpi_sub_ui(MPI w, MPI u, ulong v);
94 int mpi_sub(MPI w, MPI u, MPI v);
95 int mpi_subm(MPI w, MPI u, MPI v, MPI m);
98 int mpi_mul_ui(MPI w, MPI u, ulong v);
99 int mpi_mul_2exp(MPI w, MPI u, ulong cnt);
100 int mpi_mul(MPI w, MPI u, MPI v);
101 int mpi_mulm(MPI w, MPI u, MPI v, MPI m);
104 ulong mpi_fdiv_r_ui(MPI rem, MPI dividend, ulong divisor);
105 int mpi_fdiv_r(MPI rem, MPI dividend, MPI divisor);
106 int mpi_fdiv_q(MPI quot, MPI dividend, MPI divisor);
107 int mpi_fdiv_qr(MPI quot, MPI rem, MPI dividend, MPI divisor);
108 int mpi_tdiv_r(MPI rem, MPI num, MPI den);
109 int mpi_tdiv_qr(MPI quot, MPI rem, MPI num, MPI den);
110 int mpi_tdiv_q_2exp(MPI w, MPI u, unsigned count);
111 int mpi_divisible_ui(const MPI dividend, ulong divisor);
114 int mpi_gcd(MPI g, const MPI a, const MPI b);
117 int mpi_pow(MPI w, MPI u, MPI v);
118 int mpi_powm(MPI res, MPI base, MPI exp, MPI mod);
121 int mpi_mulpowm(MPI res, MPI *basearray, MPI *exparray, MPI mod);
124 int mpi_cmp_ui(MPI u, ulong v);
125 int mpi_cmp(MPI u, MPI v);
128 int mpi_getbyte(MPI a, unsigned idx);
129 void mpi_putbyte(MPI a, unsigned idx, int value);
130 unsigned mpi_trailing_zeros(MPI a);
133 void mpi_normalize(MPI a);
134 unsigned mpi_get_nbits(MPI a);
135 int mpi_test_bit(MPI a, unsigned n);
136 int mpi_set_bit(MPI a, unsigned n);
137 int mpi_set_highbit(MPI a, unsigned n);
138 void mpi_clear_highbit(MPI a, unsigned n);
139 void mpi_clear_bit(MPI a, unsigned n);
140 int mpi_rshift(MPI x, MPI a, unsigned n);
143 int mpi_invm(MPI x, MPI u, MPI v);
154 static inline unsigned int mpi_get_size(MPI a) in mpi_get_size()