Go to the documentation of this file.
63 #include "../../internal.h"
67 const BN_ULONG *
b,
size_t b_len) {
69 "crypto_word_t is too small");
72 size_t min = a_len < b_len ? a_len : b_len;
73 for (
size_t i = 0;
i <
min;
i++) {
82 crypto_word_t mask = 0;
83 for (
size_t i = a_len;
i < b_len;
i++) {
87 }
else if (b_len < a_len) {
88 crypto_word_t mask = 0;
89 for (
size_t i = b_len;
i < a_len;
i++) {
103 if ((
a == NULL) || (
b == NULL)) {
106 }
else if (
b != NULL) {
115 if (
a->neg !=
b->neg) {
131 if (bn->
width == 0) {
134 BN_ULONG mask = bn->
d[0] ^ w;
135 for (
int i = 1;
i < bn->
width;
i++) {
165 return bn->
width > 0 && (bn->
d[0] & 1) == 1;
174 for (
int i = 0;
i <
width - 1;
i++) {
186 for (
int i =
a->width; i < b->
width;
i++) {
189 for (
int i =
b->width; i < a->
width;
i++) {
193 int min =
a->width <
b->width ?
a->width :
b->width;
194 for (
int i = 0;
i <
min;
i++) {
195 mask |= (
a->d[
i] ^
b->d[
i]);
198 mask |= (
a->neg ^
b->neg);
int BN_is_zero(const BIGNUM *bn)
int BN_is_odd(const BIGNUM *bn)
int BN_equal_consttime(const BIGNUM *a, const BIGNUM *b)
#define BN_FLG_STATIC_DATA
static crypto_word_t constant_time_is_zero_w(crypto_word_t a)
static int bn_cmp_words_consttime(const BN_ULONG *a, size_t a_len, const BN_ULONG *b, size_t b_len)
static int constant_time_select_int(crypto_word_t mask, int a, int b)
int BN_abs_is_word(const BIGNUM *bn, BN_ULONG w)
int BN_cmp(const BIGNUM *a, const BIGNUM *b)
int BN_cmp_word(const BIGNUM *a, BN_ULONG b)
int BN_ucmp(const BIGNUM *a, const BIGNUM *b)
int BN_is_pow2(const BIGNUM *bn)
int bn_less_than_words(const BN_ULONG *a, const BN_ULONG *b, size_t len)
UniquePtr< SSL_SESSION > ret
int BN_is_one(const BIGNUM *bn)
static crypto_word_t constant_time_eq_w(crypto_word_t a, crypto_word_t b)
int BN_is_word(const BIGNUM *bn, BN_ULONG w)
#define OPENSSL_STATIC_ASSERT(cond, msg)
static crypto_word_t constant_time_lt_w(crypto_word_t a, crypto_word_t b)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:48