40 static std::optional<EC_Scalar> deserialize(
const EC_Group& group, std::span<const uint8_t> bytes);
47 static EC_Scalar from_bytes_with_trunc(
const EC_Group& group, std::span<const uint8_t> bytes);
55 static EC_Scalar from_bytes_mod_order(
const EC_Group& group, std::span<const uint8_t> bytes);
71 static std::optional<std::pair<EC_Scalar, EC_Scalar>> deserialize_pair(
const EC_Group& group,
72 std::span<const uint8_t> bytes);
103 size_t bytes()
const;
110 void serialize_to(std::span<uint8_t> bytes)
const;
115 template <concepts::resizable_
byte_buffer T = std::vector<u
int8_t>>
118 this->serialize_to(s);
127 static void serialize_pair_to(std::span<uint8_t> bytes,
const EC_Scalar& r,
const EC_Scalar& s);
132 template <concepts::resizable_
byte_buffer T = std::vector<u
int8_t>>
135 serialize_pair_to(bytes, r, s);
142 bool is_zero()
const;
213 static EC_Scalar _from_inner(std::unique_ptr<EC_Scalar_Data> inner);
218 EC_Scalar(std::unique_ptr<EC_Scalar_Data> scalar);
222 std::unique_ptr<EC_Scalar_Data> m_scalar;