Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,5 @@ test_*.txt
*.asc
*.tar.xz
*.zip

doc/pics/*.ps
12 changes: 4 additions & 8 deletions bn_deprecated.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@
#ifdef BN_DEPRECATED_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
/* LibTomMath, multiple-precision integer library -- Tom St Denis */

/* SPDX-License-Identifier: Unlicense */
#include <tommath_private.h>
#ifdef BN_MP_GET_BIT_C
/* Checks the bit at position b and returns MP_YES
if the bit is 1, MP_NO if it is 0 and MP_VAL
in case of error */
int mp_get_bit(const mp_int *a, int b)
{
if (b < 0) {
Expand All @@ -18,7 +12,7 @@ int mp_get_bit(const mp_int *a, int b)
return s_mp_get_bit(a, (unsigned int)b) == MP_YES ? MP_YES : MP_NO;
}
#endif
#ifdef BN_MP_JACOBI_C
#ifdef BN_S_MP_JACOBI_C
mp_err s_mp_jacobi(const mp_int *a, const mp_int *n, int *c)
{
if (a->sign == MP_NEG) {
Expand All @@ -29,6 +23,8 @@ mp_err s_mp_jacobi(const mp_int *a, const mp_int *n, int *c)
}
return mp_kronecker(a, n, c);
}
#endif
#ifdef BN_MP_JACOBI_C
mp_err mp_jacobi(const mp_int *a, const mp_int *n, int *c)
{
return s_mp_jacobi(a, n, c);
Expand Down Expand Up @@ -120,7 +116,7 @@ mp_err mp_toom_sqr(const mp_int *a, mp_int *b)
return s_mp_toom_sqr(a, b);
}
#endif
#ifdef BN_REVERSE_C
#ifdef S_MP_REVERSE_C
void bn_reverse(unsigned char *s, int len)
{
s_mp_reverse(s, len);
Expand Down
8 changes: 0 additions & 8 deletions tommath_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

#include "tommath.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Hardening libtommath
* --------------------
*
Expand Down Expand Up @@ -222,8 +218,4 @@ MP_DEPRECATED(s_mp_toom_mul) mp_err mp_toom_mul(const mp_int *a, const mp_int *b
MP_DEPRECATED(s_mp_toom_sqr) mp_err mp_toom_sqr(const mp_int *a, mp_int *b);
MP_DEPRECATED(s_mp_reverse) void bn_reverse(unsigned char *s, int len);

#ifdef __cplusplus
}
#endif

#endif