|
Botan 3.9.0
Crypto and TLS for C&
|
Representation of a point on the Ed448 curve. More...
#include <ed448_internal.h>
Public Member Functions | |
| void | ct_conditional_assign (bool cond, const Ed448Point &other) |
| Assign other to this if cond is true (constant time) | |
| Ed448Point | double_point () const |
| Double a point (RFC 8032 5.2.4) | |
| Ed448Point (const Gf448Elem &x, const Gf448Elem &y) | |
| Create a point from its coordinates x, y. | |
| Ed448Point (const Gf448Elem &x, const Gf448Elem &y, const Gf448Elem &z) | |
| Create a point from its projective coordinates X, Y, Z. | |
| std::array< uint8_t, ED448_LEN > | encode () const |
| Encode the point to its 57-byte representation (RFC 8032 5.2.2) | |
| Ed448Point | operator+ (const Ed448Point &other) const |
| Add two points (RFC 8032 5.2.4) | |
| bool | operator== (const Ed448Point &other) const |
| Check if two points are equal (constant time) | |
| Ed448Point | scalar_mul (const Scalar448 &scalar) const |
| Scalar multiplication. | |
| Gf448Elem | x () const |
| Getter for point coordinate x. | |
| Gf448Elem | x_proj () const |
| Getter for projective coordinate X. | |
| Gf448Elem | y () const |
| Getter for point coordinate y. | |
| Gf448Elem | y_proj () const |
| Getter for projective coordinate Y. | |
| Gf448Elem | z_proj () const |
| Getter for projective coordinate Z. | |
Static Public Member Functions | |
| static Ed448Point | base_point () |
| Create the curve's base point ('B' in RFC 8032 5.2) | |
| static Ed448Point | decode (std::span< const uint8_t, ED448_LEN > enc) |
| Decode a point from its 57-byte encoding (RFC 8032 5.2.3) | |
| static Ed448Point | identity () |
| Return the identity element. | |
Representation of a point on the Ed448 curve.
The point is represented in projective coordinates (X, Y, Z). All operations are constant time.
Definition at line 25 of file ed448_internal.h.
|
inline |
Create a point from its projective coordinates X, Y, Z.
Definition at line 34 of file ed448_internal.h.
Referenced by base_point(), ct_conditional_assign(), decode(), double_point(), identity(), operator+(), operator==(), and scalar_mul().
|
static |
Create the curve's base point ('B' in RFC 8032 5.2)
Definition at line 123 of file ed448_internal.cpp.
References Ed448Point(), x(), and y().
Referenced by Botan::create_pk_from_sk(), Botan::sign_message(), and Botan::verify_signature().
| void Botan::Ed448Point::ct_conditional_assign | ( | bool | cond, |
| const Ed448Point & | other ) |
Assign other to this if cond is true (constant time)
Definition at line 214 of file ed448_internal.cpp.
References Ed448Point().
|
static |
Decode a point from its 57-byte encoding (RFC 8032 5.2.3)
Definition at line 73 of file ed448_internal.cpp.
References Botan::Gf448Elem::bytes_are_canonical_representation(), Ed448Point(), Botan::CT::Mask< T >::expand_bool(), Botan::Gf448Elem::is_odd(), Botan::Gf448Elem::one(), Botan::root(), Botan::square(), Botan::WORDS_448, and y().
Referenced by Botan::Ed448_PublicKey::check_key(), and Botan::verify_signature().
| Ed448Point Botan::Ed448Point::double_point | ( | ) | const |
Double a point (RFC 8032 5.2.4)
Definition at line 175 of file ed448_internal.cpp.
References Ed448Point(), and Botan::square().
| std::array< uint8_t, ED448_LEN > Botan::Ed448Point::encode | ( | ) | const |
Encode the point to its 57-byte representation (RFC 8032 5.2.2)
Definition at line 141 of file ed448_internal.cpp.
References Botan::Gf448Elem::is_odd(), Botan::Gf448Elem::to_bytes(), x(), and y().
|
inlinestatic |
Return the identity element.
Definition at line 40 of file ed448_internal.h.
References Ed448Point(), Botan::Gf448Elem::one(), and Botan::Gf448Elem::zero().
Referenced by scalar_mul().
| Ed448Point Botan::Ed448Point::operator+ | ( | const Ed448Point & | other | ) | const |
Add two points (RFC 8032 5.2.4)
Definition at line 158 of file ed448_internal.cpp.
References Ed448Point(), and Botan::square().
| bool Botan::Ed448Point::operator== | ( | const Ed448Point & | other | ) | const |
Check if two points are equal (constant time)
Definition at line 206 of file ed448_internal.cpp.
References Ed448Point(), Botan::CT::Mask< T >::expand_bool(), x(), and y().
| Ed448Point Botan::Ed448Point::scalar_mul | ( | const Scalar448 & | scalar | ) | const |
Scalar multiplication.
Definition at line 190 of file ed448_internal.cpp.
References Ed448Point(), Botan::Scalar448::get_bit(), and identity().
Referenced by Botan::operator*().
|
inline |
Getter for point coordinate x.
Definition at line 64 of file ed448_internal.h.
Referenced by base_point(), Ed448Point(), Ed448Point(), encode(), and operator==().
|
inline |
Getter for projective coordinate X.
Definition at line 55 of file ed448_internal.h.
|
inline |
Getter for point coordinate y.
Definition at line 67 of file ed448_internal.h.
Referenced by base_point(), decode(), Ed448Point(), Ed448Point(), encode(), and operator==().
|
inline |
Getter for projective coordinate Y.
Definition at line 58 of file ed448_internal.h.
|
inline |
Getter for projective coordinate Z.
Definition at line 61 of file ed448_internal.h.