|
Botan 3.13.0
Crypto and TLS for C&
|
#include <spake2p.h>
Public Member Functions | |
| size_t | confirmation_size () const |
| const EC_Group & | group () const |
| const std::string & | hash_function () const |
| size_t | share_size () const |
| const EC_AffinePoint & | spake2p_m () const |
| const EC_AffinePoint & | spake2p_n () const |
Static Public Member Functions | |
| static SystemParameters | custom (const EC_Group &group, std::span< const uint8_t > seed, std::string_view hash_fn) |
| static SystemParameters | rfc9383_p256_sha256 () |
| static SystemParameters | rfc9383_p256_sha512 () |
| static SystemParameters | rfc9383_p384_sha256 () |
| static SystemParameters | rfc9383_p384_sha512 () |
| static SystemParameters | rfc9383_p521_sha512 () |
SPAKE2+ (RFC 9383) System Parameters
This selects the elliptic curve group, the M/N group elements, and the hash function; the hash also fixes the KDF (HKDF) and the MAC (HMAC)
| size_t Botan::SPAKE2p::SystemParameters::confirmation_size | ( | ) | const |
Return the size in bytes of a key confirmation message (confirmP or confirmV)
Definition at line 240 of file spake2p.cpp.
References Botan::HashFunction::create_or_throw().
|
static |
SPAKE2+ custom system parameters for an arbitrary group
The M/N values will be derived from the seed using hash2curve; note that not all groups support hash2curve.
RFC 9383 Section 3.2: "Applications MAY use different M and N values, provided they are computed, e.g., using different input seeds to the algorithm in Appendix B, as random elements for which the discrete log is unknown."
If the seed includes the identities of the participants, this additionally makes the scheme "quantum annoying", in that an attacker with a discrete logarithm oracle must compute a new discrete log for each (user, verifier) pair they wish to attack.
| group | the elliptic curve group to use |
| SEED | the seed bytes used to derive M and N |
| hash_fn | the hash function to use (eg "SHA-256") |
Definition at line 221 of file spake2p.cpp.
References BOTAN_ARG_CHECK, group(), and Botan::EC_AffinePoint::hash_to_curve_ro().
Referenced by botan_spake2p_params_init_custom().
|
inline |
Return the elliptic curve group
Definition at line 115 of file spake2p.h.
Referenced by custom(), Botan::SPAKE2p::ProverSecret::deserialize(), Botan::SPAKE2p::RegistrationRecord::deserialize(), rfc9383_p256_sha256(), rfc9383_p256_sha512(), rfc9383_p384_sha256(), rfc9383_p384_sha512(), and rfc9383_p521_sha512().
|
inline |
|
static |
The RFC 9383 ciphersuite P256-SHA256-HKDF-HMAC-SHA256
Definition at line 196 of file spake2p.cpp.
References group().
|
static |
The RFC 9383 ciphersuite P256-SHA512-HKDF-HMAC-SHA512
Definition at line 201 of file spake2p.cpp.
References group().
|
static |
The RFC 9383 ciphersuite P384-SHA256-HKDF-HMAC-SHA256
Definition at line 206 of file spake2p.cpp.
References group().
|
static |
The RFC 9383 ciphersuite P384-SHA512-HKDF-HMAC-SHA512
Definition at line 211 of file spake2p.cpp.
References group().
|
static |
The RFC 9383 ciphersuite P521-SHA512-HKDF-HMAC-SHA512
Definition at line 216 of file spake2p.cpp.
References group().
| size_t Botan::SPAKE2p::SystemParameters::share_size | ( | ) | const |
Return the size in bytes of a key share (shareP or shareV)
Definition at line 236 of file spake2p.cpp.
Referenced by Botan::SPAKE2p::RegistrationRecord::deserialize().
|
inline |
|
inline |