9#include <botan/bigint.h>
11#include <botan/internal/bit_ops.h>
12#include <botan/internal/divide.h>
13#include <botan/internal/mp_core.h>
24 if(x.
sign() == y_sign) {
31 if(relative_size < 0) {
33 }
else if(relative_size == 0) {
52 if(x_sw == 1 && y_sw) {
54 }
else if(y_sw == 1 && x_sw) {
56 }
else if(x_sw && y_sw) {
157 remainder = (n.
word_at(0) & (mod - 1));
160 for(
size_t i = sw; i > 0; --i) {
166 return mod - remainder;
193 if(shift_words >= x_sw) {
static BigInt add2(const BigInt &x, const word y[], size_t y_words, Sign y_sign)
const word * data() const
word word_at(size_t n) const
void cond_flip_sign(bool predicate)
static BigInt from_word(word n)
static BigInt with_capacity(size_t n)
#define BOTAN_MP_WORD_BITS
word bigint_modop_vartime(word n1, word n0, word d)
void vartime_divide(const BigInt &x, const BigInt &y_arg, BigInt &q_out, BigInt &r_out)
void bigint_linmul3(word z[], const word x[], size_t x_size, word y)
constexpr bool is_power_of_2(T arg)
BigInt operator*(const BigInt &x, const BigInt &y)
void bigint_add3(word z[], const word x[], size_t x_size, const word y[], size_t y_size)
CT::Mask< word > bigint_sub_abs(word z[], const word x[], const word y[], size_t N, word ws[])
void bigint_mul(word z[], size_t z_size, const word x[], size_t x_size, size_t x_sw, const word y[], size_t y_size, size_t y_sw, word workspace[], size_t ws_size)
std::ostream & operator<<(std::ostream &out, const OID &oid)
BigInt operator/(const BigInt &x, const BigInt &y)
BigInt operator%(const BigInt &n, const BigInt &mod)
void bigint_shl2(word y[], const word x[], size_t x_size, size_t word_shift, size_t bit_shift)
void ct_divide_word(const BigInt &x, word y, BigInt &q_out, word &r_out)
int operator>>(int fd, Pipe &pipe)
std::vector< T, secure_allocator< T > > secure_vector
void bigint_shr2(word y[], const word x[], size_t x_size, size_t word_shift, size_t bit_shift)