mirror of
https://github.com/clearml/dropbear
synced 2025-06-26 18:17:32 +00:00
ecc kind of works, needs fixing/testing
--HG-- branch : ecc
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -138,6 +138,8 @@
|
||||
|
||||
#ifdef DROPBEAR_ECC
|
||||
#define MECC
|
||||
#define MPI
|
||||
#define LTM_DESC
|
||||
#ifdef DROPBEAR_ECC_256
|
||||
#define ECC256
|
||||
#endif
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
|
||||
ltc_math_descriptor ltc_mp;
|
||||
ltc_math_descriptor ltc_mp = {0};
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
ECC Crypto, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef MECC
|
||||
#if defined(MECC) && defined(LTC_DER)
|
||||
|
||||
/**
|
||||
Decrypt an ECC encrypted key
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
ECC Crypto, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef MECC
|
||||
#if defined(MECC) && defined(LTC_DER)
|
||||
|
||||
/**
|
||||
Encrypt a symmetric key with ECC
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
ECC Crypto, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef MECC
|
||||
#if defined(MECC) && defined(LTC_DER)
|
||||
|
||||
static int is_point(ecc_key *key)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
ECC Crypto, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef MECC
|
||||
#if defined(MECC) && defined(LTC_DER)
|
||||
|
||||
/**
|
||||
Sign a message digest
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
ECC Crypto, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef MECC
|
||||
#if defined(MECC) && defined(LTC_DER)
|
||||
|
||||
/* verify
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user