X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=crypto%2Flibeddsa%2Flib%2Fed.h;fp=crypto%2Flibeddsa%2Flib%2Fed.h;h=285040ac4394f93bb20fbbd716439e7f21b933d4;hb=7bfbc0423ba40ea5156e06c8fb62bacd5ea93390;hp=0000000000000000000000000000000000000000;hpb=2ae349f5ed63b026cff763b35984dd36b330870a;p=zpackage diff --git a/crypto/libeddsa/lib/ed.h b/crypto/libeddsa/lib/ed.h new file mode 100644 index 0000000..285040a --- /dev/null +++ b/crypto/libeddsa/lib/ed.h @@ -0,0 +1,29 @@ +#ifndef ED_H +#define ED_H + +#include + +#include "fld.h" +#include "sc.h" + + +/* (x,y,z) are the projective points on our curve E and t = x*y is an + * auxiliary coordinate (see [2], ch. 3). + */ +struct ed { + fld_t x; + fld_t y; + fld_t t; + fld_t z; +}; + + +void ed_export(uint8_t out[32], const struct ed *P); +void ed_import(struct ed *P, const uint8_t in[32]); + +void ed_scale_base(struct ed *res, const sc_t x); + +void ed_dual_scale(struct ed *R, const sc_t x, + const sc_t y, const struct ed *Q); + +#endif