Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
#include <memory>
#include <cstdint>
#include <jau/debug.hpp>
#include "SMPCrypto.hpp"
#include <tinycrypt/constants.h>
#include <tinycrypt/aes.h>
Go to the source code of this file.
Namespaces | |
namespace | direct_bt |
Macros | |
#define | USE_SMP_CRYPTO_AES128_ 1 |
Derived from zephyr/subsys/bluetooth/host/smp.c. More... | |
#define | USE_SMP_CRYPTO_F5_ 0 |
Functions | |
static int | direct_bt::bt_encrypt_le (const uint8_t key[16], const uint8_t plaintext[16], uint8_t enc_data[16]) |
static int | direct_bt::smp_crypto_ah (const uint8_t irk[16], const uint8_t r[3], uint8_t out[3]) |
bool | direct_bt::smp_crypto_rpa_irk_matches (const jau::uint128dp_t irk, const EUI48 &rpa) noexcept |
Returns true if the given IRK matches the given random private address (RPA). More... | |
static void | direct_bt::sys_mem_swap (void *buf, size_t length) |
Swap buffer content. More... | |
static void | direct_bt::sys_memcpy_swap (void *dst, const void *src, size_t length) |
Swap one buffer content into another. More... | |
Variables | |
constexpr const bool | USE_SMP_CRYPTO_F5 = false |
constexpr const bool | USE_SMP_CRYPTO_IRK = true |
#define USE_SMP_CRYPTO_AES128_ 1 |
Derived from zephyr/subsys/bluetooth/host/smp.c.
Currently disabled since no use w/o private jau::uint256_t dhkey. *
Copyright (c) 2022 Gothel Software e.K. Copyright (c) 2017 Nordic Semiconductor ASA Copyright (c) 2015-2016 Intel Corporation
SPDX-License-Identifier: Apache-2.0
and
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Definition at line 40 of file SMPCrypto.cpp.
#define USE_SMP_CRYPTO_F5_ 0 |
Definition at line 42 of file SMPCrypto.cpp.
|
inlineconstexpr |
Definition at line 44 of file SMPCrypto.cpp.
|
inlineconstexpr |
Definition at line 45 of file SMPCrypto.cpp.