26 #ifndef CRYPTO3_ALGEBRA_CURVES_SHORT_WEIERSTRASS_G1_ELEMENT_JACOBIAN_WITH_A4_0_DBL_2009_L_HPP
27 #define CRYPTO3_ALGEBRA_CURVES_SHORT_WEIERSTRASS_G1_ELEMENT_JACOBIAN_WITH_A4_0_DBL_2009_L_HPP
42 template<
typename ElementType>
43 constexpr
static inline ElementType
process(
const ElementType &first) {
45 using field_value_type =
typename ElementType::field_type::value_type;
48 if (first.is_zero()) {
52 field_value_type A = (first.X).squared();
53 field_value_type B = (first.Y).squared();
54 field_value_type C = B.squared();
55 field_value_type D = (first.X + B).squared() - A - C;
57 field_value_type E = A + A + A;
58 field_value_type F = E.squared();
59 field_value_type X3 = F - (D + D);
60 field_value_type eightC = C + C;
61 eightC = eightC + eightC;
62 eightC = eightC + eightC;
63 field_value_type Y3 = E * (D - X3) - eightC;
64 field_value_type Y1Z1 = (first.Y) * (first.Z);
65 field_value_type Z3 = Y1Z1 + Y1Z1;
67 return ElementType(X3, Y3, Z3);
A struct representing element doubling from the group G1 of short Weierstrass curve for jacobian_with...
Definition: dbl_2009_l.hpp:40
constexpr static ElementType process(const ElementType &first)
Definition: dbl_2009_l.hpp:43