/*
*
* ec_point.c
*
* Elliptic Curve Arithmetic Functions
*
* Copyright (C) Lenka Fibikova 2000
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <memory.h>
#include <openssl/bn.h>
#include "../bn/bn_mont2.h" /* XXX */
#include "ec.h"
EC_POINT *ECP_new()
{
EC_POINT *ret;
ret=(EC_POINT *)malloc(sizeof(EC_POINT));
if (ret == NULL) return NULL;
ret->X = BN_new();
ret->Y = BN_new();
ret->Z = BN_new();
ret->is_in_mont = 0;
if (ret->X == NULL || ret->Y == NULL || ret->