|
Botan 3.14.1
Crypto and TLS for C&
|
#include <bls12_381.h>
Public Member Functions | |
| FieldElement | _x () const |
| FieldElement | _y () const |
| bool | is_identity () const |
| std::array< uint8_t, G1Affine::BYTES > | serialize () const |
Static Public Member Functions | |
| static std::optional< G1Affine > | deserialize (std::span< const uint8_t > bytes) |
| static G1Affine | generator () |
| static G1Affine | identity () |
Static Public Attributes | |
| static constexpr size_t | BYTES = 48 |
Friends | |
| class | G1Projective |
| template<typename Group> | |
| class | GroupOps |
An element of the group G1, in affine form
Group arithmetic is performed on G1Projective; the affine form is used for serialization, pairings, and mixed addition
Definition at line 192 of file bls12_381.h.
| FieldElement Botan::BLS12_381::G1Affine::_x | ( | ) | const |
Access the coordinates directly; the values are meaningless if the point is the identity element.
Reserved for internal use, not covered by SemVer.
Definition at line 69 of file bls12_381_g1.cpp.
References _x().
Referenced by _x().
| FieldElement Botan::BLS12_381::G1Affine::_y | ( | ) | const |
Definition at line 73 of file bls12_381_g1.cpp.
References _y().
Referenced by _y().
|
static |
Point deserialization
Only compressed point encoding is supported.
This rejects points not in the prime order subgroup. The canonical encoding of the identity element is accepted; callers for which the identity is not a legal value (such as BLS public keys) must check is_identity() themselves.
Definition at line 82 of file bls12_381_g1.cpp.
References deserialize(), and Botan::BLS12_381::G1Projective::from_affine().
Referenced by deserialize().
|
static |
Return the G1 standard group generator
Definition at line 65 of file bls12_381_g1.cpp.
References generator().
Referenced by generator().
|
static |
Return the G1 identity element
Definition at line 60 of file bls12_381_g1.cpp.
References identity(), Botan::BLS12_381::FieldElement::one(), and Botan::BLS12_381::FieldElement::zero().
Referenced by identity().
| bool Botan::BLS12_381::G1Affine::is_identity | ( | ) | const |
Check if this point is the identity element
Definition at line 77 of file bls12_381_g1.cpp.
References is_identity().
Referenced by is_identity(), and Botan::BLS12_381::Gt::pairing().
| std::array< uint8_t, G1Affine::BYTES > Botan::BLS12_381::G1Affine::serialize | ( | ) | const |
Point serialization
Only compressed point encoding is supported.
Definition at line 106 of file bls12_381_g1.cpp.
References serialize().
Referenced by serialize().
|
friend |
|
friend |
|
staticconstexpr |
The byte length of the compressed point encoding
Definition at line 195 of file bls12_381.h.