26 BN_set_negative(
b,
v);
35 BN_ULONG res = BN_get_word(
b);
39 BN_mask_bits(
B, BN_BYTES * 8 - 1);
43 res *= (BN_is_negative(
b) ? -1 : 1);
54 BN_set_negative(
b, -1);
59 char *
tmp = BN_bn2hex(
b);
67 for (
size_t i = 0; res[
i];
i++) {
86 BN_CTX *bn_ctx = BN_CTX_new();
87 BN_mul(
c,
a,
b, bn_ctx);
92 BN_CTX *bn_ctx = BN_CTX_new();
98 BN_CTX *bn_ctx = BN_CTX_new();
99 BN_mod(
c,
a,
b, bn_ctx);
104 BN_CTX *bn_ctx = BN_CTX_new();
105 BN_div(
c,
d,
a,
b, bn_ctx);
115 size_t step = 4 * 8, move = 0;
146 size_t step = 4 * 8, move = 0;
177 size_t step = 4 * 8, move = 0;
203 BN_lshift(
c,
a, nbits);
207 BN_rshift(
c,
a, nbits);
215 return BN_is_zero(
a);
227 BN_CTX *bn_ctx = BN_CTX_new();
228 BN_mod_exp(
c,
a,
b,
m, bn_ctx);
RZ_API char * rz_big_to_hexstr(RzNumBig *b)
RZ_API void rz_big_dec(RzNumBig *a)
RZ_API int rz_big_cmp(RzNumBig *a, RzNumBig *b)
RZ_API void rz_big_assign(RzNumBig *dst, RzNumBig *src)
RZ_API void rz_big_and(RzNumBig *c, RzNumBig *a, RzNumBig *b)
RZ_API void rz_big_xor(RzNumBig *c, RzNumBig *a, RzNumBig *b)
RZ_API void rz_big_fini(RzNumBig *b)
RZ_API void rz_big_add(RzNumBig *c, RzNumBig *a, RzNumBig *b)
RZ_API void rz_big_from_hexstr(RzNumBig *b, const char *str)
RZ_API void rz_big_divmod(RzNumBig *c, RzNumBig *d, RzNumBig *a, RzNumBig *b)
RZ_API void rz_big_free(RzNumBig *b)
RZ_API void rz_big_rshift(RzNumBig *c, RzNumBig *a, size_t nbits)
RZ_API void rz_big_lshift(RzNumBig *c, RzNumBig *a, size_t nbits)
RZ_API void rz_big_or(RzNumBig *c, RzNumBig *a, RzNumBig *b)
RZ_API st64 rz_big_to_int(RzNumBig *b)
RZ_API RzNumBig * rz_big_new(void)
RZ_API void rz_big_powm(RzNumBig *c, RzNumBig *a, RzNumBig *b, RzNumBig *m)
RZ_API void rz_big_div(RzNumBig *c, RzNumBig *a, RzNumBig *b)
RZ_API void rz_big_init(RzNumBig *b)
RZ_API void rz_big_sub(RzNumBig *c, RzNumBig *a, RzNumBig *b)
RZ_API void rz_big_mod(RzNumBig *c, RzNumBig *a, RzNumBig *b)
RZ_API void rz_big_isqrt(RzNumBig *b, RzNumBig *a)
RZ_API void rz_big_inc(RzNumBig *a)
RZ_API void rz_big_from_int(RzNumBig *b, st64 v)
RZ_API void rz_big_mul(RzNumBig *c, RzNumBig *a, RzNumBig *b)
RZ_API int rz_big_is_zero(RzNumBig *a)
static states step(struct re_guts *, sopno, sopno, states, int, states)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API bool rz_str_startswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string starts with a specifc sequence of characters (case sensitive)