|
Botan 3.14.1
Crypto and TLS for C&
|
#include <bls12_381_tower.h>
Public Member Functions | |
| Fp12 | add (const Fp12 &x) const |
| const Fp6 & | c0 () const |
| const Fp6 & | c1 () const |
| void | conditional_assign (CT::Choice cnd, const Fp12 &other) |
| Fp12 | conjugate () const |
| Fp12 | cyclotomic_square () const |
| constexpr | Fp12 ()=default |
| constexpr | Fp12 (const Fp6 &c0, const Fp6 &c1) |
| Fp12 | frobenius_map () const |
| Fp12 | invert () const |
| CT::Choice | is_zero () const |
| Fp12 | mul (const Fp12 &x) const |
| Fp12 | mul_by_014 (const FieldElement2 &b0, const FieldElement2 &b1, const FieldElement2 &b4) const |
| Fp12 | negate () const |
| CT::Choice | operator== (const Fp12 &other) const |
| std::array< uint8_t, Fp12::BYTES > | serialize () const |
| void | serialize_to (std::span< uint8_t, Fp12::BYTES > bytes) const |
| Fp12 | square () const |
| Fp12 | sub (const Fp12 &x) const |
Static Public Member Functions | |
| static Fp12 | one () |
| static Fp12 | zero () |
Static Public Attributes | |
| static constexpr size_t | BYTES = 12 * FieldElement::BYTES |
An element of Fp12 = Fp6[w]/(w^2 - v)
Represented as c0 + c1*w
Definition at line 101 of file bls12_381_tower.h.
|
constexprdefault |
Default constructed as zero
Referenced by add(), conditional_assign(), conjugate(), cyclotomic_square(), frobenius_map(), invert(), mul(), mul_by_014(), negate(), one(), operator==(), square(), sub(), and zero().
Definition at line 108 of file bls12_381_tower.h.
Definition at line 40 of file bls12_381_fp12.cpp.
References Fp12().
Referenced by Botan::BLS12_381::operator+().
|
inline |
Definition at line 114 of file bls12_381_tower.h.
Referenced by cyclotomic_square(), Fp12(), frobenius_map(), and square().
|
inline |
Definition at line 116 of file bls12_381_tower.h.
Referenced by cyclotomic_square(), Fp12(), frobenius_map(), mul(), mul_by_014(), and square().
| void Botan::BLS12_381::Fp12::conditional_assign | ( | CT::Choice | cnd, |
| const Fp12 & | other ) |
Definition at line 150 of file bls12_381_fp12.cpp.
References Fp12().
| Fp12 Botan::BLS12_381::Fp12::conjugate | ( | ) | const |
Conjugation c0 - c1*w; for elements of the cyclotomic subgroup (such as pairing values) this is the inverse
Definition at line 75 of file bls12_381_fp12.cpp.
References Fp12().
| Fp12 Botan::BLS12_381::Fp12::cyclotomic_square | ( | ) | const |
Squaring specialized for elements of the cyclotomic subgroup
Definition at line 102 of file bls12_381_fp12.cpp.
References Botan::BLS12_381::FieldElement2::c0(), c0(), c1(), Botan::BLS12_381::Fp6::c1(), Fp12(), Botan::BLS12_381::FieldElement2::square(), and square().
| Fp12 Botan::BLS12_381::Fp12::frobenius_map | ( | ) | const |
The Frobenius endomorphism x -> x^p
Definition at line 87 of file bls12_381_fp12.cpp.
References Botan::BLS12_381::FieldElement2::_unchecked_from_words(), c0(), c1(), Fp12(), and Botan::hex_to_words().
| Fp12 Botan::BLS12_381::Fp12::invert | ( | ) | const |
| CT::Choice Botan::BLS12_381::Fp12::is_zero | ( | ) | const |
Definition at line 13 of file bls12_381_fp12.cpp.
Definition at line 52 of file bls12_381_fp12.cpp.
Referenced by Botan::BLS12_381::operator*().
| Fp12 Botan::BLS12_381::Fp12::mul_by_014 | ( | const FieldElement2 & | b0, |
| const FieldElement2 & | b1, | ||
| const FieldElement2 & | b4 ) const |
Sparse multiplication by b = (b0 + b1*v)*1 + (b4*v)*w, the shape produced by pairing line evaluations
Definition at line 79 of file bls12_381_fp12.cpp.
| Fp12 Botan::BLS12_381::Fp12::negate | ( | ) | const |
|
inlinestatic |
Definition at line 112 of file bls12_381_tower.h.
References Fp12(), Botan::BLS12_381::Fp6::one(), and Botan::BLS12_381::Fp6::zero().
Referenced by Botan::BLS12_381::Gt::identity().
| CT::Choice Botan::BLS12_381::Fp12::operator== | ( | const Fp12 & | other | ) | const |
Definition at line 146 of file bls12_381_fp12.cpp.
References Fp12().
|
inline |
Definition at line 127 of file bls12_381_tower.h.
References serialize_to().
| void Botan::BLS12_381::Fp12::serialize_to | ( | std::span< uint8_t, Fp12::BYTES > | bytes | ) | const |
Serialization for tests and Gt; the coefficients are encoded in the order c0.c0.c0, c0.c0.c1, c0.c1.c0, ..., c1.c2.c1 with each Fp coefficient as 48 big-endian bytes
Definition at line 17 of file bls12_381_fp12.cpp.
References Botan::BLS12_381::FieldElement::BYTES.
Referenced by serialize().
| Fp12 Botan::BLS12_381::Fp12::square | ( | ) | const |
Definition at line 61 of file bls12_381_fp12.cpp.
References c0(), c1(), and Fp12().
Referenced by cyclotomic_square().
Definition at line 44 of file bls12_381_fp12.cpp.
References Fp12().
Referenced by Botan::BLS12_381::operator-().
|
inlinestatic |
|
staticconstexpr |
Definition at line 103 of file bls12_381_tower.h.