Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
Vol 3, Part H: 3.5.1 Pairing Request message. More...
#include <SMPTypes.hpp>
Public Member Functions | |
SMPPairingMsg (const bool request_, const uint8_t *source, const jau::nsize_t length) | |
SMPPairingMsg (const bool request_, const SMPIOCapability ioc, const SMPOOBDataFlag odf, const SMPAuthReqs auth_req_mask, const uint8_t maxEncKeySize, const SMPKeyType initiator_key_dist_, const SMPKeyType responder_key_dist_) | |
constexpr_cxx20 jau::nsize_t | getDataSize () const noexcept override |
Returns the required data size according to the specified packet, which should be within 0-22 or 64 octets. More... | |
constexpr SMPIOCapability | getIOCapability () const noexcept |
Returns the IO capability bit field. More... | |
constexpr SMPOOBDataFlag | getOOBDataFlag () const noexcept |
Returns the OBB authenticate data flag. More... | |
constexpr SMPAuthReqs | getAuthReqMask () const noexcept |
Returns the Authentication Requirements mask. More... | |
constexpr bool | isAuthRequirementBitSet (const SMPAuthReqs bit) const noexcept |
constexpr uint8_t | getMaxEncryptionKeySize () const noexcept |
This value defines the maximum encryption key size in octets that the device can support. More... | |
constexpr SMPKeyType | getInitKeyDist () const noexcept |
Returns the Initiator Key Distribution field, which defines which keys the initiator shall distribute and use during the Transport Specific Key Distribution phase. More... | |
constexpr SMPKeyType | getRespKeyDist () const noexcept |
Return the Responder Key Distribution field, which defines which keys the responder shall distribute and use during the Transport Specific Key Distribution phase. More... | |
constexpr_cxx20 std::string | getName () const noexcept override |
Public Member Functions inherited from direct_bt::SMPPDUMsg | |
SMPPDUMsg (const uint8_t *source, const jau::nsize_t size) | |
Persistent memory, w/ ownership . More... | |
SMPPDUMsg (const Opcode opc, const jau::nsize_t size) | |
Persistent memory, w/ ownership . More... | |
virtual | ~SMPPDUMsg () noexcept |
constexpr uint64_t | getTimestamp () const noexcept |
constexpr Opcode | getOpcode () const noexcept |
SMP Command Codes Vol 3, Part H (SM): 3.3. More... | |
constexpr jau::nsize_t | getPDUParamSize () const noexcept |
Returns the actual PDU size less one octet for the opcode, which should result in 0-22 octets or 64 octets. More... | |
constexpr jau::nsize_t | getDataOffset () const noexcept |
Returns the octet offset to the data segment in this PDU including the mandatory opcode, i.e. More... | |
virtual std::string | toString () const noexcept |
Protected Member Functions | |
std::string | valueString () const noexcept override |
Protected Member Functions inherited from direct_bt::SMPPDUMsg | |
void | checkOpcode (const Opcode expected) const |
void | checkOpcode (const Opcode exp1, const Opcode exp2) const |
virtual std::string | baseString () const noexcept |
Additional Inherited Members | |
Public Types inherited from direct_bt::SMPPDUMsg | |
enum | Opcode : uint8_t { Opcode::UNDEFINED = 0x00, Opcode::PAIRING_REQUEST = 0x01, Opcode::PAIRING_RESPONSE = 0x02, Opcode::PAIRING_CONFIRM = 0x03, Opcode::PAIRING_RANDOM = 0x04, Opcode::PAIRING_FAILED = 0x05, Opcode::ENCRYPTION_INFORMATION = 0x06, Opcode::MASTER_IDENTIFICATION = 0x07, Opcode::IDENTITY_INFORMATION = 0x08, Opcode::IDENTITY_ADDRESS_INFORMATION = 0x09, Opcode::SIGNING_INFORMATION = 0x0A, Opcode::SECURITY_REQUEST = 0x0B, Opcode::PAIRING_PUBLIC_KEY = 0x0C, Opcode::PAIRING_DHKEY_CHECK = 0x0D, Opcode::PAIRING_KEYPRESS_NOTIFICATION = 0x0E } |
SMP Command Codes Vol 3, Part H (SM): 3.3. More... | |
Static Public Member Functions inherited from direct_bt::SMPPDUMsg | |
static constexpr uint8_t | number (const Opcode rhs) noexcept |
static std::string | getOpcodeString (const Opcode opc) noexcept |
static std::unique_ptr< const SMPPDUMsg > | getSpecialized (const uint8_t *buffer, jau::nsize_t const buffer_size) noexcept |
Return a newly created specialized instance pointer to base class. More... | |
template<class T > | |
static T * | clone (const T &source) noexcept |
Clone template for convenience, based on derived class's copy-constructor. More... | |
Protected Attributes inherited from direct_bt::SMPPDUMsg | |
POctets | pdu |
actual received PDU More... | |
uint64_t | ts_creation |
creation timestamp in milliseconds More... | |
Vol 3, Part H: 3.5.1 Pairing Request message.
Vol 3, Part H: 3.5.2 Pairing Response message.
Vol 3 (Host), Part H (SM): 3 (SMP), 3.5 Pairing Methods Vol 3 (Host), Part H (SM): 2 (SM), 2.3 Pairing Methods
Opcode::PAIRING_REQUEST or Opcode::PAIRING_RESPONSE
[uint8_t opcode] uint8_t io_capability uint8_t oob_data_flag uint8_t auth_req_mask uint8_t max_encryption_key_size uint8_t initiator_key_distribution uint8_t responder_key_distribution
SMP Pairing Request Vol 3, Part H (SM): 3.5.1
Initiator starts the Pairing Feature Exchange by sending a Pairing Request command to the responding device.
The rules for handing a collision between a pairing procedure on the LE transport and a pairing procedure on the BR/EDR transport are defined in Vol 3, Part C (GAP): 14.2 BRD/EDR/LE security aspects - Collision Handling.
SMP Pairing Response Vol 3, Part H (SM): 3.5.2
Command is used by the responding device to complete the Pairing Feature Exchange after it has received a Pairing Request command from the initiating device, if the responding device allows pairing.
If a Pairing Request is received over the BR/EDR transport when either cross-transport key derivation/generation is not supported or the BR/EDR transport is not encrypted using a Link Key generated using P256, a Pairing Failed shall be sent with the error code SMPPairFailedMsg::ReasonCode::CROSSXPORT_KEY_DERIGEN_NOT_ALLOWED (Cross-Transport Key Derivation/Generation Not Allowed).
The rules for handing a collision between a pairing procedure on the LE transport and a pairing procedure on the BR/EDR transport are defined in Vol 3, Part C (GAP): 14.2 BRD/EDR/LE security aspects - Collision Handling.
Definition at line 875 of file SMPTypes.hpp.
|
inline |
|
inline |
|
inlineconstexprnoexcept |
Returns the Authentication Requirements mask.
SMP Pairing Request Vol 3, Part H (SM): 3.5.1 SMP Pairing Response Vol 3, Part H (SM): 3.5.2
Definition at line 945 of file SMPTypes.hpp.
|
inlineoverridevirtualnoexcept |
Returns the required data size according to the specified packet, which should be within 0-22 or 64 octets.
Reimplemented from direct_bt::SMPPDUMsg.
Definition at line 911 of file SMPTypes.hpp.
|
inlineconstexprnoexcept |
Returns the Initiator Key Distribution field, which defines which keys the initiator shall distribute and use during the Transport Specific Key Distribution phase.
See Vol 3, Part H, 2.4.3 SM - LE Security - Distribution of keys. Field format and usage: Vol 3, Part H, 3.6.1 SMP - LE Security - Key distribution and generation.
Definition at line 969 of file SMPTypes.hpp.
|
inlineconstexprnoexcept |
Returns the IO capability bit field.
Vol 3, Part H, 2.3.2 IO capabilities
Definition at line 922 of file SMPTypes.hpp.
|
inlineconstexprnoexcept |
This value defines the maximum encryption key size in octets that the device can support.
The maximum key size shall be in the range 7 to 16 octets.
Definition at line 956 of file SMPTypes.hpp.
|
inlineoverridevirtualnoexcept |
Reimplemented from direct_bt::SMPPDUMsg.
Definition at line 986 of file SMPTypes.hpp.
|
inlineconstexprnoexcept |
Returns the OBB authenticate data flag.
Vol 3, Part H, 2.3.3 OOB authentication data
Definition at line 933 of file SMPTypes.hpp.
|
inlineconstexprnoexcept |
Return the Responder Key Distribution field, which defines which keys the responder shall distribute and use during the Transport Specific Key Distribution phase.
See Vol 3, Part H, 2.4.3 SM - LE Security - Distribution of keys. Field format and usage: Vol 3, Part H, 3.6.1 SMP - LE Security - Key distribution and generation.
Definition at line 982 of file SMPTypes.hpp.
|
inlineconstexprnoexcept |
|
inlineoverrideprotectedvirtualnoexcept |
Reimplemented from direct_bt::SMPPDUMsg.
Definition at line 991 of file SMPTypes.hpp.