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

#include <bn254_if.hpp>

Public Member Functions

 Ec1 ()
 
 Ec1 (const Ec1 &x)
 
 Ec1 (const Fp &x, const Fp &y) throw (std::exception)
 
 Ec1 (const Fp &x, const Fp &y, const Fp &z) throw (std::exception)
 
bool isValid () const
 
void set (const Fp &x, const Fp &y) throw (std::exception)
 
void set (const Fp &x, const Fp &y, const Fp &z) throw (std::exception)
 
void set (const std::string &str) throw (std::exception)
 
std::string toString () const throw (std::exception)
 
bool equals (const Ec1 &rhs) const
 
bool isZero () const
 
void clear ()
 
void dbl ()
 
void neg ()
 
void add (const Ec1 &rhs)
 
void sub (const Ec1 &rhs)
 
void mul (const Mpz &rhs)
 
FpgetX ()
 
FpgetY ()
 
FpgetZ ()
 

Friends

class Fp12
 

Detailed Description

Definition at line 151 of file bn254_if.hpp.

Constructor & Destructor Documentation

◆ Ec1() [1/4]

Ec1::Ec1 ( )
inline

Definition at line 155 of file bn254_if.hpp.

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

◆ Ec1() [2/4]

Ec1::Ec1 ( const Ec1 & x)
inline

Definition at line 156 of file bn254_if.hpp.

156: self_(x.self_) {}

◆ Ec1() [3/4]

Ec1::Ec1 ( const Fp & x,
const Fp & y )
throw (std::exception )
inline

Definition at line 157 of file bn254_if.hpp.

158 {
159 set(x, y);
160 }
bool set

◆ Ec1() [4/4]

Ec1::Ec1 ( const Fp & x,
const Fp & y,
const Fp & z )
throw (std::exception )
inline

Definition at line 161 of file bn254_if.hpp.

162 {
163 set(x, y, z);
164 }

Member Function Documentation

◆ add()

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

Definition at line 190 of file bn254_if.hpp.

190{ ::bn::Ec1::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:
Here is the caller graph for this function:

◆ clear()

void Ec1::clear ( )
inline

Definition at line 187 of file bn254_if.hpp.

187{ self_.clear(); }
Here is the call graph for this function:

◆ dbl()

void Ec1::dbl ( )
inline

Definition at line 188 of file bn254_if.hpp.

188{ ::bn::Ec1::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 Ec1::equals ( const Ec1 & rhs) const
inline

Definition at line 185 of file bn254_if.hpp.

185{ return self_ == rhs.self_; }

◆ getX()

Fp & Ec1::getX ( )
inline

Definition at line 193 of file bn254_if.hpp.

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

◆ getY()

Fp & Ec1::getY ( )
inline

Definition at line 194 of file bn254_if.hpp.

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

◆ getZ()

Fp & Ec1::getZ ( )
inline

Definition at line 195 of file bn254_if.hpp.

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

◆ isValid()

bool Ec1::isValid ( ) const
inline

Definition at line 165 of file bn254_if.hpp.

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

◆ isZero()

bool Ec1::isZero ( ) const
inline

Definition at line 186 of file bn254_if.hpp.

186{ 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 Ec1::mul ( const Mpz & rhs)
inline

Definition at line 192 of file bn254_if.hpp.

192{ ::bn::Ec1::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 Ec1::neg ( )
inline

Definition at line 189 of file bn254_if.hpp.

189{ ::bn::Ec1::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 Ec1::set ( const Fp & x,
const Fp & y )
throw (std::exception )
inline

Definition at line 166 of file bn254_if.hpp.

167 {
168 self_.set(x.self_, y.self_);
169 }
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 Ec1::set ( const Fp & x,
const Fp & y,
const Fp & z )
throw (std::exception )
inline

Definition at line 170 of file bn254_if.hpp.

171 {
172 self_.set(x.self_, y.self_, z.self_);
173 }
Here is the call graph for this function:

◆ set() [3/3]

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

Definition at line 174 of file bn254_if.hpp.

175 {
176 std::istringstream iss(str);
177 iss >> self_;
178 }

◆ sub()

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

Definition at line 191 of file bn254_if.hpp.

191{ ::bn::Ec1::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 Ec1::toString ( ) const
throw (std::exception )
inline

Definition at line 179 of file bn254_if.hpp.

180 {
181 std::ostringstream oss;
182 oss << self_;
183 return oss.str();
184 }

Friends And Related Symbol Documentation

◆ Fp12

friend class Fp12
friend

Definition at line 153 of file bn254_if.hpp.


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