| #pragma once |
| |
| #include <array> |
| #include <cstdint> |
| |
| namespace rmcp |
| { |
| |
| /* |
| * RSP needs more keying material than can be provided by session |
| * integrity key alone. As a result all keying material for the RSP |
| * confidentiality algorithms will be generated by processing a |
| * pre-defined set of constants using HMAC per [RFC2104], keyed by SIK. |
| * These constants are constructed using a hexadecimal octet value |
| * repeated up to the HMAC block size in length starting with the |
| * constant 01h. This mechanism can be used to derive up to 255 |
| * HMAC-block-length pieces of keying material from a single SIK.For the |
| * mandatory confidentiality algorithm AES-CBC-128, processing the |
| * following constant will generate the required amount of keying |
| * material. |
| */ |
| constexpr size_t CONST_N_SIZE = 20; |
| using Const_n = std::array<uint8_t, CONST_N_SIZE>; |
| |
| static constexpr Const_n const_1 = { |
| 0x01, 0x01, 0x01, 0x01, 0x01, |
| 0x01, 0x01, 0x01, 0x01, 0x01, |
| 0x01, 0x01, 0x01, 0x01, 0x01, |
| 0x01, 0x01, 0x01, 0x01, 0x01 |
| }; |
| |
| static constexpr Const_n const_2 = { |
| 0x02, 0x02, 0x02, 0x02, 0x02, |
| 0x02, 0x02, 0x02, 0x02, 0x02, |
| 0x02, 0x02, 0x02, 0x02, 0x02, |
| 0x02, 0x02, 0x02, 0x02, 0x02 |
| }; |
| |
| } // namespace rmcp |