|
Botan 3.14.1
Crypto and TLS for C&
|
#include <bls12_381.h>
Public Member Functions | |
| bool | is_identity () const |
| bool | operator== (const Gt &other) const |
| std::array< uint8_t, BYTES > | serialize () const |
Static Public Member Functions | |
| static Gt | identity () |
| static Gt | multi_pairing (std::span< const G1Affine > p, std::span< const G2Affine > q) |
| static Gt | pairing (const G1Affine &p, const G2Affine &q) |
Static Public Attributes | |
| static constexpr size_t | BYTES = 576 |
An element of the pairing target group, a subgroup of Fp12*
Elements are members of the prime order subgroup by construction; there is no deserialization.
Definition at line 593 of file bls12_381.h.
|
static |
Return the Gt identity element
Definition at line 238 of file bls12_381_pairing.cpp.
References identity(), and Botan::BLS12_381::Fp12::one().
Referenced by identity(), is_identity(), multi_pairing(), and pairing().
| bool Botan::BLS12_381::Gt::is_identity | ( | ) | const |
Check if this element is the identity
Definition at line 242 of file bls12_381_pairing.cpp.
References identity(), and is_identity().
Referenced by is_identity(), and multi_pairing().
|
static |
Compute the product of pairings prod_i e(p[i], q[i])
More efficient than computing each pairing individually, since the final exponentiation is shared. The empty product yields the identity.
Throws Invalid_Argument if the spans are of unequal length.
Definition at line 265 of file bls12_381_pairing.cpp.
References identity(), is_identity(), and multi_pairing().
Referenced by multi_pairing().
| bool Botan::BLS12_381::Gt::operator== | ( | const Gt & | other | ) | const |
Constant time equality
Definition at line 246 of file bls12_381_pairing.cpp.
References Botan::CT::is_equal(), and operator==().
Referenced by operator==().
Compute the optimal ate pairing e(p, q)
Definition at line 255 of file bls12_381_pairing.cpp.
References identity(), Botan::BLS12_381::G1Affine::is_identity(), Botan::BLS12_381::G2Affine::is_identity(), and pairing().
Referenced by pairing().
| std::array< uint8_t, Gt::BYTES > Botan::BLS12_381::Gt::serialize | ( | ) | const |
Serialization of the underlying Fp12 element; the coefficients are encoded in the order c0.c0.c0, c0.c0.c1, ..., c1.c2.c1 with each Fp coefficient as 48 big-endian bytes
Definition at line 251 of file bls12_381_pairing.cpp.
References serialize().
Referenced by serialize().
|
staticconstexpr |
The byte length of the Gt serialization
Definition at line 596 of file bls12_381.h.