Go to the documentation of this file.
88 for (
i =
a->width - 1;
i >= 0;
i--) {
92 for (
i =
a->width - 1;
i >= 0;
i--) {
94 t[nw +
i + 1] |=
l >> rb;
99 r->width =
a->width + nw + 1;
106 BN_ULONG *ap, *rp, t,
c;
123 for (
i = 0;
i <
a->width;
i++) {
125 *(rp++) = (t << 1) |
c;
126 c = t >> (BN_BITS2 - 1);
138 unsigned shift_bits = shift % BN_BITS2;
139 size_t shift_words = shift / BN_BITS2;
140 if (shift_words >=
num) {
144 if (shift_bits == 0) {
147 for (
size_t i = shift_words;
i <
num - 1;
i++) {
149 (
a[
i] >> shift_bits) | (
a[
i + 1] << (BN_BITS2 - shift_bits));
151 r[
num - 1 - shift_words] =
a[
num - 1] >> shift_bits;
184 unsigned max_bits = BN_BITS2 *
r->width;
185 for (
unsigned i = 0; (max_bits >>
i) != 0;
i++) {
186 BN_ULONG mask = (
n >>
i) & 1;
204 for (
size_t i = 0;
i <
num - 1;
i++) {
205 r[
i] = (
a[
i] >> 1) | (
a[
i + 1] << (BN_BITS2 - 1));
226 int i =
n / BN_BITS2;
227 int j =
n % BN_BITS2;
232 for (
int k =
a->width;
k <
i + 1;
k++) {
238 a->d[
i] |= (((BN_ULONG)1) << j);
256 a->d[
i] &= (~(((BN_ULONG)1) << j));
262 unsigned i = bit / BN_BITS2;
263 unsigned j = bit % BN_BITS2;
267 return (
a[
i] >> j) & 1;
282 int w =
n / BN_BITS2;
283 int b =
n % BN_BITS2;
291 a->d[w] &= ~(BN_MASK2 <<
b);
300 "crypto_word_t is too small");
302 "crypto_word_t is too small");
304 "BN_ULONG has padding bits");
307 "BN_ULONG gets promoted to int");
346 "crypto_word_t is too small");
348 "crypto_word_t is too small");
351 crypto_word_t saw_nonzero = 0;
352 for (
int i = 0;
i < bn->
width;
i++) {
354 crypto_word_t first_nonzero = ~saw_nonzero & nonzero;
355 saw_nonzero |= nonzero;
358 ret |= first_nonzero & (
i * BN_BITS2 +
bits);
static int bn_count_low_zero_bits_word(BN_ULONG l)
#define bn_set_minimal_width
#define OPENSSL_PUT_ERROR(library, reason)
int BN_clear_bit(BIGNUM *a, int n)
int BN_count_low_zero_bits(const BIGNUM *bn)
int bn_rshift_secret_shift(BIGNUM *r, const BIGNUM *a, unsigned n, BN_CTX *ctx)
OPENSSL_EXPORT pem_password_cb void * u
#define BN_R_NEGATIVE_NUMBER
static void * OPENSSL_memset(void *dst, int c, size_t n)
static crypto_word_t constant_time_is_zero_w(crypto_word_t a)
int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
int BN_set_bit(BIGNUM *a, int n)
int BN_is_bit_set(const BIGNUM *a, int n)
OPENSSL_EXPORT ASN1_BIT_STRING * bits
int BN_lshift1(BIGNUM *r, const BIGNUM *a)
int BN_mask_bits(BIGNUM *a, int n)
UniquePtr< SSL_SESSION > ret
void bn_rshift1_words(BN_ULONG *r, const BN_ULONG *a, size_t num)
static void * OPENSSL_memmove(void *dst, const void *src, size_t n)
void bn_rshift_words(BN_ULONG *r, const BN_ULONG *a, unsigned shift, size_t num)
static crypto_word_t constant_time_select_w(crypto_word_t mask, crypto_word_t a, crypto_word_t b)
int BN_rshift1(BIGNUM *r, const BIGNUM *a)
int bn_is_bit_set_words(const BN_ULONG *a, size_t num, unsigned bit)
#define OPENSSL_STATIC_ASSERT(cond, msg)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:18