7#ifndef BOTAN_BLS12_381_TOWER_H_
8#define BOTAN_BLS12_381_TOWER_H_
10#include <botan/internal/bls12_381_fields.h>
22 constexpr Fp6() =
default;
25 m_c0(
c0), m_c1(
c1), m_c2(
c2) {}
39 Fp6 add(
const Fp6& x)
const;
41 Fp6 sub(
const Fp6& x)
const;
43 Fp6 mul(
const Fp6& x)
const;
57 Fp6 mul_by_nonresidue()
const;
72 Fp6 frobenius_map()
const;
114 const Fp6&
c0()
const {
return m_c0; }
116 const Fp6&
c1()
const {
return m_c1; }
125 void serialize_to(std::span<uint8_t, Fp12::BYTES> bytes)
const;
128 std::array<uint8_t, Fp12::BYTES> buf{};
152 Fp12 conjugate()
const;
163 Fp12 frobenius_map()
const;
168 Fp12 cyclotomic_square()
const;
static FieldElement2 one()
static FieldElement2 zero()
static constexpr size_t BYTES
Fp12 mul(const Fp12 &x) const
void serialize_to(std::span< uint8_t, Fp12::BYTES > bytes) const
constexpr Fp12(const Fp6 &c0, const Fp6 &c1)
Fp12 sub(const Fp12 &x) const
static constexpr size_t BYTES
Fp12 add(const Fp12 &x) const
std::array< uint8_t, Fp12::BYTES > serialize() const
const FieldElement2 & c1() const
Fp6 mul(const Fp6 &x) const
Fp6 sub(const Fp6 &x) const
constexpr Fp6(const FieldElement2 &c0, const FieldElement2 &c1, const FieldElement2 &c2)
const FieldElement2 & c2() const
const FieldElement2 & c0() const
Fp6 add(const Fp6 &x) const
Scalar operator-(const Scalar &a, const Scalar &b)
Scalar operator+(const Scalar &a, const Scalar &b)
Scalar operator*(const Scalar &a, const Scalar &b)
BigInt square(const BigInt &x)
bool operator==(const AlgorithmIdentifier &x, const AlgorithmIdentifier &y)