|
esp8266ndn
NDN Arduino library for ESP8266 and more
|
AES-GCM Initialization Vector generator and checker. More...
#include <iv.hpp>
Public Types | |
| using | IvLen = std::integral_constant< size_t, 12 > |
| IV length. | |
| using | BlockSize = std::integral_constant< size_t, 16 > |
| AES-GCM block size. | |
Public Member Functions | |
| bool | randomize () |
| Randomize the random number portion. | |
| bool | write (uint8_t room[12]) |
Write IV to room . | |
| bool | advance (size_t size) |
| Advance the counter portion. | |
| bool | check (const uint8_t *iv, size_t size) |
| Check received IV. | |
Public Attributes | |
| uint64_t | random = 0 |
| uint32_t | counter = 0 |
AES-GCM Initialization Vector generator and checker.
IV is 12 octets. Other sizes are not supported. IV is constructed from an 8-octet random number and a 4-octet counter. The random number portion is expected to stay the same. The counter portion is incremented for every encrypted block.
| using ndnph::AesGcmIvHelper::BlockSize = std::integral_constant<size_t, 16> |
AES-GCM block size.
| using ndnph::AesGcmIvHelper::IvLen = std::integral_constant<size_t, 12> |
IV length.
|
inline |
Advance the counter portion.
| size | ciphertext size. |
|
inline |
Check received IV.
| iv | received IV. |
| size | ciphertext size. |
|
inline |
Randomize the random number portion.
|
inline |
Write IV to room .
| uint32_t ndnph::AesGcmIvHelper::counter = 0 |
| uint64_t ndnph::AesGcmIvHelper::random = 0 |