8 #include <botan/bigint.h>
9 #include <botan/divide.h>
10 #include <botan/internal/mp_core.h>
11 #include <botan/internal/bit_ops.h>
36 else if(relative_size == 0)
38 else if(relative_size > 0)
64 else if(relative_size == 0)
69 else if(relative_size > 0)
91 else if(y_sw == 1 && x_sw)
101 if(x_sw && y_sw && x.
sign() != y.
sign())
141 return (n.
word_at(0) & (mod - 1));
145 for(
size_t j = n.
sig_words(); j > 0; --j)
149 return mod - remainder;
166 BigInt y(x.
sign(), x_sw + shift_words + (shift_bits ? 1 : 0));
178 if(x.
bits() <= shift)
word word_at(size_t n) const
void divide(const BigInt &x, const BigInt &y_arg, BigInt &q, BigInt &r)
void bigint_shr2(word y[], const word x[], size_t x_size, size_t word_shift, size_t bit_shift)
Sign reverse_sign() const
SecureVector< word > & get_reg()
std::invalid_argument Invalid_Argument
word bigint_sub3(word z[], const word x[], size_t x_size, const word y[], size_t y_size)
int operator>>(int fd, Pipe &pipe)
BigInt operator%(const BigInt &n, const BigInt &mod)
void bigint_linmul3(word z[], const word x[], size_t x_size, word y)
int operator<<(int fd, Pipe &pipe)
OctetString operator+(const OctetString &k1, const OctetString &k2)
const word * data() const
BigInt operator*(const BigInt &x, const BigInt &y)
void bigint_shl2(word y[], const word x[], size_t x_size, size_t word_shift, size_t bit_shift)
void bigint_mul(word z[], size_t z_size, word workspace[], const word x[], size_t x_size, size_t x_sw, const word y[], size_t y_size, size_t y_sw)
BigInt operator-(const BigInt &x, const BigInt &y)
s32bit bigint_cmp(const word x[], size_t x_size, const word y[], size_t y_size)
void bigint_add3(word z[], const word x[], size_t x_size, const word y[], size_t y_size)
BigInt operator/(const BigInt &x, const BigInt &y)
word bigint_modop(word n1, word n0, word d)
const size_t MP_WORD_BITS