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;
180 y.set_sign(x.
sign());
191 if(shift_words >= x_sw) {
static BigInt add2(const BigInt &x, const word y[], size_t y_words, Sign y_sign)
word word_at(size_t n) const
void cond_flip_sign(bool predicate)
const word * _data() const
static BigInt from_word(word n)
static BigInt with_capacity(size_t n)
#define BOTAN_MP_WORD_BITS
constexpr void bigint_linmul3(W z[], const W x[], size_t x_size, W y)
void vartime_divide(const BigInt &x, const BigInt &y_arg, BigInt &q_out, BigInt &r_out)
constexpr bool is_power_of_2(T arg)
constexpr void bigint_shr2(W y[], const W x[], size_t x_size, size_t shift)
BigInt operator*(const BigInt &x, const BigInt &y)
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)
constexpr void bigint_shl2(W y[], const W x[], size_t x_size, size_t shift)
void ct_divide_word(const BigInt &x, word y, BigInt &q_out, word &r_out)
int operator>>(int fd, Pipe &pipe)
constexpr auto bigint_modop_vartime(W n1, W n0, W d) -> W
constexpr auto bigint_sub_abs(W z[], const W x[], const W y[], size_t N, W ws[]) -> CT::Mask< W >
std::vector< T, secure_allocator< T > > secure_vector
constexpr void bigint_add3(W z[], const W x[], size_t x_size, const W y[], size_t y_size)