Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Ec2 Class Reference

#include <bn254_if.hpp>

Public Member Functions

 Ec2 ()
 
 Ec2 (const Ec2 &x)
 
 Ec2 (const Fp2 &x, const Fp2 &y) throw (std::exception)
 
 Ec2 (const Fp2 &x, const Fp2 &y, const Fp2 &z) throw (std::exception)
 
bool isValid () const
 
void set (const Fp2 &x, const Fp2 &y) throw (std::exception)
 
void set (const Fp2 &x, const Fp2 &y, const Fp2 &z) throw (std::exception)
 
void set (const std::string &str) throw (std::exception)
 
std::string toString () const throw (std::exception)
 
bool equals (const Ec2 &rhs) const
 
bool isZero () const
 
void clear ()
 
void dbl ()
 
void neg ()
 
void add (const Ec2 &rhs)
 
void sub (const Ec2 &rhs)
 
void mul (const Mpz &rhs)
 
Fp2getX ()
 
Fp2getY ()
 
Fp2getZ ()
 

Friends

class Fp12
 

Detailed Description

Definition at line 198 of file bn254_if.hpp.

Constructor & Destructor Documentation

◆ Ec2() [1/4]

Ec2::Ec2 ( )
inline

Definition at line 202 of file bn254_if.hpp.

202{}

◆ Ec2() [2/4]

Ec2::Ec2 ( const Ec2 & x)
inline

Definition at line 203 of file bn254_if.hpp.

203: self_(x.self_) {}

◆ Ec2() [3/4]

Ec2::Ec2 ( const Fp2 & x,
const Fp2 & y )
throw (std::exception )
inline

Definition at line 204 of file bn254_if.hpp.

205 {
206 set(x, y);
207 }
bool set

◆ Ec2() [4/4]

Ec2::Ec2 ( const Fp2 & x,
const Fp2 & y,
const Fp2 & z )
throw (std::exception )
inline

Definition at line 208 of file bn254_if.hpp.

209 {
210 set(x, y, z);
211 }

Member Function Documentation

◆ add()

void Ec2::add ( const Ec2 & rhs)
inline

Definition at line 237 of file bn254_if.hpp.

237{ ::bn::Ec2::add(self_, self_, rhs.self_); }
static void add(EcT &R, const EcT &P, const EcT &Q)
Definition bn.h:2871
Here is the call graph for this function:

◆ clear()

void Ec2::clear ( )
inline

Definition at line 234 of file bn254_if.hpp.

234{ self_.clear(); }
void clear()
Definition bn.h:2860
Here is the call graph for this function:

◆ dbl()

void Ec2::dbl ( )
inline

Definition at line 235 of file bn254_if.hpp.

235{ ::bn::Ec2::dbl(self_, self_); }
static void dbl(EcT &R, const EcT &P)
Definition bn.h:2867
Here is the call graph for this function:

◆ equals()

bool Ec2::equals ( const Ec2 & rhs) const
inline

Definition at line 232 of file bn254_if.hpp.

232{ return self_ == rhs.self_; }

◆ getX()

Fp2 & Ec2::getX ( )
inline

Definition at line 240 of file bn254_if.hpp.

240{ return *reinterpret_cast<Fp2*>(&self_.p[0]); }
T p[3]
Definition bn.h:2817

◆ getY()

Fp2 & Ec2::getY ( )
inline

Definition at line 241 of file bn254_if.hpp.

241{ return *reinterpret_cast<Fp2*>(&self_.p[1]); }

◆ getZ()

Fp2 & Ec2::getZ ( )
inline

Definition at line 242 of file bn254_if.hpp.

242{ return *reinterpret_cast<Fp2*>(&self_.p[2]); }

◆ isValid()

bool Ec2::isValid ( ) const
inline

Definition at line 212 of file bn254_if.hpp.

212{ return self_.isValid(); }
bool isValid() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isZero()

bool Ec2::isZero ( ) const
inline

Definition at line 233 of file bn254_if.hpp.

233{ return self_.isZero(); }
bool isZero() const
Definition bn.h:2911
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mul()

void Ec2::mul ( const Mpz & rhs)
inline

Definition at line 239 of file bn254_if.hpp.

239{ ::bn::Ec2::mul(self_, self_, rhs.self_); }
static void mul(EcT &R, const EcT &P, const N &y)
Definition bn.h:2888
Here is the call graph for this function:
Here is the caller graph for this function:

◆ neg()

void Ec2::neg ( )
inline

Definition at line 236 of file bn254_if.hpp.

236{ ::bn::Ec2::neg(self_, self_); }
static void neg(EcT &R, const EcT &P)
Definition bn.h:2881
Here is the call graph for this function:

◆ set() [1/3]

void Ec2::set ( const Fp2 & x,
const Fp2 & y )
throw (std::exception )
inline

Definition at line 213 of file bn254_if.hpp.

214 {
215 self_.set(x.self_, y.self_);
216 }
void set(const T &x, const T &y, bool verify=true)
Definition bn.h:2842
uint64_t y
Definition sha3.cpp:34
Here is the call graph for this function:

◆ set() [2/3]

void Ec2::set ( const Fp2 & x,
const Fp2 & y,
const Fp2 & z )
throw (std::exception )
inline

Definition at line 217 of file bn254_if.hpp.

218 {
219 self_.set(x.self_, y.self_, z.self_);
220 }
Here is the call graph for this function:

◆ set() [3/3]

void Ec2::set ( const std::string & str)
throw (std::exception )
inline

Definition at line 221 of file bn254_if.hpp.

222 {
223 std::istringstream iss(str);
224 iss >> self_;
225 }

◆ sub()

void Ec2::sub ( const Ec2 & rhs)
inline

Definition at line 238 of file bn254_if.hpp.

238{ ::bn::Ec2::sub(self_, self_, rhs.self_); }
static void sub(EcT &R, const EcT &P, const EcT &Q)
Definition bn.h:2875
Here is the call graph for this function:

◆ toString()

std::string Ec2::toString ( ) const
throw (std::exception )
inline

Definition at line 226 of file bn254_if.hpp.

227 {
228 std::ostringstream oss;
229 oss << self_;
230 return oss.str();
231 }

Friends And Related Symbol Documentation

◆ Fp12

friend class Fp12
friend

Definition at line 200 of file bn254_if.hpp.


The documentation for this class was generated from the following file: