initial version of SQIsign
Co-authored-by: Jorge Chavez-Saab <jorgechavezsaab@gmail.com> Co-authored-by: Maria Corte-Real Santos <36373796+mariascrs@users.noreply.github.com> Co-authored-by: Luca De Feo <github@defeo.lu> Co-authored-by: Jonathan Komada Eriksen <jonathan.eriksen97@gmail.com> Co-authored-by: Basil Hess <bhe@zurich.ibm.com> Co-authored-by: Antonin Leroux <18654258+tonioecto@users.noreply.github.com> Co-authored-by: Patrick Longa <plonga@microsoft.com> Co-authored-by: Lorenz Panny <lorenz@yx7.cc> Co-authored-by: Francisco Rodríguez-Henríquez <francisco.rodriguez@tii.ae> Co-authored-by: Sina Schaeffler <108983332+syndrakon@users.noreply.github.com> Co-authored-by: Benjamin Wesolowski <19474926+Calodeon@users.noreply.github.com>
This commit is contained in:
28
src/ec/ref/include/tedwards.h
Executable file
28
src/ec/ref/include/tedwards.h
Executable file
@@ -0,0 +1,28 @@
|
||||
#ifndef TEDWARDS_H
|
||||
#define TEDWARDS_H
|
||||
|
||||
#include <fp2.h>
|
||||
#include "ec.h"
|
||||
|
||||
// a*x^2+y^2=1+d*x^2*y^2
|
||||
|
||||
typedef struct ted_point_t {
|
||||
fp2_t x;
|
||||
fp2_t y;
|
||||
fp2_t z;
|
||||
fp2_t t; // t = x*y/z
|
||||
} ted_point_t;
|
||||
|
||||
void ted_init(ted_point_t* P);
|
||||
bool is_ted_equal(ted_point_t const* P1, ted_point_t const* P2);
|
||||
void copy_ted_point(ted_point_t* P, ted_point_t const* Q);
|
||||
|
||||
void ted_neg(ted_point_t* Q, ted_point_t const* P);
|
||||
void ted_dbl(ted_point_t* Q, ted_point_t const* P, ec_curve_t const* E);
|
||||
void ted_add(ted_point_t* S, ted_point_t const* P, ted_point_t const* Q, ec_curve_t const* E);
|
||||
|
||||
void mont_to_ted(ec_curve_t* E, ec_curve_t const* A);
|
||||
void mont_to_ted_point(ted_point_t* Q, ec_point_t const* P, ec_curve_t const* A);
|
||||
void ted_to_mont_point(ec_point_t* Q, ted_point_t const* P);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user