10#ifndef BOTAN_EC_POINT_H_
11#define BOTAN_EC_POINT_H_
15#include <botan/curve_gfp.h>
16#include <botan/ec_point_format.h>
17#include <botan/exceptn.h>
136 m_y = m_curve.get_p() - m_y;
158 bool is_affine()
const;
164 bool is_zero()
const {
return m_z.is_zero(); }
171 bool on_the_curve()
const;
192 BigInt get_affine_x()
const;
198 BigInt get_affine_y()
const;
229#if defined(BOTAN_DISABLE_DEPRECATED_FEATURES)
276 void add(
const EC_Point& other, std::vector<BigInt>& workspace);
289 void add(
const word x_words[],
291 const word y_words[],
293 const word z_words[],
295 std::vector<BigInt>& workspace);
306 void add_affine(
const EC_Point& other, std::vector<BigInt>& workspace);
318 const word x_words[],
size_t x_size,
const word y_words[],
size_t y_size, std::vector<BigInt>& workspace);
324 void mult2(std::vector<BigInt>& workspace);
331 void mult2i(
size_t i, std::vector<BigInt>& workspace);
341 x.
add(other, workspace);
379 multi_exponentiate(const EC_Point& p1, const BigInt& z1, const EC_Point& p2, const BigInt& z2);
397 return point.
mul(scalar);
401 return point.
mul(scalar);
425 OS2ECP(const uint8_t data[],
size_t data_len, const BigInt& curve_p, const BigInt& curve_a, const BigInt& curve_b);
#define BOTAN_PUBLIC_API(maj, min)
#define BOTAN_UNSTABLE_API
#define BOTAN_DEPRECATED(msg)
void swap(EC_Point &other) noexcept
bool operator!=(const EC_Point &other) const =default
EC_Point plus(const EC_Point &other, std::vector< BigInt > &workspace) const
void add(const EC_Point &other, std::vector< BigInt > &workspace)
void mult2(std::vector< BigInt > &workspace)
EC_Point double_of(std::vector< BigInt > &workspace) const
const BigInt & get_y() const
friend class EC_Point_Var_Point_Precompute
const BigInt & get_z() const
void swap_coords(BigInt &new_x, BigInt &new_y, BigInt &new_z)
EC_Point & operator=(EC_Point &&other) noexcept
friend class EC_Point_Base_Point_Precompute
friend class EC_Point_Multi_Point_Precompute
EC_Point mul(const BigInt &scalar) const
friend void swap(EC_Point &x, EC_Point &y) noexcept
const CurveGFp & get_curve() const
EC_Point & operator=(const EC_Point &)=default
const BigInt & get_x() const
EC_Point_Format Compression_Type
std::vector< uint8_t > encode(EC_Point_Format format) const
bool _is_x_eq_to_v_mod_order(const BigInt &v) const
BigInt operator*(const BigInt &x, const BigInt &y)
OctetString operator+(const OctetString &k1, const OctetString &k2)
EC_Point multi_exponentiate(const EC_Point &p1, const BigInt &z1, const EC_Point &p2, const BigInt &z2)
BigInt operator-(const BigInt &x, const BigInt &y)
bool operator==(const AlgorithmIdentifier &a1, const AlgorithmIdentifier &a2)
std::vector< T, secure_allocator< T > > secure_vector
std::conditional_t< HasNative64BitRegisters, std::uint64_t, uint32_t > word
EC_Point OS2ECP(std::span< const uint8_t > data, const CurveGFp &curve)