36 "movb -1(%3,%1), %%al\n\t" 39 "xorl %%eax, %%eax\n\t" 70 "adcl %%eax, (%5,%0,4)\n\t" 76 :
"r" (
value0 ),
"1" ( addend0 ),
"2" (
size )
102 "sbbl %%eax, (%5,%0,4)\n\t" 108 :
"r" (
value0 ),
"1" ( subtrahend0 ),
129 "rcll $1, (%3,%0,4)\n\t" 151 "rcrl $1, -4(%2,%0,4)\n\t" 189 unsigned int size ) {
195 "movl -4(%3, %1, 4), %k2\n\t" 196 "cmpl -4(%4, %1, 4), %k2\n\t" 202 "0" ( 0 ),
"1" (
size ) );
219 "bsrl -4(%2,%1,4), %0\n\t" 223 "leal 1(%k0,%k1,8), %k0\n\t" 244 ( (
void * )
dest0 );
251 "xorl %%eax, %%eax\n\t" 273 ( (
void * )
dest0 );
281 :
"0" (
dest0 ),
"1" ( source0 ),
305 "movb -1(%3,%1), %%al\n\t" 335 :
"=&a" ( discard_a ),
338 :
"g" ( multiplicand ),
void bigint_grow_raw(const bigint_element_t *source0, unsigned int source_size, bigint_element_t *dest0, unsigned int dest_size)
void bigint_shr_raw(bigint_element_t *value0, unsigned int size)
static const uint32_t * reference0
void bigint_shl_raw(bigint_element_t *value0, unsigned int size)
int bigint_max_set_bit_raw(const bigint_element_t *value0, unsigned int size)
void bigint_multiply_one(const bigint_element_t multiplicand, const bigint_element_t multiplier, bigint_element_t *result, bigint_element_t *carry)
static unsigned int const void size_t len
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static unsigned int const void * data
pseudo_bit_t value[0x00020]
uint32_t bigint_element_t
Element of a big integer.
void bigint_init_raw(bigint_element_t *value0, unsigned int size, const void *data, size_t len)
static unsigned int uint32_t unsigned int dest_size
static __attribute__((always_inline)) void bigint_init_raw(uint32_t *value0
Initialise big integer.
__asm__ __volatile__("\n1:\n\t" "movb -1(%3,%1), %%al\n\t" "stosb\n\t" "loop 1b\n\t" "xorl %%eax, %%eax\n\t" "mov %4, %1\n\t" "rep stosb\n\t" :"=&D"(discard_D), "=&c"(discard_c), "+m"(*value) :"r"(data), "g"(pad_len), "0"(value0), "1"(len) :"eax")
static unsigned int source_size __unused
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")
static const uint32_t multiplier
Port multiplier number.
static unsigned int source_size
void bigint_shrink_raw(const bigint_element_t *source0, unsigned int source_size, bigint_element_t *dest0, unsigned int dest_size)
void bigint_done_raw(const bigint_element_t *value0, unsigned int size, void *out, size_t len)
static unsigned int size void * out
int bigint_add_raw(const bigint_element_t *addend0, bigint_element_t *value0, unsigned int size)
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
Optimised string operations.
int bigint_subtract_raw(const bigint_element_t *subtrahend0, bigint_element_t *value0, unsigned int size)
int bigint_is_zero_raw(const bigint_element_t *value0, unsigned int size)
static unsigned int uint32_t * dest0
int bigint_is_geq_raw(const bigint_element_t *value0, const bigint_element_t *reference0, unsigned int size)
typedef bigint_t(X25519_SIZE) x25519_t
An X25519 unsigned big integer used in internal calculations.