/*
* Use is subject to license terms.
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* *********************************************************************
*
* The Original Code is the Netscape security libraries.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1994-2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dr Vipul Gupta <vipul.gupta@sun.com> and
* Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
*
*********************************************************************** */
#ifndef _ECC_IMPL_H
#define _ECC_IMPL_H
#ifdef __cplusplus
extern "C" {
#endif
#include "ecl-exp.h"
/*
* Multi-platform definitions
*/
#ifdef __linux__
typedef unsigned char uint8_t;
typedef unsigned long ulong_t;
#endif /* __linux__ */
#ifdef _ALLBSD_SOURCE
#include <stdint.h>
typedef unsigned long ulong_t;
#endif /* _ALLBSD_SOURCE */
#ifdef _WIN32
typedef unsigned char uint8_t;
typedef unsigned long ulong_t;
#endif /* _WIN32 */
#ifndef _KERNEL
#include <stdlib.h>
#endif /* _KERNEL */
/*
* Various structures and definitions from NSS are here.
*/
#ifdef _KERNEL
#else
#endif
#define PORT_ArenaUnmark(a, b)
#define PORT_ArenaRelease(a, m)
#define PORT_FreeArena(a, b)
#define PORT_SetError(e)
#ifdef _KERNEL
#else
#endif
typedef enum {
siBuffer = 0,
} SECItemType;
struct SECItemStr {
unsigned char *data;
unsigned int len;
};
typedef enum { ec_params_explicit,
} ECParamsType;
} ECFieldType;
struct ECFieldIDStr {
union {
} u;
* the only coefficient of trinomial
*/
int k3;
};
struct ECCurveStr {
SECItem a; /* contains octet stream encoding of
* field element (X9.62 section 4.3.3)
*/
SECItem b;
};
typedef void PRArenaPool;
struct ECParamsStr {
int cofactor;
};
struct ECPublicKeyStr {
* octet stream.
*/
};
struct ECPrivateKeyStr {
};
typedef enum _SECStatus {
SECSuccess = 0
} SECStatus;
#ifdef _KERNEL
#else
/*
This function is no longer required because the random bytes are now
supplied by the caller. Force a failure.
*/
#endif
int);
/* This function has been modified to accept an array of random bytes */
/* This function has been modified to accept an array of random bytes */
const SECItem *, int);
SECItem *, int);
#ifdef __cplusplus
}
#endif
#endif /* _ECC_IMPL_H */