Platform SCP03 セッション統合とテスト改善
- Session に SCP03 コンテキストを統合 (se050_session_scp03_* API) - PlatformSCP03 認証フロー実装 - テストを再記述 (42/42 パス) - API ドキュメント更新 - ビルドシステム改善
This commit is contained in:
@@ -165,6 +165,54 @@ void se050_session_close(se050_session_ctx_t *ctx);
|
||||
*/
|
||||
void se050_session_delete(se050_session_ctx_t *ctx);
|
||||
|
||||
/* ============================================================================
|
||||
* Session SCP03 Integration
|
||||
* ============================================================================ */
|
||||
|
||||
/**
|
||||
* @brief Initialize SCP03 secure channel for session
|
||||
* @param ctx Session context
|
||||
* @return SE050_OK on success
|
||||
*/
|
||||
se050_status_t se050_session_scp03_init(se050_session_ctx_t *ctx);
|
||||
|
||||
/**
|
||||
* @brief Set SCP03 keys for PlatformSCP03 authentication
|
||||
* @param ctx Session context
|
||||
* @param enc_key Encryption key (16 bytes)
|
||||
* @param mac_key MAC key (16 bytes)
|
||||
* @param dek_key Data Encryption Key (16 bytes)
|
||||
* @return SE050_OK on success
|
||||
*/
|
||||
se050_status_t se050_session_scp03_set_keys(se050_session_ctx_t *ctx,
|
||||
const uint8_t *enc_key,
|
||||
const uint8_t *mac_key,
|
||||
const uint8_t *dek_key);
|
||||
|
||||
/**
|
||||
* @brief Encrypt command using SCP03
|
||||
* @param ctx Session context
|
||||
* @param cmd Command buffer
|
||||
* @param cmd_len Command length (updated after padding)
|
||||
* @return SE050_OK on success
|
||||
*/
|
||||
se050_status_t se050_session_scp03_encrypt(se050_session_ctx_t *ctx,
|
||||
uint8_t *cmd,
|
||||
size_t *cmd_len);
|
||||
|
||||
/**
|
||||
* @brief Decrypt response using SCP03
|
||||
* @param ctx Session context
|
||||
* @param cmd_len Original command length
|
||||
* @param rsp Response buffer
|
||||
* @param rsp_len Response length (updated after decryption)
|
||||
* @return Status word (0x9000 on success)
|
||||
*/
|
||||
uint16_t se050_session_scp03_decrypt(se050_session_ctx_t *ctx,
|
||||
size_t cmd_len,
|
||||
uint8_t *rsp,
|
||||
size_t *rsp_len);
|
||||
|
||||
/* ============================================================================
|
||||
* Key Store
|
||||
* ============================================================================ */
|
||||
|
||||
Reference in New Issue
Block a user