]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - ecdsa/ecc.h
[ecdsa] some progress but still unfinished
[avr-crypto-lib.git] / ecdsa / ecc.h
index ac7d98c4f03e1343bfdc953739b78df3ecd18cbc..225b31bb8d844390859d3e47bbd6d597056f556b 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef ECC_H_
 #define ECC_H_
 
+#include <stddef.h>
+
 typedef struct {
     bigint_t x;
     bigint_t y;
@@ -33,7 +35,7 @@ typedef struct {
     bigint_t y;
 } ecc_affine_point_t;
 
-typedef struct __attribute__((packed)){
+typedef union __attribute__((packed)){
     ecc_affine_point_t affine;
     ecc_chudnovsky_point_t chudnovsky;
 } ecc_combi_point_t;
@@ -44,6 +46,11 @@ typedef struct {
     int (*reduce_p)(bigint_t*);
 } ecc_curve_sp_t;
 
+
+uint8_t ecc_chudnovsky_point_alloc(ecc_chudnovsky_point_t* p, size_t length_B);
+
+void ecc_chudnovsky_point_free(ecc_chudnovsky_point_t* p);
+
 void ecc_chudnovsky_point_print(const ecc_chudnovsky_point_t *p);