Crypto++ 7.0 Free C++ class library of cryptographic schemes

Public Types | Public Member Functions | List of all members
EcPrecomputation< ECP > Class Template Reference

ECP precomputation specialization. More...

Inheritance diagram for EcPrecomputation< ECP >:

## Public Types
typedef ECP | EllipticCurve
Public Types inherited from DL_GroupPrecomputation< ECP::Point >
typedef ECP::Point | Element

## Public Member Functions
bool | NeedConversions () const
| Determines if elements needs conversion. More...
Element | ConvertIn (const Element &P) const
| Converts an element between representations. More...
Element | ConvertOut (const Element &P) const
| Converts an element between representations. More...
const AbstractGroup< Element > & | GetGroup () const
| Retrieves AbstractGroup interface. More...
Element | BERDecodeElement (BufferedTransformation &bt) const
| Decodes element in DER format. More...
void | DEREncodeElement (BufferedTransformation &bt, const Element &v) const
| Encodes element in DER format. More...
void | SetCurve (const ECP &ec)
| Set the elliptic curve. More...
const ECP & | GetCurve () const
| Get the elliptic curve. More...

## Detailed Description

### template<>
class EcPrecomputation< ECP >

ECP precomputation specialization.

Implementation of `DL_GroupPrecomputation<ECP::Point>` with input and output conversions for Montgomery modular multiplication.

See also
  DL_GroupPrecomputation, ModularArithmetic, MontgomeryRepresentation

Definition at line 114 of file ecp.h.

## Member Function Documentation

## ◆ NeedConversions()

bool EcPrecomputation< ECP >::NeedConversions | ( |  | ) | const
| inline virtual

Determines if elements needs conversion.

Returns
  true if the element needs conversion, false otherwise

NeedConversions determines if an element must convert between representations.

Reimplemented from DL_GroupPrecomputation< ECP::Point >.

Definition at line 122 of file ecp.h.

## ◆ ConvertIn()

Element EcPrecomputation< ECP >::ConvertIn | ( | const Element & | v | ) | const
| inline virtual

Converts an element between representations.

Parameters

  v | element to convert

Returns
  an element converted to an alternate representation for internal use

ConvertIn is used when an element must convert between representations.

Reimplemented from DL_GroupPrecomputation< ECP::Point >.

Definition at line 123 of file ecp.h.

## ◆ ConvertOut()

Element EcPrecomputation< ECP >::ConvertOut | ( | const Element & | v | ) | const
| inline virtual

Converts an element between representations.

Parameters

  v | element to convert

Returns
  an element converted from an alternate representation

Reimplemented from DL_GroupPrecomputation< ECP::Point >.

Definition at line 125 of file ecp.h.

## ◆ GetGroup()

const AbstractGroup<Element>& EcPrecomputation< ECP >::GetGroup | ( |  | ) | const
| inline virtual

Retrieves AbstractGroup interface.

Returns
  GetGroup() returns the AbstractGroup interface

Implements DL_GroupPrecomputation< ECP::Point >.

Definition at line 127 of file ecp.h.

## ◆ BERDecodeElement()

Element EcPrecomputation< ECP >::BERDecodeElement | ( | BufferedTransformation & | bt | ) | const
| inline virtual

Decodes element in DER format.

Parameters

  bt | BufferedTransformation object

Returns
  element in the group

Implements DL_GroupPrecomputation< ECP::Point >.

Definition at line 128 of file ecp.h.

## ◆ DEREncodeElement()

void EcPrecomputation< ECP >::DEREncodeElement | ( | BufferedTransformation & | bt,
|  | const Element & | P
| ) |  | const
| inline virtual

Encodes element in DER format.

Parameters

  bt | BufferedTransformation object
  P | Element to encode

Implements DL_GroupPrecomputation< ECP::Point >.

Definition at line 129 of file ecp.h.

## ◆ SetCurve()

void EcPrecomputation< ECP >::SetCurve | ( | const ECP & | ec | ) |
| inline

Set the elliptic curve.

Parameters

  ec | ECP derived class

SetCurve() is not inherited

Definition at line 134 of file ecp.h.

## ◆ GetCurve()

const ECP& EcPrecomputation< ECP >::GetCurve | ( |  | ) | const
| inline

Get the elliptic curve.

Returns
  ECP curve

GetCurve() is not inherited

Definition at line 143 of file ecp.h.

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

- ecp.h