39 static std::optional<EC_AffinePoint> deserialize(
const EC_Group& group, std::span<const uint8_t> bytes);
45 static std::optional<EC_AffinePoint> from_bigint_xy(
const EC_Group& group,
const BigInt& x,
const BigInt& y);
62 std::string_view hash_fn,
63 std::span<const uint8_t> input,
64 std::span<const uint8_t> domain_sep);
70 std::string_view hash_fn,
71 std::span<const uint8_t> input,
72 std::span<const uint8_t> domain_sep);
82 size_t field_element_bytes()
const;
85 bool is_identity()
const;
92 void serialize_x_to(std::span<uint8_t> bytes)
const;
99 void serialize_y_to(std::span<uint8_t> bytes)
const;
106 void serialize_xy_to(std::span<uint8_t> bytes)
const;
113 void serialize_compressed_to(std::span<uint8_t> bytes)
const;
120 void serialize_uncompressed_to(std::span<uint8_t> bytes)
const;
125 template <concepts::resizable_
byte_buffer T = secure_vector<u
int8_t>>
127 T bytes(this->field_element_bytes());
128 this->serialize_x_to(bytes);
135 template <concepts::resizable_
byte_buffer T = secure_vector<u
int8_t>>
137 T bytes(this->field_element_bytes());
138 this->serialize_y_to(bytes);
145 template <concepts::resizable_
byte_buffer T = secure_vector<u
int8_t>>
147 T bytes(2 * this->field_element_bytes());
148 this->serialize_xy_to(bytes);
155 template <concepts::resizable_
byte_buffer T = std::vector<u
int8_t>>
157 T bytes(1 + 2 * this->field_element_bytes());
158 this->serialize_uncompressed_to(bytes);
165 template <concepts::resizable_
byte_buffer T = std::vector<u
int8_t>>
167 T bytes(1 + this->field_element_bytes());
168 this->serialize_compressed_to(bytes);
192 static EC_AffinePoint _from_inner(std::unique_ptr<EC_AffinePoint_Data> inner);
194 const std::shared_ptr<const EC_Group_Data>& _group()
const;
197 friend class EC_Mul2Table;
203 std::unique_ptr<EC_AffinePoint_Data> m_point;