Botan 3.5.0
Crypto and TLS for C&
Botan::CurveGFp_Repr Class Referenceabstract

#include <curve_gfp.h>

Public Member Functions

virtual ~CurveGFp_Repr ()=default
 

Protected Member Functions

virtual bool a_is_minus_3 () const =0
 
virtual bool a_is_zero () const =0
 
void curve_mul (BigInt &z, const BigInt &x, const BigInt &y, secure_vector< word > &ws) const
 
virtual void curve_mul_words (BigInt &z, const word x_words[], size_t x_size, const BigInt &y, secure_vector< word > &ws) const =0
 
void curve_sqr (BigInt &z, const BigInt &x, secure_vector< word > &ws) const
 
virtual void curve_sqr_words (BigInt &z, const word x_words[], size_t x_size, secure_vector< word > &ws) const =0
 
virtual void from_curve_rep (BigInt &x, secure_vector< word > &ws) const =0
 
virtual const BigIntget_1_rep () const =0
 
virtual const BigIntget_a () const =0
 
virtual const BigIntget_a_rep () const =0
 
virtual const BigIntget_b () const =0
 
virtual const BigIntget_b_rep () const =0
 
virtual const BigIntget_p () const =0
 
virtual size_t get_p_bits () const =0
 
size_t get_p_words () const
 
virtual size_t get_ws_size () const =0
 
virtual BigInt invert_element (const BigInt &x, secure_vector< word > &ws) const =0
 
virtual bool is_one (const BigInt &x) const =0
 
virtual void to_curve_rep (BigInt &x, secure_vector< word > &ws) const =0
 

Friends

class CurveGFp
 

Detailed Description

Definition at line 21 of file curve_gfp.h.

Constructor & Destructor Documentation

◆ ~CurveGFp_Repr()

virtual Botan::CurveGFp_Repr::~CurveGFp_Repr ( )
virtualdefault

Member Function Documentation

◆ a_is_minus_3()

virtual bool Botan::CurveGFp_Repr::a_is_minus_3 ( ) const
protectedpure virtual

◆ a_is_zero()

virtual bool Botan::CurveGFp_Repr::a_is_zero ( ) const
protectedpure virtual

◆ curve_mul()

void Botan::CurveGFp_Repr::curve_mul ( BigInt & z,
const BigInt & x,
const BigInt & y,
secure_vector< word > & ws ) const
inlineprotected

Definition at line 68 of file curve_gfp.h.

68 {
69 BOTAN_DEBUG_ASSERT(x.sig_words() <= get_p_words());
70 curve_mul_words(z, x._data(), x.size(), y, ws);
71 }
#define BOTAN_DEBUG_ASSERT(expr)
Definition assert.h:98
size_t get_p_words() const
Definition curve_gfp.h:32
virtual void curve_mul_words(BigInt &z, const word x_words[], size_t x_size, const BigInt &y, secure_vector< word > &ws) const =0

References Botan::BigInt::_data(), BOTAN_DEBUG_ASSERT, Botan::BigInt::sig_words(), and Botan::BigInt::size().

◆ curve_mul_words()

virtual void Botan::CurveGFp_Repr::curve_mul_words ( BigInt & z,
const word x_words[],
size_t x_size,
const BigInt & y,
secure_vector< word > & ws ) const
protectedpure virtual

◆ curve_sqr()

void Botan::CurveGFp_Repr::curve_sqr ( BigInt & z,
const BigInt & x,
secure_vector< word > & ws ) const
inlineprotected

Definition at line 76 of file curve_gfp.h.

76 {
77 BOTAN_DEBUG_ASSERT(x.sig_words() <= get_p_words());
78 curve_sqr_words(z, x._data(), x.size(), ws);
79 }
virtual void curve_sqr_words(BigInt &z, const word x_words[], size_t x_size, secure_vector< word > &ws) const =0

References Botan::BigInt::_data(), BOTAN_DEBUG_ASSERT, Botan::BigInt::sig_words(), and Botan::BigInt::size().

◆ curve_sqr_words()

virtual void Botan::CurveGFp_Repr::curve_sqr_words ( BigInt & z,
const word x_words[],
size_t x_size,
secure_vector< word > & ws ) const
protectedpure virtual

◆ from_curve_rep()

virtual void Botan::CurveGFp_Repr::from_curve_rep ( BigInt & x,
secure_vector< word > & ws ) const
protectedpure virtual

◆ get_1_rep()

virtual const BigInt & Botan::CurveGFp_Repr::get_1_rep ( ) const
protectedpure virtual

◆ get_a()

virtual const BigInt & Botan::CurveGFp_Repr::get_a ( ) const
protectedpure virtual

◆ get_a_rep()

virtual const BigInt & Botan::CurveGFp_Repr::get_a_rep ( ) const
protectedpure virtual

◆ get_b()

virtual const BigInt & Botan::CurveGFp_Repr::get_b ( ) const
protectedpure virtual

◆ get_b_rep()

virtual const BigInt & Botan::CurveGFp_Repr::get_b_rep ( ) const
protectedpure virtual

◆ get_p()

virtual const BigInt & Botan::CurveGFp_Repr::get_p ( ) const
protectedpure virtual

◆ get_p_bits()

virtual size_t Botan::CurveGFp_Repr::get_p_bits ( ) const
protectedpure virtual

◆ get_p_words()

size_t Botan::CurveGFp_Repr::get_p_words ( ) const
inlineprotected

Definition at line 32 of file curve_gfp.h.

32 {
33 const size_t W_bits = sizeof(word) * 8;
34 return (get_p_bits() + W_bits - 1) / W_bits;
35 }
virtual size_t get_p_bits() const =0

◆ get_ws_size()

virtual size_t Botan::CurveGFp_Repr::get_ws_size ( ) const
protectedpure virtual

◆ invert_element()

virtual BigInt Botan::CurveGFp_Repr::invert_element ( const BigInt & x,
secure_vector< word > & ws ) const
protectedpure virtual

◆ is_one()

virtual bool Botan::CurveGFp_Repr::is_one ( const BigInt & x) const
protectedpure virtual

◆ to_curve_rep()

virtual void Botan::CurveGFp_Repr::to_curve_rep ( BigInt & x,
secure_vector< word > & ws ) const
protectedpure virtual

Friends And Related Symbol Documentation

◆ CurveGFp

friend class CurveGFp
friend

Definition at line 25 of file curve_gfp.h.


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