1#ifndef BLUETOE_BINDING_NORDIC_NRF52_SECURITY_TOOL_BOX_HPP
2#define BLUETOE_BINDING_NORDIC_NRF52_SECURITY_TOOL_BOX_HPP
4#include <bluetoe/security_manager.hpp>
11 namespace nrf52_details
13 std::uint32_t random_number32();
14 std::uint64_t random_number64();
15 bluetoe::details::uint128_t aes_le(
const bluetoe::details::uint128_t& key,
const bluetoe::details::uint128_t& data );
22 class security_tool_box
28 bluetoe::details::uint128_t create_srand();
30 bluetoe::details::longterm_key_t create_long_term_key();
32 bluetoe::details::uint128_t c1(
33 const bluetoe::details::uint128_t& temp_key,
34 const bluetoe::details::uint128_t& rand,
35 const bluetoe::details::uint128_t& p1,
36 const bluetoe::details::uint128_t& p2 )
const;
38 bluetoe::details::uint128_t s1(
39 const bluetoe::details::uint128_t& temp_key,
40 const bluetoe::details::uint128_t& srand,
41 const bluetoe::details::uint128_t& mrand );
46 bool is_valid_public_key(
const std::uint8_t* public_key )
const;
51 std::pair< bluetoe::details::ecdh_public_key_t, bluetoe::details::ecdh_private_key_t > generate_keys();
56 bluetoe::details::uint128_t select_random_nonce();
61 bluetoe::details::ecdh_shared_secret_t p256(
const std::uint8_t* private_key,
const std::uint8_t* public_key );
66 bluetoe::details::uint128_t f4(
const std::uint8_t* u,
const std::uint8_t* v,
const std::array< std::uint8_t, 16 >& k, std::uint8_t z );
71 std::pair< bluetoe::details::uint128_t, bluetoe::details::uint128_t > f5(
72 const bluetoe::details::ecdh_shared_secret_t dh_key,
73 const bluetoe::details::uint128_t& nonce_central,
74 const bluetoe::details::uint128_t& nonce_periperal,
81 bluetoe::details::uint128_t f6(
82 const bluetoe::details::uint128_t& key,
83 const bluetoe::details::uint128_t& n1,
84 const bluetoe::details::uint128_t& n2,
85 const bluetoe::details::uint128_t& r,
86 const bluetoe::details::io_capabilities_t& io_caps,
94 const std::uint8_t* u,
95 const std::uint8_t* v,
96 const bluetoe::details::uint128_t& x,
97 const bluetoe::details::uint128_t& y );
102 bluetoe::details::uint128_t create_passkey();
data type containing a device address and the address type (public or random).
Definition: address.hpp:107