Botan 3.14.1
Crypto and TLS for C&
Botan::SharedZPointTable< C > Class Template Referencefinal

#include <pcurves_mul.h>

Public Types

using AffinePoint = typename C::AffinePoint
using FieldElement = typename C::FieldElement
using ProjectivePoint = typename C::ProjectivePoint

Public Member Functions

const FieldElement & a () const
AffinePoint ct_select (size_t idx) const
 SharedZPointTable (const AffinePoint &p, size_t n, const FieldElement &a, const FieldElement &u)
 SharedZPointTable (std::span< const ProjectivePoint > pts, const FieldElement &a, const FieldElement &one, const FieldElement &u)
const FieldElement & z () const

Detailed Description

template<typename C>
class Botan::SharedZPointTable< C >

Definition at line 309 of file pcurves_mul.h.

Member Typedef Documentation

◆ AffinePoint

template<typename C>
using Botan::SharedZPointTable< C >::AffinePoint = typename C::AffinePoint

Definition at line 311 of file pcurves_mul.h.

◆ FieldElement

template<typename C>
using Botan::SharedZPointTable< C >::FieldElement = typename C::FieldElement

Definition at line 313 of file pcurves_mul.h.

◆ ProjectivePoint

template<typename C>
using Botan::SharedZPointTable< C >::ProjectivePoint = typename C::ProjectivePoint

Definition at line 312 of file pcurves_mul.h.

Constructor & Destructor Documentation

◆ SharedZPointTable() [1/2]

template<typename C>
Botan::SharedZPointTable< C >::SharedZPointTable ( const AffinePoint & p,
size_t n,
const FieldElement & a,
const FieldElement & u )
inline

Table of the multiples [P, 2*P, ..., n*P]

The multiples are computed as a chain of mixed additions, each of which multiplies Z by a known value H, so the rescaling factors Zt/Z_i are products of H values.

Parameters
pthe point whose multiples are tabulated
nthe number of multiples
athe a coefficient of the curve
uthe random isomorphism parameter, which must be nonzero

Definition at line 327 of file pcurves_mul.h.

327 :
328 SharedZPointTable(build(p, n, a, u)) {}
SharedZPointTable(const AffinePoint &p, size_t n, const FieldElement &a, const FieldElement &u)
const FieldElement & a() const

References a(), and SharedZPointTable().

Referenced by SharedZPointTable(), and SharedZPointTable().

◆ SharedZPointTable() [2/2]

template<typename C>
Botan::SharedZPointTable< C >::SharedZPointTable ( std::span< const ProjectivePoint > pts,
const FieldElement & a,
const FieldElement & one,
const FieldElement & u )
inline

Table of arbitrary points

Here Zt is the product of the Z coordinates, and the rescaling factors Zt/Z_i are computed using prefix and suffix products. Identity elements are excluded from the product and remain the identity.

Parameters
ptsthe points to tabulate
athe a coefficient of the curve
onethe field element 1
uthe random isomorphism parameter, which must be nonzero

Definition at line 342 of file pcurves_mul.h.

345 :
346 SharedZPointTable(build(pts, a, one, u)) {}

References a(), and SharedZPointTable().

Member Function Documentation

◆ a()

template<typename C>
const FieldElement & Botan::SharedZPointTable< C >::a ( ) const
inline

Return the a coefficient of the isomorphic curve, a*z^4

Definition at line 361 of file pcurves_mul.h.

361{ return m_a; }

Referenced by Botan::mul2_exec(), SharedZPointTable(), SharedZPointTable(), Botan::varpoint_exec(), and Botan::varpoint_mul().

◆ ct_select()

template<typename C>
AffinePoint Botan::SharedZPointTable< C >::ct_select ( size_t idx) const
inline

If idx is zero then return the identity element. Otherwise return pts[idx - 1]

Definition at line 351 of file pcurves_mul.h.

351{ return AffinePoint::ct_select(m_table, idx); }

Referenced by Botan::mul2_exec(), Botan::varpoint_exec(), and Botan::varpoint_mul().

◆ z()

template<typename C>
const FieldElement & Botan::SharedZPointTable< C >::z ( ) const
inline

Return the shared Z coordinate

Definition at line 356 of file pcurves_mul.h.

356{ return m_z; }

Referenced by Botan::mul2_exec(), Botan::varpoint_exec(), and Botan::varpoint_mul().


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