/** * @file se050_session_internal.h * @brief SE050 Session Internal Definitions * * Internal definitions for session implementation. * * License: MIT (Clean-room implementation) */ #ifndef SE050_SESSION_INTERNAL_H #define SE050_SESSION_INTERNAL_H #include "se050_wireguard.h" #include /* Session states */ typedef enum { SESSION_STATE_CREATED = 0, SESSION_STATE_OPENED, SESSION_STATE_CLOSED, } session_state_t; /** * @brief Session context structure */ struct se050_session_ctx { se050_i2c_hal_t *hal; /**< I2C HAL interface */ session_state_t state; /**< Current session state */ uint32_t session_id; /**< Unique session identifier */ uint8_t session_key[32]; /**< Session encryption key */ size_t session_key_len; /**< Session key length */ uint32_t cmd_counter; /**< Command counter for SCP03 */ uint32_t resp_counter; /**< Response counter for SCP03 */ se050_rng_ctx_t *rng; /**< RNG context */ }; #endif /* SE050_SESSION_INTERNAL_H */