Botan 3.14.1
Crypto and TLS for C&
Botan::VartimeMul2Table< C, W > Class Template Referencefinal

#include <pcurves_impl.h>

Public Types

using AffinePoint = typename C::AffinePoint
using ProjectivePoint = typename C::ProjectivePoint
using Scalar = typename C::Scalar

Public Member Functions

template<size_t GW>
ProjectivePoint mul2_vartime (const PrecomputedBaseMulTable< C, GW > &g_table, const Scalar &x, const Scalar &y) const
 VartimeMul2Table (const AffinePoint &q)

Detailed Description

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

Variable time 2-ary multiplication x*G + y*Q

A common use of 2-ary multiplication is when verifying the commitments of an elliptic curve signature. Since in this case the inputs are all public, there is no problem with variable time computation.

The generator half is read out of the precomputed base point table and so needs no doublings. The variable point half uses a small table of odd multiples of Q, indexed by the width W non-adjacent form of y.

Definition at line 1770 of file pcurves_impl.h.

Member Typedef Documentation

◆ AffinePoint

template<typename C, size_t W>
using Botan::VartimeMul2Table< C, W >::AffinePoint = typename C::AffinePoint

Definition at line 1775 of file pcurves_impl.h.

◆ ProjectivePoint

template<typename C, size_t W>
using Botan::VartimeMul2Table< C, W >::ProjectivePoint = typename C::ProjectivePoint

Definition at line 1776 of file pcurves_impl.h.

◆ Scalar

template<typename C, size_t W>
using Botan::VartimeMul2Table< C, W >::Scalar = typename C::Scalar

Definition at line 1774 of file pcurves_impl.h.

Constructor & Destructor Documentation

◆ VartimeMul2Table()

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

Member Function Documentation

◆ mul2_vartime()

template<typename C, size_t W>
template<size_t GW>
ProjectivePoint Botan::VartimeMul2Table< C, W >::mul2_vartime ( const PrecomputedBaseMulTable< C, GW > & g_table,
const Scalar & x,
const Scalar & y ) const
inline

Definition at line 1781 of file pcurves_impl.h.

1783 {
1784 // Conditional ok: this function is variable time
1785 if(x.is_zero().as_bool() && y.is_zero().as_bool()) {
1787 }
1788
1789 return g_table.mul_vartime(x, this->mul_vartime(y));
1790 }

References Botan::PrecomputedBaseMulTable< C, W >::mul_vartime().


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