Mercurial > dropbear
comparison libtommath/bn_prime_tab.c @ 1692:1051e4eea25a
Update LibTomMath to 1.2.0 (#84)
* update C files
* update other files
* update headers
* update makefiles
* remove mp_set/get_double()
* use ltm 1.2.0 API
* update ltm_desc
* use bundled tommath if system-tommath is too old
* XMALLOC etc. were changed to MP_MALLOC etc.
author | Steffen Jaeckel <s@jaeckel.eu> |
---|---|
date | Tue, 26 May 2020 17:36:47 +0200 |
parents | f52919ffd3b1 |
children |
comparison
equal
deleted
inserted
replaced
1691:2d3745d58843 | 1692:1051e4eea25a |
---|---|
1 #include "tommath_private.h" | 1 #include "tommath_private.h" |
2 #ifdef BN_PRIME_TAB_C | 2 #ifdef BN_PRIME_TAB_C |
3 /* LibTomMath, multiple-precision integer library -- Tom St Denis | 3 /* LibTomMath, multiple-precision integer library -- Tom St Denis */ |
4 * | 4 /* SPDX-License-Identifier: Unlicense */ |
5 * LibTomMath is a library that provides multiple-precision | |
6 * integer arithmetic as well as number theoretic functionality. | |
7 * | |
8 * The library was designed directly after the MPI library by | |
9 * Michael Fromberger but has been written from scratch with | |
10 * additional optimizations in place. | |
11 * | |
12 * SPDX-License-Identifier: Unlicense | |
13 */ | |
14 | 5 |
15 const mp_digit ltm_prime_tab[] = { | 6 const mp_digit ltm_prime_tab[] = { |
16 0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013, | 7 0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013, |
17 0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035, | 8 0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035, |
18 0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059, | 9 0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059, |
50 0x05BF, 0x05C9, 0x05CB, 0x05CF, 0x05D1, 0x05D5, 0x05DB, 0x05E7, | 41 0x05BF, 0x05C9, 0x05CB, 0x05CF, 0x05D1, 0x05D5, 0x05DB, 0x05E7, |
51 0x05F3, 0x05FB, 0x0607, 0x060D, 0x0611, 0x0617, 0x061F, 0x0623, | 42 0x05F3, 0x05FB, 0x0607, 0x060D, 0x0611, 0x0617, 0x061F, 0x0623, |
52 0x062B, 0x062F, 0x063D, 0x0641, 0x0647, 0x0649, 0x064D, 0x0653 | 43 0x062B, 0x062F, 0x063D, 0x0641, 0x0647, 0x0649, 0x064D, 0x0653 |
53 #endif | 44 #endif |
54 }; | 45 }; |
46 | |
47 #if defined(__GNUC__) && __GNUC__ >= 4 | |
48 #pragma GCC diagnostic push | |
49 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
50 const mp_digit *s_mp_prime_tab = ltm_prime_tab; | |
51 #pragma GCC diagnostic pop | |
52 #elif defined(_MSC_VER) && _MSC_VER >= 1500 | |
53 #pragma warning(push) | |
54 #pragma warning(disable: 4996) | |
55 const mp_digit *s_mp_prime_tab = ltm_prime_tab; | |
56 #pragma warning(pop) | |
57 #else | |
58 const mp_digit *s_mp_prime_tab = ltm_prime_tab; | |
55 #endif | 59 #endif |
56 | 60 |
57 /* ref: HEAD -> master, tag: v1.1.0 */ | 61 #endif |
58 /* git commit: 08549ad6bc8b0cede0b357a9c341c5c6473a9c55 */ | |
59 /* commit time: 2019-01-28 20:32:32 +0100 */ |