summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src
diff options
context:
space:
mode:
Diffstat (limited to 'libtomcrypt/src')
-rw-r--r--libtomcrypt/src/headers/tomcrypt.h2
-rw-r--r--libtomcrypt/src/headers/tomcrypt_custom.h2
-rw-r--r--libtomcrypt/src/headers/tomcrypt_math.h6
-rw-r--r--libtomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.c2
-rw-r--r--libtomcrypt/src/pk/ecc/ecc_decrypt_key.c2
-rw-r--r--libtomcrypt/src/pk/ecc/ecc_encrypt_key.c2
-rw-r--r--libtomcrypt/src/pk/ecc/ecc_export.c2
-rw-r--r--libtomcrypt/src/pk/ecc/ecc_import.c2
-rw-r--r--libtomcrypt/src/pk/ecc/ecc_sign_hash.c2
-rw-r--r--libtomcrypt/src/pk/ecc/ecc_verify_hash.c2
10 files changed, 10 insertions, 14 deletions
diff --git a/libtomcrypt/src/headers/tomcrypt.h b/libtomcrypt/src/headers/tomcrypt.h
index 15ccd04..ba9f181 100644
--- a/libtomcrypt/src/headers/tomcrypt.h
+++ b/libtomcrypt/src/headers/tomcrypt.h
@@ -24,7 +24,7 @@ extern "C" {
/* descriptor table size */
/* Dropbear change - this should be smaller, saves some size */
-#define TAB_SIZE 4
+#define TAB_SIZE 5
/* error codes [will be expanded in future releases] */
enum {
diff --git a/libtomcrypt/src/headers/tomcrypt_custom.h b/libtomcrypt/src/headers/tomcrypt_custom.h
index d1d86c6..91a2ccb 100644
--- a/libtomcrypt/src/headers/tomcrypt_custom.h
+++ b/libtomcrypt/src/headers/tomcrypt_custom.h
@@ -138,6 +138,8 @@
#ifdef DROPBEAR_ECC
#define MECC
+#define MPI
+#define LTM_DESC
#ifdef DROPBEAR_ECC_256
#define ECC256
#endif
diff --git a/libtomcrypt/src/headers/tomcrypt_math.h b/libtomcrypt/src/headers/tomcrypt_math.h
index 8bf544f..c996e41 100644
--- a/libtomcrypt/src/headers/tomcrypt_math.h
+++ b/libtomcrypt/src/headers/tomcrypt_math.h
@@ -11,12 +11,9 @@
typedef void ecc_point;
#endif
-/* Dropbear has its own rsa_key. We just comment this out. */
-#if 0
#ifndef MRSA
typedef void rsa_key;
#endif
-#endif
/** math descriptor */
typedef struct {
@@ -389,8 +386,6 @@ typedef struct {
ecc_point *C,
void *modulus);
-/* Dropbear has its own rsa code */
-#if 0
/* ---- (optional) rsa optimized math (for internal CRT) ---- */
/** RSA Key Generation
@@ -416,7 +411,6 @@ typedef struct {
int (*rsa_me)(const unsigned char *in, unsigned long inlen,
unsigned char *out, unsigned long *outlen, int which,
rsa_key *key);
-#endif
} ltc_math_descriptor;
extern ltc_math_descriptor ltc_mp;
diff --git a/libtomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.c b/libtomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.c
index 907862f..e042910 100644
--- a/libtomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.c
+++ b/libtomcrypt/src/misc/crypt/crypt_ltc_mp_descriptor.c
@@ -10,4 +10,4 @@
*/
#include "tomcrypt.h"
-ltc_math_descriptor ltc_mp;
+ltc_math_descriptor ltc_mp = {0};
diff --git a/libtomcrypt/src/pk/ecc/ecc_decrypt_key.c b/libtomcrypt/src/pk/ecc/ecc_decrypt_key.c
index bb56208..97039d0 100644
--- a/libtomcrypt/src/pk/ecc/ecc_decrypt_key.c
+++ b/libtomcrypt/src/pk/ecc/ecc_decrypt_key.c
@@ -21,7 +21,7 @@
ECC Crypto, Tom St Denis
*/
-#ifdef MECC
+#if defined(MECC) && defined(LTC_DER)
/**
Decrypt an ECC encrypted key
diff --git a/libtomcrypt/src/pk/ecc/ecc_encrypt_key.c b/libtomcrypt/src/pk/ecc/ecc_encrypt_key.c
index dd9bab0..d11ffe4 100644
--- a/libtomcrypt/src/pk/ecc/ecc_encrypt_key.c
+++ b/libtomcrypt/src/pk/ecc/ecc_encrypt_key.c
@@ -21,7 +21,7 @@
ECC Crypto, Tom St Denis
*/
-#ifdef MECC
+#if defined(MECC) && defined(LTC_DER)
/**
Encrypt a symmetric key with ECC
diff --git a/libtomcrypt/src/pk/ecc/ecc_export.c b/libtomcrypt/src/pk/ecc/ecc_export.c
index 1919849..08c8d31 100644
--- a/libtomcrypt/src/pk/ecc/ecc_export.c
+++ b/libtomcrypt/src/pk/ecc/ecc_export.c
@@ -21,7 +21,7 @@
ECC Crypto, Tom St Denis
*/
-#ifdef MECC
+#if defined(MECC) && defined(LTC_DER)
/**
Export an ECC key as a binary packet
diff --git a/libtomcrypt/src/pk/ecc/ecc_import.c b/libtomcrypt/src/pk/ecc/ecc_import.c
index 4adb28e..97eaa7d 100644
--- a/libtomcrypt/src/pk/ecc/ecc_import.c
+++ b/libtomcrypt/src/pk/ecc/ecc_import.c
@@ -21,7 +21,7 @@
ECC Crypto, Tom St Denis
*/
-#ifdef MECC
+#if defined(MECC) && defined(LTC_DER)
static int is_point(ecc_key *key)
{
diff --git a/libtomcrypt/src/pk/ecc/ecc_sign_hash.c b/libtomcrypt/src/pk/ecc/ecc_sign_hash.c
index 44f949e..34c5893 100644
--- a/libtomcrypt/src/pk/ecc/ecc_sign_hash.c
+++ b/libtomcrypt/src/pk/ecc/ecc_sign_hash.c
@@ -21,7 +21,7 @@
ECC Crypto, Tom St Denis
*/
-#ifdef MECC
+#if defined(MECC) && defined(LTC_DER)
/**
Sign a message digest
diff --git a/libtomcrypt/src/pk/ecc/ecc_verify_hash.c b/libtomcrypt/src/pk/ecc/ecc_verify_hash.c
index bd8a840..65a96e6 100644
--- a/libtomcrypt/src/pk/ecc/ecc_verify_hash.c
+++ b/libtomcrypt/src/pk/ecc/ecc_verify_hash.c
@@ -21,7 +21,7 @@
ECC Crypto, Tom St Denis
*/
-#ifdef MECC
+#if defined(MECC) && defined(LTC_DER)
/* verify
*