123 #ifndef OPENSSL_HEADER_BN_INTERNAL_H 124 #define OPENSSL_HEADER_BN_INTERNAL_H 128 #if defined(OPENSSL_X86_64) && defined(_MSC_VER) 132 #pragma intrinsic(__umulh, _umul128) 135 #include "../internal.h" 137 #if defined(__cplusplus) 145 #if defined(OPENSSL_64_BIT) 147 #if !defined(_MSC_VER) 149 #define BN_ULLONG uint128_t 155 #define BN_MASK2 (0xffffffffffffffffUL) 156 #define BN_MASK2l (0xffffffffUL) 157 #define BN_MASK2h (0xffffffff00000000UL) 158 #define BN_MASK2h1 (0xffffffff80000000UL) 159 #define BN_MONT_CTX_N0_LIMBS 1 160 #define BN_TBIT (0x8000000000000000UL) 161 #define BN_DEC_CONV (10000000000000000000UL) 162 #define BN_DEC_NUM 19 163 #define TOBN(hi, lo) ((BN_ULONG)hi << 32 | lo) 165 #elif defined(OPENSSL_32_BIT) 167 #define BN_ULLONG uint64_t 171 #define BN_MASK2 (0xffffffffUL) 172 #define BN_MASK2l (0xffffUL) 173 #define BN_MASK2h1 (0xffff8000UL) 174 #define BN_MASK2h (0xffff0000UL) 180 #define BN_MONT_CTX_N0_LIMBS 2 181 #define BN_TBIT (0x80000000UL) 182 #define BN_DEC_CONV (1000000000UL) 184 #define TOBN(hi, lo) lo, hi 187 #error "Must define either OPENSSL_32_BIT or OPENSSL_64_BIT" 191 #define STATIC_BIGNUM(x) \ 193 (BN_ULONG *)(x), sizeof(x) / sizeof(BN_ULONG), \ 194 sizeof(x) / sizeof(BN_ULONG), 0, BN_FLG_STATIC_DATA \ 197 #if defined(BN_ULLONG) 198 #define Lw(t) (((BN_ULONG)(t))&BN_MASK2) 199 #define Hw(t) (((BN_ULONG)((t)>>BN_BITS2))&BN_MASK2) 206 BN_ULONG
bn_mul_add_words(BN_ULONG *rp,
const BN_ULONG *ap,
int num, BN_ULONG
w);
207 BN_ULONG
bn_mul_words(BN_ULONG *rp,
const BN_ULONG *ap,
int num, BN_ULONG
w);
208 void bn_sqr_words(BN_ULONG *rp,
const BN_ULONG *ap,
int num);
209 BN_ULONG
bn_add_words(BN_ULONG *rp,
const BN_ULONG *ap,
const BN_ULONG *bp,
int num);
210 BN_ULONG
bn_sub_words(BN_ULONG *rp,
const BN_ULONG *ap,
const BN_ULONG *bp,
int num);
227 int bn_mul_mont(BN_ULONG *rp,
const BN_ULONG *ap,
const BN_ULONG *bp,
228 const BN_ULONG *np,
const BN_ULONG *n0,
int num);
232 #if defined(OPENSSL_X86_64) && defined(_MSC_VER) 233 #define BN_UMULT_LOHI(low, high, a, b) ((low) = _umul128((a), (b), &(high))) 236 #if !defined(BN_ULLONG) && !defined(BN_UMULT_LOHI) 237 #error "Either BN_ULLONG or BN_UMULT_LOHI must be defined on every platform." 241 #if defined(__cplusplus) void bn_sqr_comba4(BN_ULONG *r, const BN_ULONG *a)
Definition: generic.c:675
OPENSSL_EXPORT ASN1_BIT_STRING * bits
Definition: x509v3.h:532
unsigned long long uint64_t
Definition: ptypes.h:120
BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
Definition: generic.c:156
BIGNUM * bn_expand(BIGNUM *bn, size_t bits)
Definition: bn.c:347
EGLStreamKHR EGLint n
Definition: eglext.h:984
int bn_set_words(BIGNUM *bn, const BN_ULONG *words, size_t num)
Definition: bn.c:291
OPENSSL_MSVC_PRAGMA(warning(disable:4702))
Definition: e_aes.c:70
void bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
Definition: generic.c:563
BN_ULONG bn_sub_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, int num)
Definition: generic.c:304
GLboolean GLboolean GLboolean GLboolean a
Definition: gl2ext.h:306
void bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b)
Definition: generic.c:461
void bn_sqr_words(BN_ULONG *rp, const BN_ULONG *ap, int num)
Definition: generic.c:182
int bn_cmp_part_words(const BN_ULONG *a, const BN_ULONG *b, int cl, int dl)
Definition: cmp.c:155
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np, const BN_ULONG *n0, int num)
BN_ULONG bn_add_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, int num)
Definition: generic.c:247
std::vector< string > words
Definition: repeated_field_unittest.cc:1386
void bn_sqr_comba8(BN_ULONG *r, const BN_ULONG *a)
Definition: generic.c:601
uint64_t bn_mont_n0(const BIGNUM *n)
Definition: montgomery_inv.c:34
midl_pragma warning(disable:2111) midl_pragma warning(disable
Definition: Accessible2.idl:352
GLboolean GLboolean GLboolean b
Definition: gl2ext.h:306
int bn_cmp_words(const BN_ULONG *a, const BN_ULONG *b, int n)
Definition: cmp.c:135
BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w)
Definition: generic.c:127
GLfloat GLfloat GLfloat GLfloat w
Definition: gl2.h:519
GLboolean r
Definition: gl2ext.h:306