Commit c9842d2c authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

rsaenh: Make some data const and static.

parent 8c3fdfea
......@@ -31,6 +31,14 @@
#include <stdarg.h>
#include "tomcrypt.h"
/* Known optimal configurations
CPU /Compiler /MUL CUTOFF/SQR CUTOFF
-------------------------------------------------------------
Intel P4 Northwood /GCC v3.4.1 / 88/ 128/LTM 0.32 ;-)
*/
static const int KARATSUBA_MUL_CUTOFF = 88, /* Min. number of digits before Karatsuba multiplication is used. */
KARATSUBA_SQR_CUTOFF = 128; /* Min. number of digits before Karatsuba squaring is used. */
/* computes the modular inverse via binary extended euclidean algorithm,
* that is c = 1/a mod b
*
......@@ -4409,14 +4417,3 @@ s_mp_sub (mp_int * a, mp_int * b, mp_int * c)
mp_clamp (c);
return MP_OKAY;
}
/* Known optimal configurations
CPU /Compiler /MUL CUTOFF/SQR CUTOFF
-------------------------------------------------------------
Intel P4 Northwood /GCC v3.4.1 / 88/ 128/LTM 0.32 ;-)
*/
int KARATSUBA_MUL_CUTOFF = 88, /* Min. number of digits before Karatsuba multiplication is used. */
KARATSUBA_SQR_CUTOFF = 128; /* Min. number of digits before Karatsuba squaring is used. */
......@@ -156,7 +156,7 @@ typedef struct tagKEYCONTAINER
*/
#define RSAENH_MAX_ENUMALGS 20
#define RSAENH_PCT1_SSL2_SSL3_TLS1 (CRYPT_FLAG_PCT1|CRYPT_FLAG_SSL2|CRYPT_FLAG_SSL3|CRYPT_FLAG_TLS1)
PROV_ENUMALGS_EX aProvEnumAlgsEx[4][RSAENH_MAX_ENUMALGS+1] =
static const PROV_ENUMALGS_EX aProvEnumAlgsEx[4][RSAENH_MAX_ENUMALGS+1] =
{
{
{CALG_RC2, 40, 40, 56,0, 4,"RC2", 24,"RSA Data Security's RC2"},
......@@ -395,7 +395,7 @@ static inline BOOL copy_param(
* Failure: NULL (algid not supported)
*/
static inline const PROV_ENUMALGS_EX* get_algid_info(HCRYPTPROV hProv, ALG_ID algid) {
PROV_ENUMALGS_EX *iterator;
const PROV_ENUMALGS_EX *iterator;
KEYCONTAINER *pKeyContainer;
if (!lookup_handle(&handle_table, hProv, RSAENH_MAGIC_CONTAINER, (OBJECTHDR**)&pKeyContainer)) {
......
......@@ -204,10 +204,6 @@ typedef ulong64 mp_word;
typedef int mp_err;
/* you'll have to tune these... */
extern int KARATSUBA_MUL_CUTOFF,
KARATSUBA_SQR_CUTOFF;
/* define this to use lower memory usage routines (exptmods mostly) */
/* #define MP_LOW_MEM */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment