implemented Legendre

This commit is contained in:
orignal 2019-12-10 10:45:08 -05:00
parent 8d74905257
commit 7417867d0f
2 changed files with 75 additions and 44 deletions

View file

@ -17,12 +17,13 @@ namespace crypto
Elligator2 ();
~Elligator2 ();
void Encode (const uint8_t * key, uint8_t * encoded) const;
void Decode (const uint8_t * encoded, uint8_t * key) const;
bool Encode (const uint8_t * key, uint8_t * encoded) const;
bool Decode (const uint8_t * encoded, uint8_t * key) const;
private:
void SquareRoot (const BIGNUM * x, BIGNUM * r, BN_CTX * ctx) const;
int Legendre (const BIGNUM * a, BN_CTX * ctx) const; // a/p
private: