ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
pc_hmac_sha256_ctx Struct Reference

Streaming HMAC-SHA2-256 context. More...

#include <hmac_sha256.h>

Public Attributes

pc_sha256_ctx inner
 Inner hash context (key XOR ipad prepended).
 
uint8_t okey [64]
 Outer key block (key XOR opad), stored for the final step.
 

Detailed Description

Streaming HMAC-SHA2-256 context.

For MACs assembled from separate pieces - e.g. the SSH packet MAC over (uint32_be(seq_num) || plaintext_packet):

pc_hmac_sha256_init(&ctx, key, key_len); pc_hmac_sha256_update(&ctx, seq_bytes, 4); pc_hmac_sha256_update(&ctx, packet, pkt_len); pc_hmac_sha256_final(&ctx, mac_out);

Definition at line 56 of file hmac_sha256.h.

Member Data Documentation

◆ inner

pc_sha256_ctx pc_hmac_sha256_ctx::inner

Inner hash context (key XOR ipad prepended).

Definition at line 58 of file hmac_sha256.h.

Referenced by pc_hmac_sha256_final(), pc_hmac_sha256_init(), and pc_hmac_sha256_update().

◆ okey

uint8_t pc_hmac_sha256_ctx::okey[64]

Outer key block (key XOR opad), stored for the final step.

Definition at line 59 of file hmac_sha256.h.

Referenced by pc_hmac_sha256_final(), and pc_hmac_sha256_init().


The documentation for this struct was generated from the following file: