I2P: End-to-End encrypted and anonymous Internet https://i2pd.website/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
436 B

5 years ago
#ifndef ELLIGATOR_H__
#define ELLIGATOR_H__
#include <inttypes.h>
5 years ago
#include <memory>
#include <openssl/bn.h>
5 years ago
namespace i2p
{
namespace crypto
{
class Elligator2
{
public:
Elligator2 ();
~Elligator2 ();
void Encode (const uint8_t * key, uint8_t * encoded) const;
private:
BIGNUM * p, * n1, * n2, * p38, * p12, * sqrtn1, * A, * nA, * u, * iu, * d;
5 years ago
};
std::unique_ptr<Elligator2>& GetElligator ();
}
}
#endif