Botan 3.9.0
Crypto and TLS for C&
Botan::WindowedMulTable< C, W > Class Template Referencefinal

#include <pcurves_impl.h>

Public Types

typedef C::AffinePoint AffinePoint
using BlindedScalar = BlindedScalarBits<C, WindowBits>
typedef C::ProjectivePoint ProjectivePoint
typedef C::Scalar Scalar

Public Member Functions

ProjectivePoint mul (const Scalar &s, RandomNumberGenerator &rng) const
 WindowedMulTable (const AffinePoint &p)

Static Public Attributes

static constexpr size_t TableSize = (1 << WindowBits) - 1
static constexpr size_t WindowBits = W
static constexpr size_t Windows = (BlindedScalar::Bits + WindowBits - 1) / WindowBits

Detailed Description

template<typename C, size_t W>
class Botan::WindowedMulTable< C, W >

Precomputed point multiplication table

This is a standard fixed window multiplication using W-bit wide window.

Definition at line 1418 of file pcurves_impl.h.

Member Typedef Documentation

◆ AffinePoint

template<typename C, size_t W>
typedef C::AffinePoint Botan::WindowedMulTable< C, W >::AffinePoint

Definition at line 1421 of file pcurves_impl.h.

◆ BlindedScalar

template<typename C, size_t W>
using Botan::WindowedMulTable< C, W >::BlindedScalar = BlindedScalarBits<C, WindowBits>

Definition at line 1427 of file pcurves_impl.h.

◆ ProjectivePoint

template<typename C, size_t W>
typedef C::ProjectivePoint Botan::WindowedMulTable< C, W >::ProjectivePoint

Definition at line 1422 of file pcurves_impl.h.

◆ Scalar

template<typename C, size_t W>
typedef C::Scalar Botan::WindowedMulTable< C, W >::Scalar

Definition at line 1420 of file pcurves_impl.h.

Constructor & Destructor Documentation

◆ WindowedMulTable()

template<typename C, size_t W>
Botan::WindowedMulTable< C, W >::WindowedMulTable ( const AffinePoint & p)
inlineexplicit

Definition at line 1436 of file pcurves_impl.h.

References TableSize, and Botan::varpoint_setup().

Member Function Documentation

◆ mul()

template<typename C, size_t W>
ProjectivePoint Botan::WindowedMulTable< C, W >::mul ( const Scalar & s,
RandomNumberGenerator & rng ) const
inline

Definition at line 1438 of file pcurves_impl.h.

1438 {
1439 const BlindedScalar bits(s, rng);
1440 return varpoint_exec<C, WindowBits>(m_table, bits, rng);
1441 }
BlindedScalarBits< C, WindowBits > BlindedScalar
C::ProjectivePoint varpoint_exec(const AffinePointTable< C > &table, const BlindedScalar &scalar, RandomNumberGenerator &rng)

References Botan::varpoint_exec().

Member Data Documentation

◆ TableSize

template<typename C, size_t W>
size_t Botan::WindowedMulTable< C, W >::TableSize = (1 << WindowBits) - 1
staticconstexpr

Definition at line 1434 of file pcurves_impl.h.

Referenced by WindowedMulTable().

◆ WindowBits

template<typename C, size_t W>
size_t Botan::WindowedMulTable< C, W >::WindowBits = W
staticconstexpr

Definition at line 1424 of file pcurves_impl.h.

◆ Windows

template<typename C, size_t W>
size_t Botan::WindowedMulTable< C, W >::Windows = (BlindedScalar::Bits + WindowBits - 1) / WindowBits
staticconstexpr

Definition at line 1429 of file pcurves_impl.h.


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