X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=bigint%2Fbigint.h;h=d307cfa6e5f305845846e74a32b53a22d005d933;hb=HEAD;hp=f3858112bd24100efaf61139695f158a8628aac8;hpb=ad20a79e4270ac6d3d7c0af08efb287865dca42a;p=arm-crypto-lib.git diff --git a/bigint/bigint.h b/bigint/bigint.h index f385811..d307cfa 100644 --- a/bigint/bigint.h +++ b/bigint/bigint.h @@ -38,20 +38,18 @@ typedef int64_t bigint_wordplus_signed_t; #define BIGINT_FBS_MASK (BIGINT_WORD_SIZE-1) /* the last five bits indicate which is the first bit set */ #define BIGINT_NEG_MASK 0x80 /* this bit indicates a negative value */ typedef struct{ - uint16_t length_B; + uint16_t length_W; uint8_t info; bigint_word_t *wordv; /* word vector, pointing to the LSB */ }bigint_t; - - /******************************************************************************/ void bigint_adjust(bigint_t* a); -uint32_t bigint_get_first_set_bit(bigint_t* a); -uint32_t bigint_get_last_set_bit(bigint_t* a); -uint16_t bigint_length_b(bigint_t* a); -uint16_t bigint_length_B(bigint_t* a); +uint32_t bigint_get_first_set_bit(const bigint_t* a); +uint32_t bigint_get_last_set_bit(const bigint_t* a); +uint16_t bigint_length_b(const bigint_t* a); +uint16_t bigint_length_B(const bigint_t* a); void bigint_copy(bigint_t* dest, const bigint_t* src); void bigint_add_u(bigint_t* dest, const bigint_t* a, const bigint_t* b); void bigint_add_scale_u(bigint_t* dest, const bigint_t* a, uint16_t scale);