Elligator's encode

This commit is contained in:
orignal 2019-12-05 16:03:11 -05:00
parent 5fa2485a7d
commit df1aa52e08
2 changed files with 76 additions and 0 deletions

View file

@ -1,7 +1,9 @@
#ifndef ELLIGATOR_H__
#define ELLIGATOR_H__
#include <inttypes.h>
#include <memory>
#include <openssl/bn.h>
namespace i2p
{
@ -14,6 +16,12 @@ namespace crypto
Elligator2 ();
~Elligator2 ();
void Encode (const uint8_t * key, uint8_t * encoded) const;
private:
BIGNUM * p, * n1, * n2, * A, * u, * iu;
};
std::unique_ptr<Elligator2>& GetElligator ();