|
Botan 3.14.1
Crypto and TLS for C&
|
#include <bls12_381_point_mul.h>
Static Public Member Functions | |
| static Pt | ct_select (std::span< const Pt > pts, size_t idx) |
| static Pt | ct_select_signed (std::span< const Pt > pts, size_t idx, CT::Choice negate) |
| template<typename AffinePt> | |
| static Pt | msm_vartime (std::span< const AffinePt > points, std::span< const Scalar > scalars) |
| static Pt | mul (const Pt &pt, const Scalar &scalar) |
| static Pt | mul2 (const Pt &p, const Scalar &a, const Pt &q, const Scalar &b) |
| static Pt | mul2_vartime (const Pt &p, const Scalar &a, const Pt &q, const Scalar &b) |
| static Pt | mul_by_z_abs (const Pt &pt) |
| static Pt | mul_vartime (const Pt &pt, const Scalar &scalar) |
The scalar multiplication algorithms, shared by G1 and G2; the group specific formulas remain member functions of the point types.
Definition at line 74 of file bls12_381_point_mul.h.
|
inlinestatic |
Return pts[idx], without leaking idx
Definition at line 79 of file bls12_381_point_mul.h.
References Botan::CT::conditional_assign_mem(), and Botan::CT::Mask< T >::is_equal().
Referenced by ct_select_signed().
|
inlinestatic |
Definition at line 100 of file bls12_381_point_mul.h.
References ct_select(), and Botan::CT::Choice::into_bitmask().
|
inlinestatic |
Variable time multiscalar multiplication
Definition at line 265 of file bls12_381_point_mul.h.
References Botan::BLS12_381::Scalar::BITS, Botan::BLS12_381::Scalar::BYTES, mul2_vartime(), mul_vartime(), Botan::BLS12_381::pippenger_window_bits(), Botan::BLS12_381::scalar_booth_window(), and Botan::secure_scrub_memory().
Referenced by Botan::BLS12_381::G1Projective::msm_vartime(), and Botan::BLS12_381::G2Projective::msm_vartime().
|
inlinestatic |
Constant time fixed window multiplication
Possible optimizations: a precomputed table (cf pcurves PrecomputedBaseMulTable) for the common fixed-base case, and a GLV/psi endomorphism split to roughly halve the doubling count
Definition at line 113 of file bls12_381_point_mul.h.
References Botan::BLS12_381::Scalar::BITS, ct_select_signed(), Botan::CT::poison(), Botan::BLS12_381::scalar_booth_window(), Botan::secure_scrub_memory(), Botan::BLS12_381::Scalar::serialize(), and Botan::CT::unpoison_all().
Referenced by Botan::BLS12_381::G1Projective::mul(), and Botan::BLS12_381::G2Projective::mul().
|
inlinestatic |
Constant time a*p + b*q
Definition at line 147 of file bls12_381_point_mul.h.
References Botan::BLS12_381::Scalar::BITS, ct_select_signed(), Botan::CT::poison_all(), Botan::BLS12_381::scalar_booth_window(), Botan::secure_scrub_memory(), Botan::BLS12_381::Scalar::serialize(), and Botan::CT::unpoison_all().
Referenced by Botan::BLS12_381::G1Projective::mul2(), and Botan::BLS12_381::G2Projective::mul2().
|
inlinestatic |
Variable time a*p + b*q
Definition at line 222 of file bls12_381_point_mul.h.
References Botan::BLS12_381::Scalar::BITS, Botan::BLS12_381::scalar_booth_window(), Botan::secure_scrub_memory(), and Botan::BLS12_381::Scalar::serialize().
Referenced by msm_vartime(), Botan::BLS12_381::G1Projective::mul2_vartime(), and Botan::BLS12_381::G2Projective::mul2_vartime().
|
inlinestatic |
Multiplication by |z|, the absolute value of the BLS parameter, used for the subgroup checks and cofactor clearing
Definition at line 344 of file bls12_381_point_mul.h.
References Botan::BLS12_381::BLS_Z_ABS.
Referenced by Botan::BLS12_381::G2Affine::deserialize().
|
inlinestatic |
Variable time single point multiplication
Definition at line 188 of file bls12_381_point_mul.h.
References Botan::BLS12_381::Scalar::BITS, Botan::BLS12_381::scalar_booth_window(), Botan::secure_scrub_memory(), and Botan::BLS12_381::Scalar::serialize().
Referenced by msm_vartime().