Execute move.sh - Rename files from bn_* to match the function names.

* git blame <renamed-file> is not affected
* git log --follow <renamed-file> can be used to show log across renames
This commit is contained in:
Steffen Jaeckel 2019-10-19 16:24:39 +02:00
parent de484635fa
commit 7a68f12873
173 changed files with 1635 additions and 1701 deletions

View File

@ -62,25 +62,25 @@ void does_not_exist(void);
static int test_feature_detection(void)
{
#define BN_TEST_FEATURE1_C
#define TEST_FEATURE1_C
if (!MP_HAS(TEST_FEATURE1)) {
does_not_exist();
return EXIT_FAILURE;
}
#define BN_TEST_FEATURE2_C 1
#define TEST_FEATURE2_C 1
if (MP_HAS(TEST_FEATURE2)) {
does_not_exist();
return EXIT_FAILURE;
}
#define BN_TEST_FEATURE3_C 0
#define TEST_FEATURE3_C 0
if (MP_HAS(TEST_FEATURE3)) {
does_not_exist();
return EXIT_FAILURE;
}
#define BN_TEST_FEATURE4_C something
#define TEST_FEATURE4_C something
if (MP_HAS(TEST_FEATURE4)) {
does_not_exist();
return EXIT_FAILURE;
@ -1254,30 +1254,30 @@ static int test_mp_read_radix(void)
mp_err err;
mp_int a;
if (mp_init_multi(&a, NULL)!= MP_OKAY) goto LTM_ERR;
if (mp_init_multi(&a, NULL)!= MP_OKAY) goto LBL_ERR;
if ((err = mp_read_radix(&a, "123456", 10)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_read_radix(&a, "123456", 10)) != MP_OKAY) goto LBL_ERR;
if ((err = mp_to_radix(&a, buf, SIZE_MAX, &written, 10)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_to_radix(&a, buf, SIZE_MAX, &written, 10)) != MP_OKAY) goto LBL_ERR;
printf(" '123456' a == %s, length = %zu\n", buf, written);
/* See comment in bn_mp_to_radix.c */
/* See comment in mp_to_radix.c */
/*
if( (err = mp_to_radix(&a, buf, 3u, &written, 10) ) != MP_OKAY) goto LTM_ERR;
if( (err = mp_to_radix(&a, buf, 3u, &written, 10) ) != MP_OKAY) goto LBL_ERR;
printf(" '56' a == %s, length = %zu\n", buf, written);
if( (err = mp_to_radix(&a, buf, 4u, &written, 10) ) != MP_OKAY) goto LTM_ERR;
if( (err = mp_to_radix(&a, buf, 4u, &written, 10) ) != MP_OKAY) goto LBL_ERR;
printf(" '456' a == %s, length = %zu\n", buf, written);
if( (err = mp_to_radix(&a, buf, 30u, &written, 10) ) != MP_OKAY) goto LTM_ERR;
if( (err = mp_to_radix(&a, buf, 30u, &written, 10) ) != MP_OKAY) goto LBL_ERR;
printf(" '123456' a == %s, length = %zu, error = %s\n",
buf, written, mp_error_to_string(err));
*/
if ((err = mp_read_radix(&a, "-123456", 10)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_to_radix(&a, buf, SIZE_MAX, &written, 10)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_read_radix(&a, "-123456", 10)) != MP_OKAY) goto LBL_ERR;
if ((err = mp_to_radix(&a, buf, SIZE_MAX, &written, 10)) != MP_OKAY) goto LBL_ERR;
printf(" '-123456' a == %s, length = %zu\n", buf, written);
if ((err = mp_read_radix(&a, "0", 10)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_to_radix(&a, buf, SIZE_MAX, &written, 10)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_read_radix(&a, "0", 10)) != MP_OKAY) goto LBL_ERR;
if ((err = mp_to_radix(&a, buf, SIZE_MAX, &written, 10)) != MP_OKAY) goto LBL_ERR;
printf(" '0' a == %s, length = %zu\n", buf, written);
while (0) {
@ -1291,7 +1291,7 @@ static int test_mp_read_radix(void)
mp_clear(&a);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
mp_clear(&a);
return EXIT_FAILURE;
}
@ -1696,61 +1696,61 @@ static int test_mp_incr(void)
mp_err e = MP_OKAY;
if ((e = mp_init_multi(&a, &b, NULL)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
/* Does it increment inside the limits of a MP_xBIT limb? */
mp_set(&a, MP_MASK/2);
if ((e = mp_incr(&a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp_d(&a, (MP_MASK/2uL) + 1uL) != MP_EQ) {
goto LTM_ERR;
goto LBL_ERR;
}
/* Does it increment outside of the limits of a MP_xBIT limb? */
mp_set(&a, MP_MASK);
mp_set(&b, MP_MASK);
if ((e = mp_incr(&a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((e = mp_add_d(&b, 1uL, &b)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp(&a, &b) != MP_EQ) {
goto LTM_ERR;
goto LBL_ERR;
}
/* Does it increment from -1 to 0? */
mp_set(&a, 1uL);
a.sign = MP_NEG;
if ((e = mp_incr(&a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp_d(&a, 0uL) != MP_EQ) {
goto LTM_ERR;
goto LBL_ERR;
}
/* Does it increment from -(MP_MASK + 1) to -MP_MASK? */
mp_set(&a, MP_MASK);
if ((e = mp_add_d(&a, 1uL, &a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
a.sign = MP_NEG;
if ((e = mp_incr(&a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (a.sign != MP_NEG) {
goto LTM_ERR;
goto LBL_ERR;
}
a.sign = MP_ZPOS;
if (mp_cmp_d(&a, MP_MASK) != MP_EQ) {
goto LTM_ERR;
goto LBL_ERR;
}
mp_clear_multi(&a, &b, NULL);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
mp_clear_multi(&a, &b, NULL);
return EXIT_FAILURE;
}
@ -1761,42 +1761,42 @@ static int test_mp_decr(void)
mp_err e = MP_OKAY;
if ((e = mp_init_multi(&a, &b, NULL)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
/* Does it decrement inside the limits of a MP_xBIT limb? */
mp_set(&a, MP_MASK/2);
if ((e = mp_decr(&a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp_d(&a, (MP_MASK/2uL) - 1uL) != MP_EQ) {
goto LTM_ERR;
goto LBL_ERR;
}
/* Does it decrement outside of the limits of a MP_xBIT limb? */
mp_set(&a, MP_MASK);
if ((e = mp_add_d(&a, 1uL, &a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((e = mp_decr(&a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp_d(&a, MP_MASK) != MP_EQ) {
goto LTM_ERR;
goto LBL_ERR;
}
/* Does it decrement from 0 to -1? */
mp_zero(&a);
if ((e = mp_decr(&a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (a.sign == MP_NEG) {
a.sign = MP_ZPOS;
if (mp_cmp_d(&a, 1uL) != MP_EQ) {
goto LTM_ERR;
goto LBL_ERR;
}
} else {
goto LTM_ERR;
goto LBL_ERR;
}
@ -1806,18 +1806,18 @@ static int test_mp_decr(void)
mp_set(&b, MP_MASK);
b.sign = MP_NEG;
if ((e = mp_sub_d(&b, 1uL, &b)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((e = mp_decr(&a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp(&a, &b) != MP_EQ) {
goto LTM_ERR;
goto LBL_ERR;
}
mp_clear_multi(&a, &b, NULL);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
mp_clear_multi(&a, &b, NULL);
return EXIT_FAILURE;
}
@ -2044,13 +2044,13 @@ static int test_mp_root_u32(void)
mp_read_radix(&r, root[i][j-3], 10);
if (mp_cmp(&r, &c) != MP_EQ) {
fprintf(stderr, "mp_root_u32 failed at input #%d, root #%d\n", i, j);
goto LTM_ERR;
goto LBL_ERR;
}
}
}
mp_clear_multi(&a, &c, &r, NULL);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
mp_clear_multi(&a, &c, &r, NULL);
return EXIT_FAILURE;
}
@ -2067,31 +2067,31 @@ static int test_s_mp_balance_mul(void)
"HzrSq9WVt1jDTVlwUxSKqxctu2GVD+N8+SVGaPFRqdxyld6IxDBbj27BPJzYUdR96k3sWpkO8XnDBvupGPnehpQe4KlO/KmN1PjFov/UTZYM+LYzkFcBPyV6hkkL8ePC1rlFLAHzgJMBCXVp4mRqtkQrDsZXXlcqlbTFu69wF6zDEysiX2cAtn/kP9ldblJiwYPCD8hG";
if ((e = mp_init_multi(&a, &b, &c, NULL)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((e = mp_read_radix(&a, na, 64)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((e = mp_read_radix(&b, nb, 64)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((e = s_mp_balance_mul(&a, &b, &c)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((e = mp_read_radix(&b, nc, 64)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp(&b, &c) != MP_EQ) {
goto LTM_ERR;
goto LBL_ERR;
}
mp_clear_multi(&a, &b, &c, NULL);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
mp_clear_multi(&a, &b, &c, NULL);
return EXIT_FAILURE;
}
@ -2103,30 +2103,30 @@ static int test_s_mp_karatsuba_mul(void)
int size, err;
if ((err = mp_init_multi(&a, &b, &c, &d, NULL)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
for (size = MP_KARATSUBA_MUL_CUTOFF; size < MP_KARATSUBA_MUL_CUTOFF + 20; size++) {
if ((err = mp_rand(&a, size)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_rand(&b, size)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = s_mp_karatsuba_mul(&a, &b, &c)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = s_mp_mul(&a,&b,&d)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp(&c, &d) != MP_EQ) {
fprintf(stderr, "Karatsuba multiplication failed at size %d\n", size);
goto LTM_ERR;
goto LBL_ERR;
}
}
mp_clear_multi(&a, &b, &c, &d, NULL);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
mp_clear_multi(&a, &b, &c, &d, NULL);
return EXIT_FAILURE;
}
@ -2137,27 +2137,27 @@ static int test_s_mp_karatsuba_sqr(void)
int size, err;
if ((err = mp_init_multi(&a, &b, &c, NULL)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
for (size = MP_KARATSUBA_SQR_CUTOFF; size < MP_KARATSUBA_SQR_CUTOFF + 20; size++) {
if ((err = mp_rand(&a, size)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = s_mp_karatsuba_sqr(&a, &b)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = s_mp_sqr(&a, &c)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp(&b, &c) != MP_EQ) {
fprintf(stderr, "Karatsuba squaring failed at size %d\n", size);
goto LTM_ERR;
goto LBL_ERR;
}
}
mp_clear_multi(&a, &b, &c, NULL);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
mp_clear_multi(&a, &b, &c, NULL);
return EXIT_FAILURE;
}
@ -2172,70 +2172,70 @@ static int test_s_mp_toom_mul(void)
#endif
if ((err = mp_init_multi(&a, &b, &c, &d, NULL)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
/* This number construction is limb-size specific */
#if (MP_DIGIT_BIT == 60)
if ((err = mp_rand(&a, 1196)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_mul_2d(&a,71787 - mp_count_bits(&a), &a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_rand(&b, 1338)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_mul_2d(&b, 80318 - mp_count_bits(&b), &b)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_mul_2d(&b, 6310, &b)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_2expt(&c, 99000 - 1000)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_add(&b, &c, &b)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
tc_cutoff = TOOM_MUL_CUTOFF;
TOOM_MUL_CUTOFF = INT_MAX;
if ((err = mp_mul(&a, &b, &c)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
TOOM_MUL_CUTOFF = tc_cutoff;
if ((err = mp_mul(&a, &b, &d)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp(&c, &d) != MP_EQ) {
fprintf(stderr, "Toom-Cook 3-way multiplication failed for edgecase f1 * f2\n");
goto LTM_ERR;
goto LBL_ERR;
}
#endif
for (size = MP_TOOM_MUL_CUTOFF; size < MP_TOOM_MUL_CUTOFF + 20; size++) {
if ((err = mp_rand(&a, size)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_rand(&b, size)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = s_mp_toom_mul(&a, &b, &c)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = s_mp_mul(&a,&b,&d)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp(&c, &d) != MP_EQ) {
fprintf(stderr, "Toom-Cook 3-way multiplication failed at size %d\n", size);
goto LTM_ERR;
goto LBL_ERR;
}
}
mp_clear_multi(&a, &b, &c, &d, NULL);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
mp_clear_multi(&a, &b, &c, &d, NULL);
return EXIT_FAILURE;
}
@ -2246,27 +2246,27 @@ static int test_s_mp_toom_sqr(void)
int size, err;
if ((err = mp_init_multi(&a, &b, &c, NULL)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
for (size = MP_TOOM_SQR_CUTOFF; size < MP_TOOM_SQR_CUTOFF + 20; size++) {
if ((err = mp_rand(&a, size)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = s_mp_toom_sqr(&a, &b)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = s_mp_sqr(&a, &c)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp(&b, &c) != MP_EQ) {
fprintf(stderr, "Toom-Cook 3-way squaring failed at size %d\n", size);
goto LTM_ERR;
goto LBL_ERR;
}
}
mp_clear_multi(&a, &b, &c, NULL);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
mp_clear_multi(&a, &b, &c, NULL);
return EXIT_FAILURE;
}
@ -2294,33 +2294,33 @@ static int test_mp_radix_size(void)
/* number to result in a different size for every base: 67^(4 * 67) */
mp_set(&a, 67);
if ((err = mp_expt_u32(&a, 268u, &a)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
for (radix = 2; radix < 65; radix++) {
if ((err = mp_radix_size(&a, radix, &size)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (size != results[radix]) {
fprintf(stderr, "mp_radix_size: result for base %d was %d instead of %d\n",
radix, size, results[radix]);
goto LTM_ERR;
goto LBL_ERR;
}
a.sign = MP_NEG;
if ((err = mp_radix_size(&a, radix, &size)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if (size != (results[radix] + 1)) {
fprintf(stderr, "mp_radix_size: result for base %d was %d instead of %d\n",
radix, size, results[radix]);
goto LTM_ERR;
goto LBL_ERR;
}
a.sign = MP_ZPOS;
}
mp_clear(&a);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
mp_clear(&a);
return EXIT_FAILURE;
}
@ -2335,11 +2335,11 @@ static int test_mp_read_write_ubin(void)
unsigned char *buf = NULL;
if ((err = mp_init_multi(&a, &b, &c, NULL)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_rand(&a, 15)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_neg(&a, &b)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_rand(&a, 15)) != MP_OKAY) goto LBL_ERR;
if ((err = mp_neg(&a, &b)) != MP_OKAY) goto LBL_ERR;
size = mp_ubin_size(&a);
printf("mp_to_ubin_size %zu\n", size);
@ -2347,22 +2347,22 @@ static int test_mp_read_write_ubin(void)
if (buf == NULL) {
fprintf(stderr, "test_read_write_binaries (u) failed to allocate %zu bytes\n",
sizeof(*buf) * size);
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_to_ubin(&a, buf, size, &len)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_to_ubin(&a, buf, size, &len)) != MP_OKAY) goto LBL_ERR;
printf("mp_to_ubin len = %zu\n", len);
if ((err = mp_from_ubin(&c, buf, len)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_from_ubin(&c, buf, len)) != MP_OKAY) goto LBL_ERR;
if (mp_cmp(&a, &c) != MP_EQ) {
fprintf(stderr, "to/from ubin cycle failed\n");
goto LTM_ERR;
goto LBL_ERR;
}
free(buf);
mp_clear_multi(&a, &b, &c, NULL);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
free(buf);
mp_clear_multi(&a, &b, &c, NULL);
return EXIT_FAILURE;
@ -2376,11 +2376,11 @@ static int test_mp_read_write_sbin(void)
unsigned char *buf = NULL;
if ((err = mp_init_multi(&a, &b, &c, NULL)) != MP_OKAY) {
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_rand(&a, 15)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_neg(&a, &b)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_rand(&a, 15)) != MP_OKAY) goto LBL_ERR;
if ((err = mp_neg(&a, &b)) != MP_OKAY) goto LBL_ERR;
size = mp_sbin_size(&a);
printf("mp_to_sbin_size %zu\n", size);
@ -2388,23 +2388,23 @@ static int test_mp_read_write_sbin(void)
if (buf == NULL) {
fprintf(stderr, "test_read_write_binaries (s) failed to allocate %zu bytes\n",
sizeof(*buf) * size);
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_to_sbin(&b, buf, size, &len)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_to_sbin(&b, buf, size, &len)) != MP_OKAY) goto LBL_ERR;
printf("mp_to_sbin len = %zu\n", len);
if ((err = mp_from_sbin(&c, buf, len)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_from_sbin(&c, buf, len)) != MP_OKAY) goto LBL_ERR;
if (mp_cmp(&b, &c) != MP_EQ) {
fprintf(stderr, "to/from ubin cycle failed\n");
goto LTM_ERR;
goto LBL_ERR;
}
free(buf);
mp_clear_multi(&a, &b, &c, NULL);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
free(buf);
mp_clear_multi(&a, &b, &c, NULL);
return EXIT_FAILURE;
@ -2420,31 +2420,31 @@ static int test_mp_pack_unpack(void)
mp_order order = MP_LSB_FIRST;
mp_endian endianess = MP_NATIVE_ENDIAN;
if ((err = mp_init_multi(&a, &b, NULL)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_rand(&a, 15)) != MP_OKAY) goto LTM_ERR;
if ((err = mp_init_multi(&a, &b, NULL)) != MP_OKAY) goto LBL_ERR;
if ((err = mp_rand(&a, 15)) != MP_OKAY) goto LBL_ERR;
count = mp_pack_count(&a, 0, 1);
buf = malloc(count);
if (buf == NULL) {
fprintf(stderr, "test_pack_unpack failed to allocate\n");
goto LTM_ERR;
goto LBL_ERR;
}
if ((err = mp_pack((void *)buf, count, &written, order, 1,
endianess, 0, &a)) != MP_OKAY) goto LTM_ERR;
endianess, 0, &a)) != MP_OKAY) goto LBL_ERR;
if ((err = mp_unpack(&b, count, order, 1,
endianess, 0, (const void *)buf)) != MP_OKAY) goto LTM_ERR;
endianess, 0, (const void *)buf)) != MP_OKAY) goto LBL_ERR;
if (mp_cmp(&a, &b) != MP_EQ) {
fprintf(stderr, "pack/unpack cycle failed\n");
goto LTM_ERR;
goto LBL_ERR;
}
free(buf);
mp_clear_multi(&a, &b, NULL);
return EXIT_SUCCESS;
LTM_ERR:
LBL_ERR:
free(buf);
mp_clear_multi(&a, &b, NULL);
return EXIT_FAILURE;

View File

@ -174,11 +174,11 @@ The wrong \texttt{libtool} will build it all fine but when it comes to the final
cc -I./ -Wall -Wsign-compare -Wextra -Wshadow -Wsystem-headers -Wdeclaration-afo...
cc -I./ -Wall -Wsign-compare -Wextra -Wshadow -Wsystem-headers -Wdeclaration-afo...
cc -I./ -Wall -Wsign-compare -Wextra -Wshadow -Wsystem-headers -Wdeclaration-afo...
libtool --mode=link --tag=CC cc bn_error.lo bn_s_mp_invmod_fast.lo bn_fast_mp_mo
libtool: link: cc bn_error.lo bn_s_mp_invmod_fast.lo bn_s_mp_montgomery_reduce_fast0
bn_error.lo: file not recognized: File format not recognized
libtool --mode=link --tag=CC cc error.lo s_mp_invmod_fast.lo fast_mp_mo
libtool: link: cc error.lo s_mp_invmod_fast.lo s_mp_montgomery_reduce_fast0
error.lo: file not recognized: File format not recognized
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Error while executing cc bn_error.lo bn_s_mp_invmod_fast.lo bn_fast_mp_montgomery0
Error while executing cc error.lo s_mp_invmod_fast.lo fast_mp_montgomery0
gmake: *** [makefile.shared:64: libtommath.la] Error 1
\end{alltt}
@ -259,7 +259,7 @@ classes can be defined base on the need of the user.
\subsection{Build Depends}
In the file tommath\_class.h you will see a large list of C ``defines'' followed by a series of ``ifdefs''
which further define symbols. All of the symbols (technically they're macros $\ldots$) represent a given C source
file. For instance, BN\_MP\_ADD\_C represents the file ``bn\_mp\_add.c''. When a define has been enabled the
file. For instance, MP\_ADD\_C represents the file ``bn\_mp\_add.c''. When a define has been enabled the
function in the respective file will be compiled and linked into the library. Accordingly when the define
is absent the file will not be compiled and not contribute any size to the library.
@ -275,7 +275,7 @@ They can be enabled at any pass of the configuration phase.
\begin{center}
\begin{tabular}{|l|l|}
\hline \textbf{Define} & \textbf{Purpose} \\
\hline BN\_MP\_DIV\_SMALL & Enables a slower, smaller and equally \\
\hline MP\_DIV\_SMALL & Enables a slower, smaller and equally \\
& functional mp\_div() function \\
\hline
\end{tabular}
@ -293,20 +293,20 @@ only if LTM\_LAST has been defined.
\begin{center}
\begin{tabular}{|l|l|}
\hline \textbf{Restriction} & \textbf{Undefine} \\
\hline Exponentiation with odd moduli only & BN\_S\_MP\_EXPTMOD\_C \\
& BN\_MP\_REDUCE\_C \\
& BN\_MP\_REDUCE\_SETUP\_C \\
& BN\_S\_MP\_MUL\_HIGH\_DIGS\_C \\
& BN\_FAST\_S\_MP\_MUL\_HIGH\_DIGS\_C \\
\hline Exponentiation with odd moduli only & S\_MP\_EXPTMOD\_C \\
& MP\_REDUCE\_C \\
& MP\_REDUCE\_SETUP\_C \\
& S\_MP\_MUL\_HIGH\_DIGS\_C \\
& FAST\_S\_MP\_MUL\_HIGH\_DIGS\_C \\
\hline Exponentiation with random odd moduli & (The above plus the following) \\
& BN\_MP\_REDUCE\_2K\_C \\
& BN\_MP\_REDUCE\_2K\_SETUP\_C \\
& BN\_MP\_REDUCE\_IS\_2K\_C \\
& BN\_MP\_DR\_IS\_MODULUS\_C \\
& BN\_MP\_DR\_REDUCE\_C \\
& BN\_MP\_DR\_SETUP\_C \\
\hline Modular inverse odd moduli only & BN\_MP\_INVMOD\_SLOW\_C \\
\hline Modular inverse (both, smaller/slower) & BN\_FAST\_MP\_INVMOD\_C \\
& MP\_REDUCE\_2K\_C \\
& MP\_REDUCE\_2K\_SETUP\_C \\
& MP\_REDUCE\_IS\_2K\_C \\
& MP\_DR\_IS\_MODULUS\_C \\
& MP\_DR\_REDUCE\_C \\
& MP\_DR\_SETUP\_C \\
\hline Modular inverse odd moduli only & MP\_INVMOD\_SLOW\_C \\
\hline Modular inverse (both, smaller/slower) & FAST\_MP\_INVMOD\_C \\
\hline
\end{tabular}
\end{center}
@ -317,14 +317,14 @@ only if LTM\_LAST has been defined.
\begin{center}
\begin{tabular}{|l|l|}
\hline \textbf{Restriction} & \textbf{Undefine} \\
\hline Moduli $\le 2560$ bits & BN\_MP\_MONTGOMERY\_REDUCE\_C \\
& BN\_S\_MP\_MUL\_DIGS\_C \\
& BN\_S\_MP\_MUL\_HIGH\_DIGS\_C \\
& BN\_S\_MP\_SQR\_C \\
\hline Polynomial Schmolynomial & BN\_MP\_KARATSUBA\_MUL\_C \\
& BN\_MP\_KARATSUBA\_SQR\_C \\
& BN\_MP\_TOOM\_MUL\_C \\
& BN\_MP\_TOOM\_SQR\_C \\
\hline Moduli $\le 2560$ bits & MP\_MONTGOMERY\_REDUCE\_C \\
& S\_MP\_MUL\_DIGS\_C \\
& S\_MP\_MUL\_HIGH\_DIGS\_C \\
& S\_MP\_SQR\_C \\
\hline Polynomial Schmolynomial & MP\_KARATSUBA\_MUL\_C \\
& MP\_KARATSUBA\_SQR\_C \\
& MP\_TOOM\_MUL\_C \\
& MP\_TOOM\_SQR\_C \\
\hline
\end{tabular}

View File

@ -67,39 +67,39 @@ static uint64_t s_time_mul(int size)
if ((e = mp_init_multi(&a, &b, &c, &d, NULL)) != MP_OKAY) {
t1 = UINT64_MAX;
goto LTM_ERR;
goto LBL_ERR;
}
if ((e = mp_rand(&a, size * s_offset)) != MP_OKAY) {
t1 = UINT64_MAX;
goto LTM_ERR;
goto LBL_ERR;
}
if ((e = mp_rand(&b, size)) != MP_OKAY) {
t1 = UINT64_MAX;
goto LTM_ERR;
goto LBL_ERR;
}
s_timer_start();
for (x = 0; x < s_number_of_test_loops; x++) {
if ((e = mp_mul(&a,&b,&c)) != MP_OKAY) {
t1 = UINT64_MAX;
goto LTM_ERR;
goto LBL_ERR;
}
if (s_check_result == 1) {
if ((e = s_mp_mul(&a,&b,&d)) != MP_OKAY) {
t1 = UINT64_MAX;
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp(&c, &d) != MP_EQ) {
/* Time of 0 cannot happen (famous last words?) */
t1 = 0uLL;
goto LTM_ERR;
goto LBL_ERR;
}
}
}
t1 = s_timer_stop();
LTM_ERR:
LBL_ERR:
mp_clear_multi(&a, &b, &c, &d, NULL);
return t1;
}
@ -112,34 +112,34 @@ static uint64_t s_time_sqr(int size)
if ((e = mp_init_multi(&a, &b, &c, NULL)) != MP_OKAY) {
t1 = UINT64_MAX;
goto LTM_ERR;
goto LBL_ERR;
}
if ((e = mp_rand(&a, size)) != MP_OKAY) {
t1 = UINT64_MAX;
goto LTM_ERR;
goto LBL_ERR;
}
s_timer_start();
for (x = 0; x < s_number_of_test_loops; x++) {
if ((e = mp_sqr(&a,&b)) != MP_OKAY) {
t1 = UINT64_MAX;
goto LTM_ERR;
goto LBL_ERR;
}
if (s_check_result == 1) {
if ((e = s_mp_sqr(&a,&c)) != MP_OKAY) {
t1 = UINT64_MAX;
goto LTM_ERR;
goto LBL_ERR;
}
if (mp_cmp(&c, &b) != MP_EQ) {
t1 = 0uLL;
goto LTM_ERR;
goto LBL_ERR;
}
}
}
t1 = s_timer_stop();
LTM_ERR:
LBL_ERR:
mp_clear_multi(&a, &b, &c, NULL);
return t1;
}

2
gen.pl
View File

@ -7,7 +7,7 @@ use strict;
use warnings;
open(my $out, '>', 'mpi.c') or die "Couldn't open mpi.c for writing: $!";
foreach my $filename (glob 'bn*.c') {
foreach my $filename (glob '*mp_*.c') {
open(my $src, '<', $filename) or die "Couldn't open $filename for reading: $!";
print {$out} "/* Start: $filename */\n";
print {$out} $_ while <$src>;

View File

@ -270,7 +270,7 @@ sub draw_func
my ($deplist, $depmap, $out, $indent, $funcslist) = @_;
my @funcs = split ',', $funcslist;
# try this if you want to have a look at a minimized version of the callgraph without all the trivial functions
#if ($deplist =~ /$funcs[0]/ || $funcs[0] =~ /BN_MP_(ADD|SUB|CLEAR|CLEAR_\S+|DIV|MUL|COPY|ZERO|GROW|CLAMP|INIT|INIT_\S+|SET|ABS|CMP|CMP_D|EXCH)_C/) {
#if ($deplist =~ /$funcs[0]/ || $funcs[0] =~ /MP_(ADD|SUB|CLEAR|CLEAR_\S+|DIV|MUL|COPY|ZERO|GROW|CLAMP|INIT|INIT_\S+|SET|ABS|CMP|CMP_D|EXCH)_C/) {
if ($deplist =~ /$funcs[0]/) {
return $deplist;
} else {
@ -309,7 +309,7 @@ sub update_dep
#if defined(LTM_ALL)
EOS
foreach my $filename (glob 'bn*.c') {
foreach my $filename (glob '*mp_*.c') {
my $define = $filename;
print "Processing $filename\n";
@ -356,7 +356,7 @@ EOS
# now do classes
my %depmap;
foreach my $filename (glob 'bn*.c') {
foreach my $filename (glob '*mp_*.c') {
my $content;
my $cc = $ENV{'CC'} || 'gcc';
$content = `$cc -E -x c -DLTM_ALL $filename`;
@ -379,7 +379,7 @@ EOS
my $a = $&;
next if $a eq "mp_err";
$a =~ tr/[a-z]/[A-Z]/;
$a = 'BN_' . $a . '_C';
$a = $a . '_C';
push @deps, $a;
}
}

View File

@ -313,627 +313,627 @@
</References>
<Files>
<File
RelativePath="bn_cutoffs.c"
RelativePath="mp_2expt.c"
>
</File>
<File
RelativePath="bn_mp_2expt.c"
RelativePath="mp_abs.c"
>
</File>
<File
RelativePath="bn_mp_abs.c"
RelativePath="mp_add.c"
>
</File>
<File
RelativePath="bn_mp_add.c"
RelativePath="mp_add_d.c"
>
</File>
<File
RelativePath="bn_mp_add_d.c"
RelativePath="mp_addmod.c"
>
</File>
<File
RelativePath="bn_mp_addmod.c"
RelativePath="mp_and.c"
>
</File>
<File
RelativePath="bn_mp_and.c"
RelativePath="mp_clamp.c"
>
</File>
<File
RelativePath="bn_mp_clamp.c"
RelativePath="mp_clear.c"
>
</File>
<File
RelativePath="bn_mp_clear.c"
RelativePath="mp_clear_multi.c"
>
</File>
<File
RelativePath="bn_mp_clear_multi.c"
RelativePath="mp_cmp.c"
>
</File>
<File
RelativePath="bn_mp_cmp.c"
RelativePath="mp_cmp_d.c"
>
</File>
<File
RelativePath="bn_mp_cmp_d.c"
RelativePath="mp_cmp_mag.c"
>
</File>
<File
RelativePath="bn_mp_cmp_mag.c"
RelativePath="mp_cnt_lsb.c"
>
</File>
<File
RelativePath="bn_mp_cnt_lsb.c"
RelativePath="mp_complement.c"
>
</File>
<File
RelativePath="bn_mp_complement.c"
RelativePath="mp_copy.c"
>
</File>
<File
RelativePath="bn_mp_copy.c"
RelativePath="mp_count_bits.c"
>
</File>
<File
RelativePath="bn_mp_count_bits.c"
RelativePath="mp_cutoffs.c"
>
</File>
<File
RelativePath="bn_mp_decr.c"
RelativePath="mp_decr.c"
>
</File>
<File
RelativePath="bn_mp_div.c"
RelativePath="mp_div.c"
>
</File>
<File
RelativePath="bn_mp_div_2.c"
RelativePath="mp_div_2.c"
>
</File>
<File
RelativePath="bn_mp_div_2d.c"
RelativePath="mp_div_2d.c"
>
</File>
<File
RelativePath="bn_mp_div_3.c"
RelativePath="mp_div_3.c"
>
</File>
<File
RelativePath="bn_mp_div_d.c"
RelativePath="mp_div_d.c"
>
</File>
<File
RelativePath="bn_mp_dr_is_modulus.c"
RelativePath="mp_dr_is_modulus.c"
>
</File>
<File
RelativePath="bn_mp_dr_reduce.c"
RelativePath="mp_dr_reduce.c"
>
</File>
<File
RelativePath="bn_mp_dr_setup.c"
RelativePath="mp_dr_setup.c"
>
</File>
<File
RelativePath="bn_mp_error_to_string.c"
RelativePath="mp_error_to_string.c"
>
</File>
<File
RelativePath="bn_mp_exch.c"
RelativePath="mp_exch.c"
>
</File>
<File
RelativePath="bn_mp_expt_u32.c"
RelativePath="mp_expt_u32.c"
>
</File>
<File
RelativePath="bn_mp_exptmod.c"
RelativePath="mp_exptmod.c"
>
</File>
<File
RelativePath="bn_mp_exteuclid.c"
RelativePath="mp_exteuclid.c"
>
</File>
<File
RelativePath="bn_mp_fread.c"
RelativePath="mp_fread.c"
>
</File>
<File
RelativePath="bn_mp_from_sbin.c"
RelativePath="mp_from_sbin.c"
>
</File>
<File
RelativePath="bn_mp_from_ubin.c"
RelativePath="mp_from_ubin.c"
>
</File>
<File
RelativePath="bn_mp_fwrite.c"
RelativePath="mp_fwrite.c"
>
</File>
<File
RelativePath="bn_mp_gcd.c"
RelativePath="mp_gcd.c"
>
</File>
<File
RelativePath="bn_mp_get_double.c"
RelativePath="mp_get_double.c"
>
</File>
<File
RelativePath="bn_mp_get_i32.c"
RelativePath="mp_get_i32.c"
>
</File>
<File
RelativePath="bn_mp_get_i64.c"
RelativePath="mp_get_i64.c"
>
</File>
<File
RelativePath="bn_mp_get_l.c"
RelativePath="mp_get_l.c"
>
</File>
<File
RelativePath="bn_mp_get_ll.c"
RelativePath="mp_get_ll.c"
>
</File>
<File
RelativePath="bn_mp_get_mag_u32.c"
RelativePath="mp_get_mag_u32.c"
>
</File>
<File
RelativePath="bn_mp_get_mag_u64.c"
RelativePath="mp_get_mag_u64.c"
>
</File>
<File
RelativePath="bn_mp_get_mag_ul.c"
RelativePath="mp_get_mag_ul.c"
>
</File>
<File
RelativePath="bn_mp_get_mag_ull.c"
RelativePath="mp_get_mag_ull.c"
>
</File>
<File
RelativePath="bn_mp_grow.c"
RelativePath="mp_grow.c"
>
</File>
<File
RelativePath="bn_mp_incr.c"
RelativePath="mp_incr.c"
>
</File>
<File
RelativePath="bn_mp_init.c"
RelativePath="mp_init.c"
>
</File>
<File
RelativePath="bn_mp_init_copy.c"
RelativePath="mp_init_copy.c"
>
</File>
<File
RelativePath="bn_mp_init_i32.c"
RelativePath="mp_init_i32.c"
>
</File>
<File
RelativePath="bn_mp_init_i64.c"
RelativePath="mp_init_i64.c"
>
</File>
<File
RelativePath="bn_mp_init_l.c"
RelativePath="mp_init_l.c"
>
</File>
<File
RelativePath="bn_mp_init_ll.c"
RelativePath="mp_init_ll.c"
>
</File>
<File
RelativePath="bn_mp_init_multi.c"
RelativePath="mp_init_multi.c"
>
</File>
<File
RelativePath="bn_mp_init_set.c"
RelativePath="mp_init_set.c"
>
</File>
<File
RelativePath="bn_mp_init_size.c"
RelativePath="mp_init_size.c"
>
</File>
<File
RelativePath="bn_mp_init_u32.c"
RelativePath="mp_init_u32.c"
>
</File>
<File
RelativePath="bn_mp_init_u64.c"
RelativePath="mp_init_u64.c"
>
</File>
<File
RelativePath="bn_mp_init_ul.c"
RelativePath="mp_init_ul.c"
>
</File>
<File
RelativePath="bn_mp_init_ull.c"
RelativePath="mp_init_ull.c"
>
</File>
<File
RelativePath="bn_mp_invmod.c"
RelativePath="mp_invmod.c"
>
</File>
<File
RelativePath="bn_mp_is_square.c"
RelativePath="mp_is_square.c"
>
</File>
<File
RelativePath="bn_mp_iseven.c"
RelativePath="mp_iseven.c"
>
</File>
<File
RelativePath="bn_mp_isodd.c"
RelativePath="mp_isodd.c"
>
</File>
<File
RelativePath="bn_mp_kronecker.c"
RelativePath="mp_kronecker.c"
>
</File>
<File
RelativePath="bn_mp_lcm.c"
RelativePath="mp_lcm.c"
>
</File>
<File
RelativePath="bn_mp_log_u32.c"
RelativePath="mp_log_u32.c"
>
</File>
<File
RelativePath="bn_mp_lshd.c"
RelativePath="mp_lshd.c"
>
</File>
<File
RelativePath="bn_mp_mod.c"
RelativePath="mp_mod.c"
>
</File>
<File
RelativePath="bn_mp_mod_2d.c"
RelativePath="mp_mod_2d.c"
>
</File>
<File
RelativePath="bn_mp_mod_d.c"
RelativePath="mp_mod_d.c"
>
</File>
<File
RelativePath="bn_mp_montgomery_calc_normalization.c"
RelativePath="mp_montgomery_calc_normalization.c"
>
</File>
<File
RelativePath="bn_mp_montgomery_reduce.c"
RelativePath="mp_montgomery_reduce.c"
>
</File>
<File
RelativePath="bn_mp_montgomery_setup.c"
RelativePath="mp_montgomery_setup.c"
>
</File>
<File
RelativePath="bn_mp_mul.c"
RelativePath="mp_mul.c"
>
</File>
<File
RelativePath="bn_mp_mul_2.c"
RelativePath="mp_mul_2.c"
>
</File>
<File
RelativePath="bn_mp_mul_2d.c"
RelativePath="mp_mul_2d.c"
>
</File>
<File
RelativePath="bn_mp_mul_d.c"
RelativePath="mp_mul_d.c"
>
</File>
<File
RelativePath="bn_mp_mulmod.c"
RelativePath="mp_mulmod.c"
>
</File>
<File
RelativePath="bn_mp_neg.c"
RelativePath="mp_neg.c"
>
</File>
<File
RelativePath="bn_mp_or.c"
RelativePath="mp_or.c"
>
</File>
<File
RelativePath="bn_mp_pack.c"
RelativePath="mp_pack.c"
>
</File>
<File
RelativePath="bn_mp_pack_count.c"
RelativePath="mp_pack_count.c"
>
</File>
<File
RelativePath="bn_mp_prime_fermat.c"
RelativePath="mp_prime_fermat.c"
>
</File>
<File
RelativePath="bn_mp_prime_frobenius_underwood.c"
RelativePath="mp_prime_frobenius_underwood.c"
>
</File>
<File
RelativePath="bn_mp_prime_is_prime.c"
RelativePath="mp_prime_is_prime.c"
>
</File>
<File
RelativePath="bn_mp_prime_miller_rabin.c"
RelativePath="mp_prime_miller_rabin.c"
>
</File>
<File
RelativePath="bn_mp_prime_next_prime.c"
RelativePath="mp_prime_next_prime.c"
>
</File>
<File
RelativePath="bn_mp_prime_rabin_miller_trials.c"
RelativePath="mp_prime_rabin_miller_trials.c"
>
</File>
<File
RelativePath="bn_mp_prime_rand.c"
RelativePath="mp_prime_rand.c"
>
</File>
<File
RelativePath="bn_mp_prime_strong_lucas_selfridge.c"
RelativePath="mp_prime_strong_lucas_selfridge.c"
>
</File>
<File
RelativePath="bn_mp_radix_size.c"
RelativePath="mp_prime_tab.c"
>
</File>
<File
RelativePath="bn_mp_radix_smap.c"
RelativePath="mp_radix_size.c"
>
</File>
<File
RelativePath="bn_mp_rand.c"
RelativePath="mp_radix_smap.c"
>
</File>
<File
RelativePath="bn_mp_read_radix.c"
RelativePath="mp_rand.c"
>
</File>
<File
RelativePath="bn_mp_reduce.c"
RelativePath="mp_read_radix.c"
>
</File>
<File
RelativePath="bn_mp_reduce_2k.c"
RelativePath="mp_reduce.c"
>
</File>
<File
RelativePath="bn_mp_reduce_2k_l.c"
RelativePath="mp_reduce_2k.c"
>
</File>
<File
RelativePath="bn_mp_reduce_2k_setup.c"
RelativePath="mp_reduce_2k_l.c"
>
</File>
<File
RelativePath="bn_mp_reduce_2k_setup_l.c"
RelativePath="mp_reduce_2k_setup.c"
>
</File>
<File
RelativePath="bn_mp_reduce_is_2k.c"
RelativePath="mp_reduce_2k_setup_l.c"
>
</File>
<File
RelativePath="bn_mp_reduce_is_2k_l.c"
RelativePath="mp_reduce_is_2k.c"
>
</File>
<File
RelativePath="bn_mp_reduce_setup.c"
RelativePath="mp_reduce_is_2k_l.c"
>
</File>
<File
RelativePath="bn_mp_root_u32.c"
RelativePath="mp_reduce_setup.c"
>
</File>
<File
RelativePath="bn_mp_rshd.c"
RelativePath="mp_root_u32.c"
>
</File>
<File
RelativePath="bn_mp_sbin_size.c"
RelativePath="mp_rshd.c"
>
</File>
<File
RelativePath="bn_mp_set.c"
RelativePath="mp_sbin_size.c"
>
</File>
<File
RelativePath="bn_mp_set_double.c"
RelativePath="mp_set.c"
>
</File>
<File
RelativePath="bn_mp_set_i32.c"
RelativePath="mp_set_double.c"
>
</File>
<File
RelativePath="bn_mp_set_i64.c"
RelativePath="mp_set_i32.c"
>
</File>
<File
RelativePath="bn_mp_set_l.c"
RelativePath="mp_set_i64.c"
>
</File>
<File
RelativePath="bn_mp_set_ll.c"
RelativePath="mp_set_l.c"
>
</File>
<File
RelativePath="bn_mp_set_u32.c"
RelativePath="mp_set_ll.c"
>
</File>
<File
RelativePath="bn_mp_set_u64.c"
RelativePath="mp_set_u32.c"
>
</File>
<File
RelativePath="bn_mp_set_ul.c"
RelativePath="mp_set_u64.c"
>
</File>
<File
RelativePath="bn_mp_set_ull.c"
RelativePath="mp_set_ul.c"
>
</File>
<File
RelativePath="bn_mp_shrink.c"
RelativePath="mp_set_ull.c"
>
</File>
<File
RelativePath="bn_mp_signed_rsh.c"
RelativePath="mp_shrink.c"
>
</File>
<File
RelativePath="bn_mp_sqr.c"
RelativePath="mp_signed_rsh.c"
>
</File>
<File
RelativePath="bn_mp_sqrmod.c"
RelativePath="mp_sqr.c"
>
</File>
<File
RelativePath="bn_mp_sqrt.c"
RelativePath="mp_sqrmod.c"
>
</File>
<File
RelativePath="bn_mp_sqrtmod_prime.c"
RelativePath="mp_sqrt.c"
>
</File>
<File
RelativePath="bn_mp_sub.c"
RelativePath="mp_sqrtmod_prime.c"
>
</File>
<File
RelativePath="bn_mp_sub_d.c"
RelativePath="mp_sub.c"
>
</File>
<File
RelativePath="bn_mp_submod.c"
RelativePath="mp_sub_d.c"
>
</File>
<File
RelativePath="bn_mp_to_radix.c"
RelativePath="mp_submod.c"
>
</File>
<File
RelativePath="bn_mp_to_sbin.c"
RelativePath="mp_to_radix.c"
>
</File>
<File
RelativePath="bn_mp_to_ubin.c"
RelativePath="mp_to_sbin.c"
>
</File>
<File
RelativePath="bn_mp_ubin_size.c"
RelativePath="mp_to_ubin.c"
>
</File>
<File
RelativePath="bn_mp_unpack.c"
RelativePath="mp_ubin_size.c"
>
</File>
<File
RelativePath="bn_mp_xor.c"
RelativePath="mp_unpack.c"
>
</File>
<File
RelativePath="bn_mp_zero.c"
RelativePath="mp_xor.c"
>
</File>
<File
RelativePath="bn_prime_tab.c"
RelativePath="mp_zero.c"
>
</File>
<File
RelativePath="bn_s_mp_add.c"
RelativePath="s_mp_add.c"
>
</File>
<File
RelativePath="bn_s_mp_balance_mul.c"
RelativePath="s_mp_balance_mul.c"
>
</File>
<File
RelativePath="bn_s_mp_exptmod.c"
RelativePath="s_mp_exptmod.c"
>
</File>
<File
RelativePath="bn_s_mp_exptmod_fast.c"
RelativePath="s_mp_exptmod_fast.c"
>
</File>
<File
RelativePath="bn_s_mp_get_bit.c"
RelativePath="s_mp_get_bit.c"
>
</File>
<File
RelativePath="bn_s_mp_invmod_fast.c"
RelativePath="s_mp_invmod_fast.c"
>
</File>
<File
RelativePath="bn_s_mp_invmod_slow.c"
RelativePath="s_mp_invmod_slow.c"
>
</File>
<File
RelativePath="bn_s_mp_karatsuba_mul.c"
RelativePath="s_mp_karatsuba_mul.c"
>
</File>
<File
RelativePath="bn_s_mp_karatsuba_sqr.c"
RelativePath="s_mp_karatsuba_sqr.c"
>
</File>
<File
RelativePath="bn_s_mp_montgomery_reduce_fast.c"
RelativePath="s_mp_montgomery_reduce_fast.c"
>
</File>
<File
RelativePath="bn_s_mp_mul_digs.c"
RelativePath="s_mp_mul_digs.c"
>
</File>
<File
RelativePath="bn_s_mp_mul_digs_fast.c"
RelativePath="s_mp_mul_digs_fast.c"
>
</File>
<File
RelativePath="bn_s_mp_mul_high_digs.c"
RelativePath="s_mp_mul_high_digs.c"
>
</File>
<File
RelativePath="bn_s_mp_mul_high_digs_fast.c"
RelativePath="s_mp_mul_high_digs_fast.c"
>
</File>
<File
RelativePath="bn_s_mp_prime_is_divisible.c"
RelativePath="s_mp_prime_is_divisible.c"
>
</File>
<File
RelativePath="bn_s_mp_rand_jenkins.c"
RelativePath="s_mp_rand_jenkins.c"
>
</File>
<File
RelativePath="bn_s_mp_rand_platform.c"
RelativePath="s_mp_rand_platform.c"
>
</File>
<File
RelativePath="bn_s_mp_reverse.c"
RelativePath="s_mp_reverse.c"
>
</File>
<File
RelativePath="bn_s_mp_sqr.c"
RelativePath="s_mp_sqr.c"
>
</File>
<File
RelativePath="bn_s_mp_sqr_fast.c"
RelativePath="s_mp_sqr_fast.c"
>
</File>
<File
RelativePath="bn_s_mp_sub.c"
RelativePath="s_mp_sub.c"
>
</File>
<File
RelativePath="bn_s_mp_toom_mul.c"
RelativePath="s_mp_toom_mul.c"
>
</File>
<File
RelativePath="bn_s_mp_toom_sqr.c"
RelativePath="s_mp_toom_sqr.c"
>
</File>
<File

View File

@ -26,35 +26,29 @@ endif
LCOV_ARGS=--directory .
#START_INS
OBJECTS=bn_cutoffs.o bn_mp_2expt.o bn_mp_abs.o bn_mp_add.o bn_mp_add_d.o bn_mp_addmod.o bn_mp_and.o \
bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o bn_mp_cmp.o bn_mp_cmp_d.o bn_mp_cmp_mag.o bn_mp_cnt_lsb.o \
bn_mp_complement.o bn_mp_copy.o bn_mp_count_bits.o bn_mp_decr.o bn_mp_div.o bn_mp_div_2.o bn_mp_div_2d.o \
bn_mp_div_3.o bn_mp_div_d.o bn_mp_dr_is_modulus.o bn_mp_dr_reduce.o bn_mp_dr_setup.o \
bn_mp_error_to_string.o bn_mp_exch.o bn_mp_expt_u32.o bn_mp_exptmod.o bn_mp_exteuclid.o bn_mp_fread.o \
bn_mp_from_sbin.o bn_mp_from_ubin.o bn_mp_fwrite.o bn_mp_gcd.o bn_mp_get_double.o bn_mp_get_i32.o \
bn_mp_get_i64.o bn_mp_get_l.o bn_mp_get_ll.o bn_mp_get_mag_u32.o bn_mp_get_mag_u64.o bn_mp_get_mag_ul.o \
bn_mp_get_mag_ull.o bn_mp_grow.o bn_mp_incr.o bn_mp_init.o bn_mp_init_copy.o bn_mp_init_i32.o \
bn_mp_init_i64.o bn_mp_init_l.o bn_mp_init_ll.o bn_mp_init_multi.o bn_mp_init_set.o bn_mp_init_size.o \
bn_mp_init_u32.o bn_mp_init_u64.o bn_mp_init_ul.o bn_mp_init_ull.o bn_mp_invmod.o bn_mp_is_square.o \
bn_mp_iseven.o bn_mp_isodd.o bn_mp_kronecker.o bn_mp_lcm.o bn_mp_log_u32.o bn_mp_lshd.o bn_mp_mod.o \
bn_mp_mod_2d.o bn_mp_mod_d.o bn_mp_montgomery_calc_normalization.o bn_mp_montgomery_reduce.o \
bn_mp_montgomery_setup.o bn_mp_mul.o bn_mp_mul_2.o bn_mp_mul_2d.o bn_mp_mul_d.o bn_mp_mulmod.o bn_mp_neg.o \
bn_mp_or.o bn_mp_pack.o bn_mp_pack_count.o bn_mp_prime_fermat.o bn_mp_prime_frobenius_underwood.o \
bn_mp_prime_is_prime.o bn_mp_prime_miller_rabin.o bn_mp_prime_next_prime.o \
bn_mp_prime_rabin_miller_trials.o bn_mp_prime_rand.o bn_mp_prime_strong_lucas_selfridge.o \
bn_mp_radix_size.o bn_mp_radix_smap.o bn_mp_rand.o bn_mp_read_radix.o bn_mp_reduce.o bn_mp_reduce_2k.o \
bn_mp_reduce_2k_l.o bn_mp_reduce_2k_setup.o bn_mp_reduce_2k_setup_l.o bn_mp_reduce_is_2k.o \
bn_mp_reduce_is_2k_l.o bn_mp_reduce_setup.o bn_mp_root_u32.o bn_mp_rshd.o bn_mp_sbin_size.o bn_mp_set.o \
bn_mp_set_double.o bn_mp_set_i32.o bn_mp_set_i64.o bn_mp_set_l.o bn_mp_set_ll.o bn_mp_set_u32.o \
bn_mp_set_u64.o bn_mp_set_ul.o bn_mp_set_ull.o bn_mp_shrink.o bn_mp_signed_rsh.o bn_mp_sqr.o \
bn_mp_sqrmod.o bn_mp_sqrt.o bn_mp_sqrtmod_prime.o bn_mp_sub.o bn_mp_sub_d.o bn_mp_submod.o \
bn_mp_to_radix.o bn_mp_to_sbin.o bn_mp_to_ubin.o bn_mp_ubin_size.o bn_mp_unpack.o bn_mp_xor.o bn_mp_zero.o \
bn_prime_tab.o bn_s_mp_add.o bn_s_mp_balance_mul.o bn_s_mp_exptmod.o bn_s_mp_exptmod_fast.o \
bn_s_mp_get_bit.o bn_s_mp_invmod_fast.o bn_s_mp_invmod_slow.o bn_s_mp_karatsuba_mul.o \
bn_s_mp_karatsuba_sqr.o bn_s_mp_montgomery_reduce_fast.o bn_s_mp_mul_digs.o bn_s_mp_mul_digs_fast.o \
bn_s_mp_mul_high_digs.o bn_s_mp_mul_high_digs_fast.o bn_s_mp_prime_is_divisible.o \
bn_s_mp_rand_jenkins.o bn_s_mp_rand_platform.o bn_s_mp_reverse.o bn_s_mp_sqr.o bn_s_mp_sqr_fast.o \
bn_s_mp_sub.o bn_s_mp_toom_mul.o bn_s_mp_toom_sqr.o
OBJECTS=mp_2expt.o mp_abs.o mp_add.o mp_add_d.o mp_addmod.o mp_and.o mp_clamp.o mp_clear.o mp_clear_multi.o \
mp_cmp.o mp_cmp_d.o mp_cmp_mag.o mp_cnt_lsb.o mp_complement.o mp_copy.o mp_count_bits.o mp_cutoffs.o \
mp_decr.o mp_div.o mp_div_2.o mp_div_2d.o mp_div_3.o mp_div_d.o mp_dr_is_modulus.o mp_dr_reduce.o \
mp_dr_setup.o mp_error_to_string.o mp_exch.o mp_expt_u32.o mp_exptmod.o mp_exteuclid.o mp_fread.o \
mp_from_sbin.o mp_from_ubin.o mp_fwrite.o mp_gcd.o mp_get_double.o mp_get_i32.o mp_get_i64.o mp_get_l.o \
mp_get_ll.o mp_get_mag_u32.o mp_get_mag_u64.o mp_get_mag_ul.o mp_get_mag_ull.o mp_grow.o mp_incr.o \
mp_init.o mp_init_copy.o mp_init_i32.o mp_init_i64.o mp_init_l.o mp_init_ll.o mp_init_multi.o mp_init_set.o \
mp_init_size.o mp_init_u32.o mp_init_u64.o mp_init_ul.o mp_init_ull.o mp_invmod.o mp_is_square.o \
mp_iseven.o mp_isodd.o mp_kronecker.o mp_lcm.o mp_log_u32.o mp_lshd.o mp_mod.o mp_mod_2d.o mp_mod_d.o \
mp_montgomery_calc_normalization.o mp_montgomery_reduce.o mp_montgomery_setup.o mp_mul.o mp_mul_2.o \
mp_mul_2d.o mp_mul_d.o mp_mulmod.o mp_neg.o mp_or.o mp_pack.o mp_pack_count.o mp_prime_fermat.o \
mp_prime_frobenius_underwood.o mp_prime_is_prime.o mp_prime_miller_rabin.o mp_prime_next_prime.o \
mp_prime_rabin_miller_trials.o mp_prime_rand.o mp_prime_strong_lucas_selfridge.o mp_prime_tab.o \
mp_radix_size.o mp_radix_smap.o mp_rand.o mp_read_radix.o mp_reduce.o mp_reduce_2k.o mp_reduce_2k_l.o \
mp_reduce_2k_setup.o mp_reduce_2k_setup_l.o mp_reduce_is_2k.o mp_reduce_is_2k_l.o mp_reduce_setup.o \
mp_root_u32.o mp_rshd.o mp_sbin_size.o mp_set.o mp_set_double.o mp_set_i32.o mp_set_i64.o mp_set_l.o \
mp_set_ll.o mp_set_u32.o mp_set_u64.o mp_set_ul.o mp_set_ull.o mp_shrink.o mp_signed_rsh.o mp_sqr.o \
mp_sqrmod.o mp_sqrt.o mp_sqrtmod_prime.o mp_sub.o mp_sub_d.o mp_submod.o mp_to_radix.o mp_to_sbin.o \
mp_to_ubin.o mp_ubin_size.o mp_unpack.o mp_xor.o mp_zero.o s_mp_add.o s_mp_balance_mul.o s_mp_exptmod.o \
s_mp_exptmod_fast.o s_mp_get_bit.o s_mp_invmod_fast.o s_mp_invmod_slow.o s_mp_karatsuba_mul.o \
s_mp_karatsuba_sqr.o s_mp_montgomery_reduce_fast.o s_mp_mul_digs.o s_mp_mul_digs_fast.o \
s_mp_mul_high_digs.o s_mp_mul_high_digs_fast.o s_mp_prime_is_divisible.o s_mp_rand_jenkins.o \
s_mp_rand_platform.o s_mp_reverse.o s_mp_sqr.o s_mp_sqr_fast.o s_mp_sub.o s_mp_toom_mul.o s_mp_toom_sqr.o
#END_INS

View File

@ -29,35 +29,29 @@ LIBMAIN_I =libtommath.dll.a
LIBMAIN_D =libtommath.dll
#List of objects to compile (all goes to libtommath.a)
OBJECTS=bn_cutoffs.o bn_mp_2expt.o bn_mp_abs.o bn_mp_add.o bn_mp_add_d.o bn_mp_addmod.o bn_mp_and.o \
bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o bn_mp_cmp.o bn_mp_cmp_d.o bn_mp_cmp_mag.o bn_mp_cnt_lsb.o \
bn_mp_complement.o bn_mp_copy.o bn_mp_count_bits.o bn_mp_decr.o bn_mp_div.o bn_mp_div_2.o bn_mp_div_2d.o \
bn_mp_div_3.o bn_mp_div_d.o bn_mp_dr_is_modulus.o bn_mp_dr_reduce.o bn_mp_dr_setup.o \
bn_mp_error_to_string.o bn_mp_exch.o bn_mp_expt_u32.o bn_mp_exptmod.o bn_mp_exteuclid.o bn_mp_fread.o \
bn_mp_from_sbin.o bn_mp_from_ubin.o bn_mp_fwrite.o bn_mp_gcd.o bn_mp_get_double.o bn_mp_get_i32.o \
bn_mp_get_i64.o bn_mp_get_l.o bn_mp_get_ll.o bn_mp_get_mag_u32.o bn_mp_get_mag_u64.o bn_mp_get_mag_ul.o \
bn_mp_get_mag_ull.o bn_mp_grow.o bn_mp_incr.o bn_mp_init.o bn_mp_init_copy.o bn_mp_init_i32.o \
bn_mp_init_i64.o bn_mp_init_l.o bn_mp_init_ll.o bn_mp_init_multi.o bn_mp_init_set.o bn_mp_init_size.o \
bn_mp_init_u32.o bn_mp_init_u64.o bn_mp_init_ul.o bn_mp_init_ull.o bn_mp_invmod.o bn_mp_is_square.o \
bn_mp_iseven.o bn_mp_isodd.o bn_mp_kronecker.o bn_mp_lcm.o bn_mp_log_u32.o bn_mp_lshd.o bn_mp_mod.o \
bn_mp_mod_2d.o bn_mp_mod_d.o bn_mp_montgomery_calc_normalization.o bn_mp_montgomery_reduce.o \
bn_mp_montgomery_setup.o bn_mp_mul.o bn_mp_mul_2.o bn_mp_mul_2d.o bn_mp_mul_d.o bn_mp_mulmod.o bn_mp_neg.o \
bn_mp_or.o bn_mp_pack.o bn_mp_pack_count.o bn_mp_prime_fermat.o bn_mp_prime_frobenius_underwood.o \
bn_mp_prime_is_prime.o bn_mp_prime_miller_rabin.o bn_mp_prime_next_prime.o \
bn_mp_prime_rabin_miller_trials.o bn_mp_prime_rand.o bn_mp_prime_strong_lucas_selfridge.o \
bn_mp_radix_size.o bn_mp_radix_smap.o bn_mp_rand.o bn_mp_read_radix.o bn_mp_reduce.o bn_mp_reduce_2k.o \
bn_mp_reduce_2k_l.o bn_mp_reduce_2k_setup.o bn_mp_reduce_2k_setup_l.o bn_mp_reduce_is_2k.o \
bn_mp_reduce_is_2k_l.o bn_mp_reduce_setup.o bn_mp_root_u32.o bn_mp_rshd.o bn_mp_sbin_size.o bn_mp_set.o \
bn_mp_set_double.o bn_mp_set_i32.o bn_mp_set_i64.o bn_mp_set_l.o bn_mp_set_ll.o bn_mp_set_u32.o \
bn_mp_set_u64.o bn_mp_set_ul.o bn_mp_set_ull.o bn_mp_shrink.o bn_mp_signed_rsh.o bn_mp_sqr.o \
bn_mp_sqrmod.o bn_mp_sqrt.o bn_mp_sqrtmod_prime.o bn_mp_sub.o bn_mp_sub_d.o bn_mp_submod.o \
bn_mp_to_radix.o bn_mp_to_sbin.o bn_mp_to_ubin.o bn_mp_ubin_size.o bn_mp_unpack.o bn_mp_xor.o bn_mp_zero.o \
bn_prime_tab.o bn_s_mp_add.o bn_s_mp_balance_mul.o bn_s_mp_exptmod.o bn_s_mp_exptmod_fast.o \
bn_s_mp_get_bit.o bn_s_mp_invmod_fast.o bn_s_mp_invmod_slow.o bn_s_mp_karatsuba_mul.o \
bn_s_mp_karatsuba_sqr.o bn_s_mp_montgomery_reduce_fast.o bn_s_mp_mul_digs.o bn_s_mp_mul_digs_fast.o \
bn_s_mp_mul_high_digs.o bn_s_mp_mul_high_digs_fast.o bn_s_mp_prime_is_divisible.o \
bn_s_mp_rand_jenkins.o bn_s_mp_rand_platform.o bn_s_mp_reverse.o bn_s_mp_sqr.o bn_s_mp_sqr_fast.o \
bn_s_mp_sub.o bn_s_mp_toom_mul.o bn_s_mp_toom_sqr.o
OBJECTS=mp_2expt.o mp_abs.o mp_add.o mp_add_d.o mp_addmod.o mp_and.o mp_clamp.o mp_clear.o mp_clear_multi.o \
mp_cmp.o mp_cmp_d.o mp_cmp_mag.o mp_cnt_lsb.o mp_complement.o mp_copy.o mp_count_bits.o mp_cutoffs.o \
mp_decr.o mp_div.o mp_div_2.o mp_div_2d.o mp_div_3.o mp_div_d.o mp_dr_is_modulus.o mp_dr_reduce.o \
mp_dr_setup.o mp_error_to_string.o mp_exch.o mp_expt_u32.o mp_exptmod.o mp_exteuclid.o mp_fread.o \
mp_from_sbin.o mp_from_ubin.o mp_fwrite.o mp_gcd.o mp_get_double.o mp_get_i32.o mp_get_i64.o mp_get_l.o \
mp_get_ll.o mp_get_mag_u32.o mp_get_mag_u64.o mp_get_mag_ul.o mp_get_mag_ull.o mp_grow.o mp_incr.o \
mp_init.o mp_init_copy.o mp_init_i32.o mp_init_i64.o mp_init_l.o mp_init_ll.o mp_init_multi.o mp_init_set.o \
mp_init_size.o mp_init_u32.o mp_init_u64.o mp_init_ul.o mp_init_ull.o mp_invmod.o mp_is_square.o \
mp_iseven.o mp_isodd.o mp_kronecker.o mp_lcm.o mp_log_u32.o mp_lshd.o mp_mod.o mp_mod_2d.o mp_mod_d.o \
mp_montgomery_calc_normalization.o mp_montgomery_reduce.o mp_montgomery_setup.o mp_mul.o mp_mul_2.o \
mp_mul_2d.o mp_mul_d.o mp_mulmod.o mp_neg.o mp_or.o mp_pack.o mp_pack_count.o mp_prime_fermat.o \
mp_prime_frobenius_underwood.o mp_prime_is_prime.o mp_prime_miller_rabin.o mp_prime_next_prime.o \
mp_prime_rabin_miller_trials.o mp_prime_rand.o mp_prime_strong_lucas_selfridge.o mp_prime_tab.o \
mp_radix_size.o mp_radix_smap.o mp_rand.o mp_read_radix.o mp_reduce.o mp_reduce_2k.o mp_reduce_2k_l.o \
mp_reduce_2k_setup.o mp_reduce_2k_setup_l.o mp_reduce_is_2k.o mp_reduce_is_2k_l.o mp_reduce_setup.o \
mp_root_u32.o mp_rshd.o mp_sbin_size.o mp_set.o mp_set_double.o mp_set_i32.o mp_set_i64.o mp_set_l.o \
mp_set_ll.o mp_set_u32.o mp_set_u64.o mp_set_ul.o mp_set_ull.o mp_shrink.o mp_signed_rsh.o mp_sqr.o \
mp_sqrmod.o mp_sqrt.o mp_sqrtmod_prime.o mp_sub.o mp_sub_d.o mp_submod.o mp_to_radix.o mp_to_sbin.o \
mp_to_ubin.o mp_ubin_size.o mp_unpack.o mp_xor.o mp_zero.o s_mp_add.o s_mp_balance_mul.o s_mp_exptmod.o \
s_mp_exptmod_fast.o s_mp_get_bit.o s_mp_invmod_fast.o s_mp_invmod_slow.o s_mp_karatsuba_mul.o \
s_mp_karatsuba_sqr.o s_mp_montgomery_reduce_fast.o s_mp_mul_digs.o s_mp_mul_digs_fast.o \
s_mp_mul_high_digs.o s_mp_mul_high_digs_fast.o s_mp_prime_is_divisible.o s_mp_rand_jenkins.o \
s_mp_rand_platform.o s_mp_reverse.o s_mp_sqr.o s_mp_sqr_fast.o s_mp_sub.o s_mp_toom_mul.o s_mp_toom_sqr.o
HEADERS_PUB=tommath.h
HEADERS=tommath_private.h tommath_class.h tommath_superclass.h tommath_cutoffs.h $(HEADERS_PUB)

View File

@ -21,35 +21,29 @@ LTM_LDFLAGS = advapi32.lib
LIBMAIN_S =tommath.lib
#List of objects to compile (all goes to tommath.lib)
OBJECTS=bn_cutoffs.obj bn_mp_2expt.obj bn_mp_abs.obj bn_mp_add.obj bn_mp_add_d.obj bn_mp_addmod.obj bn_mp_and.obj \
bn_mp_clamp.obj bn_mp_clear.obj bn_mp_clear_multi.obj bn_mp_cmp.obj bn_mp_cmp_d.obj bn_mp_cmp_mag.obj bn_mp_cnt_lsb.obj \
bn_mp_complement.obj bn_mp_copy.obj bn_mp_count_bits.obj bn_mp_decr.obj bn_mp_div.obj bn_mp_div_2.obj bn_mp_div_2d.obj \
bn_mp_div_3.obj bn_mp_div_d.obj bn_mp_dr_is_modulus.obj bn_mp_dr_reduce.obj bn_mp_dr_setup.obj \
bn_mp_error_to_string.obj bn_mp_exch.obj bn_mp_expt_u32.obj bn_mp_exptmod.obj bn_mp_exteuclid.obj bn_mp_fread.obj \
bn_mp_from_sbin.obj bn_mp_from_ubin.obj bn_mp_fwrite.obj bn_mp_gcd.obj bn_mp_get_double.obj bn_mp_get_i32.obj \
bn_mp_get_i64.obj bn_mp_get_l.obj bn_mp_get_ll.obj bn_mp_get_mag_u32.obj bn_mp_get_mag_u64.obj bn_mp_get_mag_ul.obj \
bn_mp_get_mag_ull.obj bn_mp_grow.obj bn_mp_incr.obj bn_mp_init.obj bn_mp_init_copy.obj bn_mp_init_i32.obj \
bn_mp_init_i64.obj bn_mp_init_l.obj bn_mp_init_ll.obj bn_mp_init_multi.obj bn_mp_init_set.obj bn_mp_init_size.obj \
bn_mp_init_u32.obj bn_mp_init_u64.obj bn_mp_init_ul.obj bn_mp_init_ull.obj bn_mp_invmod.obj bn_mp_is_square.obj \
bn_mp_iseven.obj bn_mp_isodd.obj bn_mp_kronecker.obj bn_mp_lcm.obj bn_mp_log_u32.obj bn_mp_lshd.obj bn_mp_mod.obj \
bn_mp_mod_2d.obj bn_mp_mod_d.obj bn_mp_montgomery_calc_normalization.obj bn_mp_montgomery_reduce.obj \
bn_mp_montgomery_setup.obj bn_mp_mul.obj bn_mp_mul_2.obj bn_mp_mul_2d.obj bn_mp_mul_d.obj bn_mp_mulmod.obj bn_mp_neg.obj \
bn_mp_or.obj bn_mp_pack.obj bn_mp_pack_count.obj bn_mp_prime_fermat.obj bn_mp_prime_frobenius_underwood.obj \
bn_mp_prime_is_prime.obj bn_mp_prime_miller_rabin.obj bn_mp_prime_next_prime.obj \
bn_mp_prime_rabin_miller_trials.obj bn_mp_prime_rand.obj bn_mp_prime_strong_lucas_selfridge.obj \
bn_mp_radix_size.obj bn_mp_radix_smap.obj bn_mp_rand.obj bn_mp_read_radix.obj bn_mp_reduce.obj bn_mp_reduce_2k.obj \
bn_mp_reduce_2k_l.obj bn_mp_reduce_2k_setup.obj bn_mp_reduce_2k_setup_l.obj bn_mp_reduce_is_2k.obj \
bn_mp_reduce_is_2k_l.obj bn_mp_reduce_setup.obj bn_mp_root_u32.obj bn_mp_rshd.obj bn_mp_sbin_size.obj bn_mp_set.obj \
bn_mp_set_double.obj bn_mp_set_i32.obj bn_mp_set_i64.obj bn_mp_set_l.obj bn_mp_set_ll.obj bn_mp_set_u32.obj \
bn_mp_set_u64.obj bn_mp_set_ul.obj bn_mp_set_ull.obj bn_mp_shrink.obj bn_mp_signed_rsh.obj bn_mp_sqr.obj \
bn_mp_sqrmod.obj bn_mp_sqrt.obj bn_mp_sqrtmod_prime.obj bn_mp_sub.obj bn_mp_sub_d.obj bn_mp_submod.obj \
bn_mp_to_radix.obj bn_mp_to_sbin.obj bn_mp_to_ubin.obj bn_mp_ubin_size.obj bn_mp_unpack.obj bn_mp_xor.obj bn_mp_zero.obj \
bn_prime_tab.obj bn_s_mp_add.obj bn_s_mp_balance_mul.obj bn_s_mp_exptmod.obj bn_s_mp_exptmod_fast.obj \
bn_s_mp_get_bit.obj bn_s_mp_invmod_fast.obj bn_s_mp_invmod_slow.obj bn_s_mp_karatsuba_mul.obj \
bn_s_mp_karatsuba_sqr.obj bn_s_mp_montgomery_reduce_fast.obj bn_s_mp_mul_digs.obj bn_s_mp_mul_digs_fast.obj \
bn_s_mp_mul_high_digs.obj bn_s_mp_mul_high_digs_fast.obj bn_s_mp_prime_is_divisible.obj \
bn_s_mp_rand_jenkins.obj bn_s_mp_rand_platform.obj bn_s_mp_reverse.obj bn_s_mp_sqr.obj bn_s_mp_sqr_fast.obj \
bn_s_mp_sub.obj bn_s_mp_toom_mul.obj bn_s_mp_toom_sqr.obj
OBJECTS=mp_2expt.obj mp_abs.obj mp_add.obj mp_add_d.obj mp_addmod.obj mp_and.obj mp_clamp.obj mp_clear.obj mp_clear_multi.obj \
mp_cmp.obj mp_cmp_d.obj mp_cmp_mag.obj mp_cnt_lsb.obj mp_complement.obj mp_copy.obj mp_count_bits.obj mp_cutoffs.obj \
mp_decr.obj mp_div.obj mp_div_2.obj mp_div_2d.obj mp_div_3.obj mp_div_d.obj mp_dr_is_modulus.obj mp_dr_reduce.obj \
mp_dr_setup.obj mp_error_to_string.obj mp_exch.obj mp_expt_u32.obj mp_exptmod.obj mp_exteuclid.obj mp_fread.obj \
mp_from_sbin.obj mp_from_ubin.obj mp_fwrite.obj mp_gcd.obj mp_get_double.obj mp_get_i32.obj mp_get_i64.obj mp_get_l.obj \
mp_get_ll.obj mp_get_mag_u32.obj mp_get_mag_u64.obj mp_get_mag_ul.obj mp_get_mag_ull.obj mp_grow.obj mp_incr.obj \
mp_init.obj mp_init_copy.obj mp_init_i32.obj mp_init_i64.obj mp_init_l.obj mp_init_ll.obj mp_init_multi.obj mp_init_set.obj \
mp_init_size.obj mp_init_u32.obj mp_init_u64.obj mp_init_ul.obj mp_init_ull.obj mp_invmod.obj mp_is_square.obj \
mp_iseven.obj mp_isodd.obj mp_kronecker.obj mp_lcm.obj mp_log_u32.obj mp_lshd.obj mp_mod.obj mp_mod_2d.obj mp_mod_d.obj \
mp_montgomery_calc_normalization.obj mp_montgomery_reduce.obj mp_montgomery_setup.obj mp_mul.obj mp_mul_2.obj \
mp_mul_2d.obj mp_mul_d.obj mp_mulmod.obj mp_neg.obj mp_or.obj mp_pack.obj mp_pack_count.obj mp_prime_fermat.obj \
mp_prime_frobenius_underwood.obj mp_prime_is_prime.obj mp_prime_miller_rabin.obj mp_prime_next_prime.obj \
mp_prime_rabin_miller_trials.obj mp_prime_rand.obj mp_prime_strong_lucas_selfridge.obj mp_prime_tab.obj \
mp_radix_size.obj mp_radix_smap.obj mp_rand.obj mp_read_radix.obj mp_reduce.obj mp_reduce_2k.obj mp_reduce_2k_l.obj \
mp_reduce_2k_setup.obj mp_reduce_2k_setup_l.obj mp_reduce_is_2k.obj mp_reduce_is_2k_l.obj mp_reduce_setup.obj \
mp_root_u32.obj mp_rshd.obj mp_sbin_size.obj mp_set.obj mp_set_double.obj mp_set_i32.obj mp_set_i64.obj mp_set_l.obj \
mp_set_ll.obj mp_set_u32.obj mp_set_u64.obj mp_set_ul.obj mp_set_ull.obj mp_shrink.obj mp_signed_rsh.obj mp_sqr.obj \
mp_sqrmod.obj mp_sqrt.obj mp_sqrtmod_prime.obj mp_sub.obj mp_sub_d.obj mp_submod.obj mp_to_radix.obj mp_to_sbin.obj \
mp_to_ubin.obj mp_ubin_size.obj mp_unpack.obj mp_xor.obj mp_zero.obj s_mp_add.obj s_mp_balance_mul.obj s_mp_exptmod.obj \
s_mp_exptmod_fast.obj s_mp_get_bit.obj s_mp_invmod_fast.obj s_mp_invmod_slow.obj s_mp_karatsuba_mul.obj \
s_mp_karatsuba_sqr.obj s_mp_montgomery_reduce_fast.obj s_mp_mul_digs.obj s_mp_mul_digs_fast.obj \
s_mp_mul_high_digs.obj s_mp_mul_high_digs_fast.obj s_mp_prime_is_divisible.obj s_mp_rand_jenkins.obj \
s_mp_rand_platform.obj s_mp_reverse.obj s_mp_sqr.obj s_mp_sqr_fast.obj s_mp_sub.obj s_mp_toom_mul.obj s_mp_toom_sqr.obj
HEADERS_PUB=tommath.h
HEADERS=tommath_private.h tommath_class.h tommath_superclass.h tommath_cutoffs.h $(HEADERS_PUB)

View File

@ -23,35 +23,29 @@ LTLINK = $(LIBTOOL) --mode=link --tag=CC $(CC)
LCOV_ARGS=--directory .libs --directory .
#START_INS
OBJECTS=bn_cutoffs.o bn_mp_2expt.o bn_mp_abs.o bn_mp_add.o bn_mp_add_d.o bn_mp_addmod.o bn_mp_and.o \
bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o bn_mp_cmp.o bn_mp_cmp_d.o bn_mp_cmp_mag.o bn_mp_cnt_lsb.o \
bn_mp_complement.o bn_mp_copy.o bn_mp_count_bits.o bn_mp_decr.o bn_mp_div.o bn_mp_div_2.o bn_mp_div_2d.o \
bn_mp_div_3.o bn_mp_div_d.o bn_mp_dr_is_modulus.o bn_mp_dr_reduce.o bn_mp_dr_setup.o \
bn_mp_error_to_string.o bn_mp_exch.o bn_mp_expt_u32.o bn_mp_exptmod.o bn_mp_exteuclid.o bn_mp_fread.o \
bn_mp_from_sbin.o bn_mp_from_ubin.o bn_mp_fwrite.o bn_mp_gcd.o bn_mp_get_double.o bn_mp_get_i32.o \
bn_mp_get_i64.o bn_mp_get_l.o bn_mp_get_ll.o bn_mp_get_mag_u32.o bn_mp_get_mag_u64.o bn_mp_get_mag_ul.o \
bn_mp_get_mag_ull.o bn_mp_grow.o bn_mp_incr.o bn_mp_init.o bn_mp_init_copy.o bn_mp_init_i32.o \
bn_mp_init_i64.o bn_mp_init_l.o bn_mp_init_ll.o bn_mp_init_multi.o bn_mp_init_set.o bn_mp_init_size.o \
bn_mp_init_u32.o bn_mp_init_u64.o bn_mp_init_ul.o bn_mp_init_ull.o bn_mp_invmod.o bn_mp_is_square.o \
bn_mp_iseven.o bn_mp_isodd.o bn_mp_kronecker.o bn_mp_lcm.o bn_mp_log_u32.o bn_mp_lshd.o bn_mp_mod.o \
bn_mp_mod_2d.o bn_mp_mod_d.o bn_mp_montgomery_calc_normalization.o bn_mp_montgomery_reduce.o \
bn_mp_montgomery_setup.o bn_mp_mul.o bn_mp_mul_2.o bn_mp_mul_2d.o bn_mp_mul_d.o bn_mp_mulmod.o bn_mp_neg.o \
bn_mp_or.o bn_mp_pack.o bn_mp_pack_count.o bn_mp_prime_fermat.o bn_mp_prime_frobenius_underwood.o \
bn_mp_prime_is_prime.o bn_mp_prime_miller_rabin.o bn_mp_prime_next_prime.o \
bn_mp_prime_rabin_miller_trials.o bn_mp_prime_rand.o bn_mp_prime_strong_lucas_selfridge.o \
bn_mp_radix_size.o bn_mp_radix_smap.o bn_mp_rand.o bn_mp_read_radix.o bn_mp_reduce.o bn_mp_reduce_2k.o \
bn_mp_reduce_2k_l.o bn_mp_reduce_2k_setup.o bn_mp_reduce_2k_setup_l.o bn_mp_reduce_is_2k.o \
bn_mp_reduce_is_2k_l.o bn_mp_reduce_setup.o bn_mp_root_u32.o bn_mp_rshd.o bn_mp_sbin_size.o bn_mp_set.o \
bn_mp_set_double.o bn_mp_set_i32.o bn_mp_set_i64.o bn_mp_set_l.o bn_mp_set_ll.o bn_mp_set_u32.o \
bn_mp_set_u64.o bn_mp_set_ul.o bn_mp_set_ull.o bn_mp_shrink.o bn_mp_signed_rsh.o bn_mp_sqr.o \
bn_mp_sqrmod.o bn_mp_sqrt.o bn_mp_sqrtmod_prime.o bn_mp_sub.o bn_mp_sub_d.o bn_mp_submod.o \
bn_mp_to_radix.o bn_mp_to_sbin.o bn_mp_to_ubin.o bn_mp_ubin_size.o bn_mp_unpack.o bn_mp_xor.o bn_mp_zero.o \
bn_prime_tab.o bn_s_mp_add.o bn_s_mp_balance_mul.o bn_s_mp_exptmod.o bn_s_mp_exptmod_fast.o \
bn_s_mp_get_bit.o bn_s_mp_invmod_fast.o bn_s_mp_invmod_slow.o bn_s_mp_karatsuba_mul.o \
bn_s_mp_karatsuba_sqr.o bn_s_mp_montgomery_reduce_fast.o bn_s_mp_mul_digs.o bn_s_mp_mul_digs_fast.o \
bn_s_mp_mul_high_digs.o bn_s_mp_mul_high_digs_fast.o bn_s_mp_prime_is_divisible.o \
bn_s_mp_rand_jenkins.o bn_s_mp_rand_platform.o bn_s_mp_reverse.o bn_s_mp_sqr.o bn_s_mp_sqr_fast.o \
bn_s_mp_sub.o bn_s_mp_toom_mul.o bn_s_mp_toom_sqr.o
OBJECTS=mp_2expt.o mp_abs.o mp_add.o mp_add_d.o mp_addmod.o mp_and.o mp_clamp.o mp_clear.o mp_clear_multi.o \
mp_cmp.o mp_cmp_d.o mp_cmp_mag.o mp_cnt_lsb.o mp_complement.o mp_copy.o mp_count_bits.o mp_cutoffs.o \
mp_decr.o mp_div.o mp_div_2.o mp_div_2d.o mp_div_3.o mp_div_d.o mp_dr_is_modulus.o mp_dr_reduce.o \
mp_dr_setup.o mp_error_to_string.o mp_exch.o mp_expt_u32.o mp_exptmod.o mp_exteuclid.o mp_fread.o \
mp_from_sbin.o mp_from_ubin.o mp_fwrite.o mp_gcd.o mp_get_double.o mp_get_i32.o mp_get_i64.o mp_get_l.o \
mp_get_ll.o mp_get_mag_u32.o mp_get_mag_u64.o mp_get_mag_ul.o mp_get_mag_ull.o mp_grow.o mp_incr.o \
mp_init.o mp_init_copy.o mp_init_i32.o mp_init_i64.o mp_init_l.o mp_init_ll.o mp_init_multi.o mp_init_set.o \
mp_init_size.o mp_init_u32.o mp_init_u64.o mp_init_ul.o mp_init_ull.o mp_invmod.o mp_is_square.o \
mp_iseven.o mp_isodd.o mp_kronecker.o mp_lcm.o mp_log_u32.o mp_lshd.o mp_mod.o mp_mod_2d.o mp_mod_d.o \
mp_montgomery_calc_normalization.o mp_montgomery_reduce.o mp_montgomery_setup.o mp_mul.o mp_mul_2.o \
mp_mul_2d.o mp_mul_d.o mp_mulmod.o mp_neg.o mp_or.o mp_pack.o mp_pack_count.o mp_prime_fermat.o \
mp_prime_frobenius_underwood.o mp_prime_is_prime.o mp_prime_miller_rabin.o mp_prime_next_prime.o \
mp_prime_rabin_miller_trials.o mp_prime_rand.o mp_prime_strong_lucas_selfridge.o mp_prime_tab.o \
mp_radix_size.o mp_radix_smap.o mp_rand.o mp_read_radix.o mp_reduce.o mp_reduce_2k.o mp_reduce_2k_l.o \
mp_reduce_2k_setup.o mp_reduce_2k_setup_l.o mp_reduce_is_2k.o mp_reduce_is_2k_l.o mp_reduce_setup.o \
mp_root_u32.o mp_rshd.o mp_sbin_size.o mp_set.o mp_set_double.o mp_set_i32.o mp_set_i64.o mp_set_l.o \
mp_set_ll.o mp_set_u32.o mp_set_u64.o mp_set_ul.o mp_set_ull.o mp_shrink.o mp_signed_rsh.o mp_sqr.o \
mp_sqrmod.o mp_sqrt.o mp_sqrtmod_prime.o mp_sub.o mp_sub_d.o mp_submod.o mp_to_radix.o mp_to_sbin.o \
mp_to_ubin.o mp_ubin_size.o mp_unpack.o mp_xor.o mp_zero.o s_mp_add.o s_mp_balance_mul.o s_mp_exptmod.o \
s_mp_exptmod_fast.o s_mp_get_bit.o s_mp_invmod_fast.o s_mp_invmod_slow.o s_mp_karatsuba_mul.o \
s_mp_karatsuba_sqr.o s_mp_montgomery_reduce_fast.o s_mp_mul_digs.o s_mp_mul_digs_fast.o \
s_mp_mul_high_digs.o s_mp_mul_high_digs_fast.o s_mp_prime_is_divisible.o s_mp_rand_jenkins.o \
s_mp_rand_platform.o s_mp_reverse.o s_mp_sqr.o s_mp_sqr_fast.o s_mp_sub.o s_mp_toom_mul.o s_mp_toom_sqr.o
#END_INS

View File

@ -30,35 +30,29 @@ LTM_LDFLAGS = $(LDFLAGS)
#Library to be created (this makefile builds only static library)
LIBMAIN_S = libtommath.a
OBJECTS=bn_cutoffs.o bn_mp_2expt.o bn_mp_abs.o bn_mp_add.o bn_mp_add_d.o bn_mp_addmod.o bn_mp_and.o \
bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o bn_mp_cmp.o bn_mp_cmp_d.o bn_mp_cmp_mag.o bn_mp_cnt_lsb.o \
bn_mp_complement.o bn_mp_copy.o bn_mp_count_bits.o bn_mp_decr.o bn_mp_div.o bn_mp_div_2.o bn_mp_div_2d.o \
bn_mp_div_3.o bn_mp_div_d.o bn_mp_dr_is_modulus.o bn_mp_dr_reduce.o bn_mp_dr_setup.o \
bn_mp_error_to_string.o bn_mp_exch.o bn_mp_expt_u32.o bn_mp_exptmod.o bn_mp_exteuclid.o bn_mp_fread.o \
bn_mp_from_sbin.o bn_mp_from_ubin.o bn_mp_fwrite.o bn_mp_gcd.o bn_mp_get_double.o bn_mp_get_i32.o \
bn_mp_get_i64.o bn_mp_get_l.o bn_mp_get_ll.o bn_mp_get_mag_u32.o bn_mp_get_mag_u64.o bn_mp_get_mag_ul.o \
bn_mp_get_mag_ull.o bn_mp_grow.o bn_mp_incr.o bn_mp_init.o bn_mp_init_copy.o bn_mp_init_i32.o \
bn_mp_init_i64.o bn_mp_init_l.o bn_mp_init_ll.o bn_mp_init_multi.o bn_mp_init_set.o bn_mp_init_size.o \
bn_mp_init_u32.o bn_mp_init_u64.o bn_mp_init_ul.o bn_mp_init_ull.o bn_mp_invmod.o bn_mp_is_square.o \
bn_mp_iseven.o bn_mp_isodd.o bn_mp_kronecker.o bn_mp_lcm.o bn_mp_log_u32.o bn_mp_lshd.o bn_mp_mod.o \
bn_mp_mod_2d.o bn_mp_mod_d.o bn_mp_montgomery_calc_normalization.o bn_mp_montgomery_reduce.o \
bn_mp_montgomery_setup.o bn_mp_mul.o bn_mp_mul_2.o bn_mp_mul_2d.o bn_mp_mul_d.o bn_mp_mulmod.o bn_mp_neg.o \
bn_mp_or.o bn_mp_pack.o bn_mp_pack_count.o bn_mp_prime_fermat.o bn_mp_prime_frobenius_underwood.o \
bn_mp_prime_is_prime.o bn_mp_prime_miller_rabin.o bn_mp_prime_next_prime.o \
bn_mp_prime_rabin_miller_trials.o bn_mp_prime_rand.o bn_mp_prime_strong_lucas_selfridge.o \
bn_mp_radix_size.o bn_mp_radix_smap.o bn_mp_rand.o bn_mp_read_radix.o bn_mp_reduce.o bn_mp_reduce_2k.o \
bn_mp_reduce_2k_l.o bn_mp_reduce_2k_setup.o bn_mp_reduce_2k_setup_l.o bn_mp_reduce_is_2k.o \
bn_mp_reduce_is_2k_l.o bn_mp_reduce_setup.o bn_mp_root_u32.o bn_mp_rshd.o bn_mp_sbin_size.o bn_mp_set.o \
bn_mp_set_double.o bn_mp_set_i32.o bn_mp_set_i64.o bn_mp_set_l.o bn_mp_set_ll.o bn_mp_set_u32.o \
bn_mp_set_u64.o bn_mp_set_ul.o bn_mp_set_ull.o bn_mp_shrink.o bn_mp_signed_rsh.o bn_mp_sqr.o \
bn_mp_sqrmod.o bn_mp_sqrt.o bn_mp_sqrtmod_prime.o bn_mp_sub.o bn_mp_sub_d.o bn_mp_submod.o \
bn_mp_to_radix.o bn_mp_to_sbin.o bn_mp_to_ubin.o bn_mp_ubin_size.o bn_mp_unpack.o bn_mp_xor.o bn_mp_zero.o \
bn_prime_tab.o bn_s_mp_add.o bn_s_mp_balance_mul.o bn_s_mp_exptmod.o bn_s_mp_exptmod_fast.o \
bn_s_mp_get_bit.o bn_s_mp_invmod_fast.o bn_s_mp_invmod_slow.o bn_s_mp_karatsuba_mul.o \
bn_s_mp_karatsuba_sqr.o bn_s_mp_montgomery_reduce_fast.o bn_s_mp_mul_digs.o bn_s_mp_mul_digs_fast.o \
bn_s_mp_mul_high_digs.o bn_s_mp_mul_high_digs_fast.o bn_s_mp_prime_is_divisible.o \
bn_s_mp_rand_jenkins.o bn_s_mp_rand_platform.o bn_s_mp_reverse.o bn_s_mp_sqr.o bn_s_mp_sqr_fast.o \
bn_s_mp_sub.o bn_s_mp_toom_mul.o bn_s_mp_toom_sqr.o
OBJECTS=mp_2expt.o mp_abs.o mp_add.o mp_add_d.o mp_addmod.o mp_and.o mp_clamp.o mp_clear.o mp_clear_multi.o \
mp_cmp.o mp_cmp_d.o mp_cmp_mag.o mp_cnt_lsb.o mp_complement.o mp_copy.o mp_count_bits.o mp_cutoffs.o \
mp_decr.o mp_div.o mp_div_2.o mp_div_2d.o mp_div_3.o mp_div_d.o mp_dr_is_modulus.o mp_dr_reduce.o \
mp_dr_setup.o mp_error_to_string.o mp_exch.o mp_expt_u32.o mp_exptmod.o mp_exteuclid.o mp_fread.o \
mp_from_sbin.o mp_from_ubin.o mp_fwrite.o mp_gcd.o mp_get_double.o mp_get_i32.o mp_get_i64.o mp_get_l.o \
mp_get_ll.o mp_get_mag_u32.o mp_get_mag_u64.o mp_get_mag_ul.o mp_get_mag_ull.o mp_grow.o mp_incr.o \
mp_init.o mp_init_copy.o mp_init_i32.o mp_init_i64.o mp_init_l.o mp_init_ll.o mp_init_multi.o mp_init_set.o \
mp_init_size.o mp_init_u32.o mp_init_u64.o mp_init_ul.o mp_init_ull.o mp_invmod.o mp_is_square.o \
mp_iseven.o mp_isodd.o mp_kronecker.o mp_lcm.o mp_log_u32.o mp_lshd.o mp_mod.o mp_mod_2d.o mp_mod_d.o \
mp_montgomery_calc_normalization.o mp_montgomery_reduce.o mp_montgomery_setup.o mp_mul.o mp_mul_2.o \
mp_mul_2d.o mp_mul_d.o mp_mulmod.o mp_neg.o mp_or.o mp_pack.o mp_pack_count.o mp_prime_fermat.o \
mp_prime_frobenius_underwood.o mp_prime_is_prime.o mp_prime_miller_rabin.o mp_prime_next_prime.o \
mp_prime_rabin_miller_trials.o mp_prime_rand.o mp_prime_strong_lucas_selfridge.o mp_prime_tab.o \
mp_radix_size.o mp_radix_smap.o mp_rand.o mp_read_radix.o mp_reduce.o mp_reduce_2k.o mp_reduce_2k_l.o \
mp_reduce_2k_setup.o mp_reduce_2k_setup_l.o mp_reduce_is_2k.o mp_reduce_is_2k_l.o mp_reduce_setup.o \
mp_root_u32.o mp_rshd.o mp_sbin_size.o mp_set.o mp_set_double.o mp_set_i32.o mp_set_i64.o mp_set_l.o \
mp_set_ll.o mp_set_u32.o mp_set_u64.o mp_set_ul.o mp_set_ull.o mp_shrink.o mp_signed_rsh.o mp_sqr.o \
mp_sqrmod.o mp_sqrt.o mp_sqrtmod_prime.o mp_sub.o mp_sub_d.o mp_submod.o mp_to_radix.o mp_to_sbin.o \
mp_to_ubin.o mp_ubin_size.o mp_unpack.o mp_xor.o mp_zero.o s_mp_add.o s_mp_balance_mul.o s_mp_exptmod.o \
s_mp_exptmod_fast.o s_mp_get_bit.o s_mp_invmod_fast.o s_mp_invmod_slow.o s_mp_karatsuba_mul.o \
s_mp_karatsuba_sqr.o s_mp_montgomery_reduce_fast.o s_mp_mul_digs.o s_mp_mul_digs_fast.o \
s_mp_mul_high_digs.o s_mp_mul_high_digs_fast.o s_mp_prime_is_divisible.o s_mp_rand_jenkins.o \
s_mp_rand_platform.o s_mp_reverse.o s_mp_sqr.o s_mp_sqr_fast.o s_mp_sub.o s_mp_toom_mul.o s_mp_toom_sqr.o
HEADERS_PUB=tommath.h
HEADERS=tommath_private.h tommath_class.h tommath_superclass.h tommath_cutoffs.h $(HEADERS_PUB)

38
move.sh
View File

@ -1,38 +0,0 @@
#!/bin/bash
for i in *.c; do git mv $i ${i/bn_/}; done
git mv cutoffs.c mp_cutoffs.c
git mv deprecated.c mp_deprecated.c
git mv prime_tab.c mp_prime_tab.c
sed -E -i "s/CUTOFFS_C/MP_CUTOFFS_C/g" tommath_class.h tommath_superclass.h mp_cutoffs.c
sed -E -i "s/DEPRECATED_C/MP_DEPRECATED_C/g" tommath_class.h tommath_superclass.h mp_deprecated.c
sed -E -i "s/PRIME_TAB_C/MP_PRIME_TAB_C/g" tommath_class.h tommath_superclass.h mp_prime_tab.c
sed -E -i 's/BN_([_A-Z0-9]*_C)/\1/g' *.c */*.c etc/*.c *.h
sed -E -i "s/bn_([_a-z0-9]*\.c)/\1/g" *.c */*.c
sed -E -i "s/'BN_' \. //g" helper.pl
sed -E -i "s/BN_//g" helper.pl
sed -E -i "s/bn\*.c/*mp_*.c/g" helper.pl
sed -E -i "s/bn\*.c/*mp_*.c/g" gen.pl
sed -E -i "s/bn_//g" doc/bn.tex
sed -E -i 's/BN\\_//g' doc/bn.tex
sed -E -i "s/BN_H_/TOMMATH_H_/g" tommath.h
sed -E -i "s/TOMMATH_PRIV_H_/TOMMATH_PRIVATE_H_/g" tommath_private.h
sed -E -i 's/BN_##//' tommath_private.h
sed -E -i "s/BN_MP_DIV_SMALL/MP_DIV_SMALL/g" *.c *.h
sed -E -i 's/LTM_ERR/LBL_ERR/g' *.c */*.c
./helper.pl -u
git rm move.sh
git add .
git commit -m 'Execute move.sh - Rename files from bn_* to match the function names.
* git blame <renamed-file> is not affected
* git log --follow <renamed-file> can be used to show log across renames'
./helper.pl -a

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_2EXPT_C
#ifdef MP_2EXPT_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_ABS_C
#ifdef MP_ABS_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_ADD_C
#ifdef MP_ADD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_ADD_D_C
#ifdef MP_ADD_D_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_ADDMOD_C
#ifdef MP_ADDMOD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_AND_C
#ifdef MP_AND_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_CLAMP_C
#ifdef MP_CLAMP_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_CLEAR_C
#ifdef MP_CLEAR_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_CLEAR_MULTI_C
#ifdef MP_CLEAR_MULTI_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_CMP_C
#ifdef MP_CMP_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_CMP_D_C
#ifdef MP_CMP_D_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_CMP_MAG_C
#ifdef MP_CMP_MAG_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_CNT_LSB_C
#ifdef MP_CNT_LSB_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_COMPLEMENT_C
#ifdef MP_COMPLEMENT_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_COPY_C
#ifdef MP_COPY_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_COUNT_BITS_C
#ifdef MP_COUNT_BITS_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_CUTOFFS_C
#ifdef MP_CUTOFFS_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_DECR_C
#ifdef MP_DECR_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,9 +1,9 @@
#include "tommath_private.h"
#ifdef BN_MP_DIV_C
#ifdef MP_DIV_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
#ifdef BN_MP_DIV_SMALL
#ifdef MP_DIV_SMALL
/* slower bit-bang division... also smaller */
mp_err mp_div(const mp_int *a, const mp_int *b, mp_int *c, mp_int *d)

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_DIV_2_C
#ifdef MP_DIV_2_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_DIV_2D_C
#ifdef MP_DIV_2D_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_DIV_3_C
#ifdef MP_DIV_3_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_DIV_D_C
#ifdef MP_DIV_D_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_DR_IS_MODULUS_C
#ifdef MP_DR_IS_MODULUS_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_DR_REDUCE_C
#ifdef MP_DR_REDUCE_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_DR_SETUP_C
#ifdef MP_DR_SETUP_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_ERROR_TO_STRING_C
#ifdef MP_ERROR_TO_STRING_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_EXCH_C
#ifdef MP_EXCH_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_EXPT_U32_C
#ifdef MP_EXPT_U32_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_EXPTMOD_C
#ifdef MP_EXPTMOD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_EXTEUCLID_C
#ifdef MP_EXTEUCLID_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_FREAD_C
#ifdef MP_FREAD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_FROM_SBIN_C
#ifdef MP_FROM_SBIN_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_FROM_UBIN_C
#ifdef MP_FROM_UBIN_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_FWRITE_C
#ifdef MP_FWRITE_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_GCD_C
#ifdef MP_GCD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_GET_DOUBLE_C
#ifdef MP_GET_DOUBLE_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_GET_I32_C
#ifdef MP_GET_I32_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_GET_I64_C
#ifdef MP_GET_I64_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_GET_L_C
#ifdef MP_GET_L_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_GET_LL_C
#ifdef MP_GET_LL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_GET_MAG_U32_C
#ifdef MP_GET_MAG_U32_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_GET_MAG_U64_C
#ifdef MP_GET_MAG_U64_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_GET_MAG_UL_C
#ifdef MP_GET_MAG_UL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_GET_MAG_ULL_C
#ifdef MP_GET_MAG_ULL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_GROW_C
#ifdef MP_GROW_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INCR_C
#ifdef MP_INCR_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_C
#ifdef MP_INIT_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_COPY_C
#ifdef MP_INIT_COPY_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_I32_C
#ifdef MP_INIT_I32_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_I64_C
#ifdef MP_INIT_I64_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_L_C
#ifdef MP_INIT_L_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_LL_C
#ifdef MP_INIT_LL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_MULTI_C
#ifdef MP_INIT_MULTI_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_SET_C
#ifdef MP_INIT_SET_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_SIZE_C
#ifdef MP_INIT_SIZE_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_U32_C
#ifdef MP_INIT_U32_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_U64_C
#ifdef MP_INIT_U64_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_UL_C
#ifdef MP_INIT_UL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INIT_ULL_C
#ifdef MP_INIT_ULL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_INVMOD_C
#ifdef MP_INVMOD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_IS_SQUARE_C
#ifdef MP_IS_SQUARE_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_ISEVEN_C
#ifdef MP_ISEVEN_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_ISODD_C
#ifdef MP_ISODD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_KRONECKER_C
#ifdef MP_KRONECKER_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_LCM_C
#ifdef MP_LCM_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_LOG_U32_C
#ifdef MP_LOG_U32_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_LSHD_C
#ifdef MP_LSHD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
@ -37,7 +37,7 @@ mp_err mp_lshd(mp_int *a, int b)
/* much like mp_rshd this is implemented using a sliding window
* except the window goes the otherway around. Copying from
* the bottom to the top. see bn_mp_rshd.c for more info.
* the bottom to the top. see mp_rshd.c for more info.
*/
for (x = a->used - 1; x >= b; x--) {
*top-- = *bottom--;

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_MOD_C
#ifdef MP_MOD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_MOD_2D_C
#ifdef MP_MOD_2D_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_MOD_D_C
#ifdef MP_MOD_D_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_MONTGOMERY_CALC_NORMALIZATION_C
#ifdef MP_MONTGOMERY_CALC_NORMALIZATION_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_MONTGOMERY_REDUCE_C
#ifdef MP_MONTGOMERY_REDUCE_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_MONTGOMERY_SETUP_C
#ifdef MP_MONTGOMERY_SETUP_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_MUL_C
#ifdef MP_MUL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_MUL_2_C
#ifdef MP_MUL_2_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_MUL_2D_C
#ifdef MP_MUL_2D_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_MUL_D_C
#ifdef MP_MUL_D_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_MULMOD_C
#ifdef MP_MULMOD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_NEG_C
#ifdef MP_NEG_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_OR_C
#ifdef MP_OR_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_PACK_C
#ifdef MP_PACK_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_PACK_COUNT_C
#ifdef MP_PACK_COUNT_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_PRIME_FERMAT_C
#ifdef MP_PRIME_FERMAT_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,11 +1,11 @@
#include "tommath_private.h"
#ifdef BN_MP_PRIME_FROBENIUS_UNDERWOOD_C
#ifdef MP_PRIME_FROBENIUS_UNDERWOOD_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
/*
* See file bn_mp_prime_is_prime.c or the documentation in doc/bn.tex for the details
* See file mp_prime_is_prime.c or the documentation in doc/bn.tex for the details
*/
#ifndef LTM_USE_ONLY_MR

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_PRIME_IS_PRIME_C
#ifdef MP_PRIME_IS_PRIME_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_PRIME_MILLER_RABIN_C
#ifdef MP_PRIME_MILLER_RABIN_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

View File

@ -1,5 +1,5 @@
#include "tommath_private.h"
#ifdef BN_MP_PRIME_NEXT_PRIME_C
#ifdef MP_PRIME_NEXT_PRIME_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

Some files were not shown because too many files have changed in this diff Show More