Lines Matching refs:Octet16
44 Octet16 const_Rb{0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
50 static void xor_128(Octet16* a, const Octet16& b) { in xor_128()
62 Octet16 aes_128(const Octet16& key, const Octet16& message) { in aes_128()
63 Octet16 key_reversed; in aes_128()
64 Octet16 message_reversed; in aes_128()
65 Octet16 output; in aes_128()
81 static void padding(Octet16* dest, uint8_t length) { in padding()
102 static Octet16 cmac_aes_k_calculate(const Octet16& key) { in cmac_aes_k_calculate()
103 Octet16 output; in cmac_aes_k_calculate()
104 Octet16 x{0}; // zero initialized in cmac_aes_k_calculate()
111 xor_128((Octet16*)&cmac_cb.text[(cmac_cb.round - i) * OCTET16_LEN], x); in cmac_aes_k_calculate()
125 static void cmac_prepare_last_block(const Octet16& k1, const Octet16& k2) { in cmac_prepare_last_block()
136 xor_128((Octet16*)&cmac_cb.text[0], k1); in cmac_prepare_last_block()
139 padding((Octet16*)&cmac_cb.text[0], (uint8_t)(cmac_cb.len % 16)); in cmac_prepare_last_block()
141 xor_128((Octet16*)&cmac_cb.text[0], k2); in cmac_prepare_last_block()
148 static void cmac_generate_subkey(const Octet16& key) { in cmac_generate_subkey()
151 Octet16 zero{}; in cmac_generate_subkey()
152 Octet16 p = aes_128(key, zero.data(), OCTET16_LEN); in cmac_generate_subkey()
154 Octet16 k1, k2; in cmac_generate_subkey()
182 Octet16 aes_cmac(const Octet16& key, const uint8_t* input, uint16_t length) { in aes_cmac()
209 Octet16 signature = cmac_aes_k_calculate(key); in aes_cmac()