mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
Elligator's encode
This commit is contained in:
parent
5fa2485a7d
commit
df1aa52e08
2 changed files with 76 additions and 0 deletions
|
@ -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 ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue