summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn.h')
-rw-r--r--src/lib/libcrypto/bn/bn.h53
1 files changed, 6 insertions, 47 deletions
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h
index 4959232179..74005ed254 100644
--- a/src/lib/libcrypto/bn/bn.h
+++ b/src/lib/libcrypto/bn/bn.h
@@ -167,18 +167,14 @@ extern "C" {
167 * using "long long's", are 32bit, and are not using my assembler code. */ 167 * using "long long's", are 32bit, and are not using my assembler code. */
168/* #define BN_DIV2W */ 168/* #define BN_DIV2W */
169 169
170/* assuming long is 64bit - this is the DEC Alpha 170#ifdef _LP64
171 * unsigned long long is only 64 bits :-(, don't define 171#undef BN_LLONG
172 * BN_LLONG for the DEC Alpha */
173#ifdef SIXTY_FOUR_BIT_LONG
174#define BN_ULLONG unsigned long long
175#define BN_ULONG unsigned long 172#define BN_ULONG unsigned long
176#define BN_LONG long 173#define BN_LONG long
177#define BN_BITS 128 174#define BN_BITS 128
178#define BN_BYTES 8 175#define BN_BYTES 8
179#define BN_BITS2 64 176#define BN_BITS2 64
180#define BN_BITS4 32 177#define BN_BITS4 32
181#define BN_MASK (0xffffffffffffffffffffffffffffffffLL)
182#define BN_MASK2 (0xffffffffffffffffL) 178#define BN_MASK2 (0xffffffffffffffffL)
183#define BN_MASK2l (0xffffffffL) 179#define BN_MASK2l (0xffffffffL)
184#define BN_MASK2h (0xffffffff00000000L) 180#define BN_MASK2h (0xffffffff00000000L)
@@ -190,51 +186,16 @@ extern "C" {
190#define BN_DEC_NUM 19 186#define BN_DEC_NUM 19
191#define BN_HEX_FMT1 "%lX" 187#define BN_HEX_FMT1 "%lX"
192#define BN_HEX_FMT2 "%016lX" 188#define BN_HEX_FMT2 "%016lX"
193#endif 189#else
194 190#define BN_ULLONG unsigned long long
195/* This is where the long long data type is 64 bits, but long is 32. 191#define BN_LLONG
196 * For machines where there are 64bit registers, this is the mode to use.
197 * IRIX, on R4000 and above should use this mode, along with the relevant
198 * assembler code :-). Do NOT define BN_LLONG.
199 */
200#ifdef SIXTY_FOUR_BIT
201#undef BN_LLONG
202#undef BN_ULLONG
203#define BN_ULONG unsigned long long
204#define BN_LONG long long
205#define BN_BITS 128
206#define BN_BYTES 8
207#define BN_BITS2 64
208#define BN_BITS4 32
209#define BN_MASK2 (0xffffffffffffffffLL)
210#define BN_MASK2l (0xffffffffL)
211#define BN_MASK2h (0xffffffff00000000LL)
212#define BN_MASK2h1 (0xffffffff80000000LL)
213#define BN_TBIT (0x8000000000000000LL)
214#define BN_DEC_CONV (10000000000000000000ULL)
215#define BN_DEC_FMT1 "%llu"
216#define BN_DEC_FMT2 "%019llu"
217#define BN_DEC_NUM 19
218#define BN_HEX_FMT1 "%llX"
219#define BN_HEX_FMT2 "%016llX"
220#endif
221
222#ifdef THIRTY_TWO_BIT
223#ifdef BN_LLONG
224# if defined(_WIN32) && !defined(__GNUC__)
225# define BN_ULLONG unsigned __int64
226# define BN_MASK (0xffffffffffffffffI64)
227# else
228# define BN_ULLONG unsigned long long
229# define BN_MASK (0xffffffffffffffffLL)
230# endif
231#endif
232#define BN_ULONG unsigned int 192#define BN_ULONG unsigned int
233#define BN_LONG int 193#define BN_LONG int
234#define BN_BITS 64 194#define BN_BITS 64
235#define BN_BYTES 4 195#define BN_BYTES 4
236#define BN_BITS2 32 196#define BN_BITS2 32
237#define BN_BITS4 16 197#define BN_BITS4 16
198#define BN_MASK (0xffffffffffffffffLL)
238#define BN_MASK2 (0xffffffffL) 199#define BN_MASK2 (0xffffffffL)
239#define BN_MASK2l (0xffff) 200#define BN_MASK2l (0xffff)
240#define BN_MASK2h1 (0xffff8000L) 201#define BN_MASK2h1 (0xffff8000L)
@@ -248,8 +209,6 @@ extern "C" {
248#define BN_HEX_FMT2 "%08X" 209#define BN_HEX_FMT2 "%08X"
249#endif 210#endif
250 211
251#define BN_DEFAULT_BITS 1280
252
253#define BN_FLG_MALLOCED 0x01 212#define BN_FLG_MALLOCED 0x01
254#define BN_FLG_STATIC_DATA 0x02 213#define BN_FLG_STATIC_DATA 0x02
255#define BN_FLG_CONSTTIME 0x04 /* avoid leaking exponent information through timing, 214#define BN_FLG_CONSTTIME 0x04 /* avoid leaking exponent information through timing,