SE050C2 サポートを元に戻す
ユーザーの要望により、直前の SE050C2 追加変更を元に戻しました。 戻した内容: - test_scp03_se050.c: SE050C2 チップ選択削除 - se050_scp03_keys.h: SE050C2 キー定義削除 - Makefile: SE050C2 CHIP_ID 削除 現在のサポートチップ: - SE050C0 (CHIP_ID=0) - SE050C1 (CHIP_ID=1) - SE050E2 (CHIP_ID=2)
This commit is contained in:
@@ -42,12 +42,10 @@ ifeq ($(SE050_CHIP),SE050C0)
|
|||||||
CHIP_ID = 0
|
CHIP_ID = 0
|
||||||
else ifeq ($(SE050_CHIP),SE050C1)
|
else ifeq ($(SE050_CHIP),SE050C1)
|
||||||
CHIP_ID = 1
|
CHIP_ID = 1
|
||||||
else ifeq ($(SE050_CHIP),SE050C2)
|
|
||||||
CHIP_ID = 2
|
|
||||||
else ifeq ($(SE050_CHIP),SE050E2)
|
else ifeq ($(SE050_CHIP),SE050E2)
|
||||||
CHIP_ID = 3
|
CHIP_ID = 2
|
||||||
else
|
else
|
||||||
$(error Invalid SE050_CHIP. Use SE050C0, SE050C1, SE050C2, or SE050E2)
|
$(error Invalid SE050_CHIP. Use SE050C0, SE050C1, or SE050E2)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Default target
|
# Default target
|
||||||
|
|||||||
@@ -23,20 +23,12 @@ extern const uint8_t SE050C0_DEK_KEY[16];
|
|||||||
|
|
||||||
/* ============================================================================
|
/* ============================================================================
|
||||||
* SE050C1 Platform SCP03 Keys
|
* SE050C1 Platform SCP03 Keys
|
||||||
*
|
|
||||||
* Note: SE050C2 uses the same PlatformSCP03 keys as SE050C1.
|
|
||||||
* See AN12436 for details.
|
|
||||||
* ============================================================================ */
|
* ============================================================================ */
|
||||||
|
|
||||||
extern const uint8_t SE050C1_ENC_KEY[16];
|
extern const uint8_t SE050C1_ENC_KEY[16];
|
||||||
extern const uint8_t SE050C1_MAC_KEY[16];
|
extern const uint8_t SE050C1_MAC_KEY[16];
|
||||||
extern const uint8_t SE050C1_DEK_KEY[16];
|
extern const uint8_t SE050C1_DEK_KEY[16];
|
||||||
|
|
||||||
/* SE050C2 uses same keys as SE050C1 */
|
|
||||||
#define SE050C2_ENC_KEY SE050C1_ENC_KEY
|
|
||||||
#define SE050C2_MAC_KEY SE050C1_MAC_KEY
|
|
||||||
#define SE050C2_DEK_KEY SE050C1_DEK_KEY
|
|
||||||
|
|
||||||
/* ============================================================================
|
/* ============================================================================
|
||||||
* SE050E2 Platform SCP03 Keys
|
* SE050E2 Platform SCP03 Keys
|
||||||
* ============================================================================ */
|
* ============================================================================ */
|
||||||
|
|||||||
@@ -29,17 +29,6 @@
|
|||||||
|
|
||||||
/* ============================================================================
|
/* ============================================================================
|
||||||
* Chip Selection and Key Mapping
|
* Chip Selection and Key Mapping
|
||||||
*
|
|
||||||
* Important: This test uses chip-specific PlatformSCP03 keys at compile time.
|
|
||||||
* The keys are NOT replaced at runtime - they are selected via SE050_CHIP macro.
|
|
||||||
*
|
|
||||||
* To test with different keys:
|
|
||||||
* make SE050_CHIP=SE050C0 test_se050 # Use SE050C0 default keys
|
|
||||||
* make SE050_CHIP=SE050C1 test_se050 # Use SE050C1 default keys
|
|
||||||
* make SE050_CHIP=SE050E2 test_se050 # Use SE050E2 default keys
|
|
||||||
*
|
|
||||||
* For custom keys, modify se050_scp03_keys.h or pass custom keys at runtime
|
|
||||||
* via se050_session_scp03_set_keys() (not implemented in this test).
|
|
||||||
* ============================================================================ */
|
* ============================================================================ */
|
||||||
|
|
||||||
#ifndef SE050_CHIP
|
#ifndef SE050_CHIP
|
||||||
@@ -49,8 +38,7 @@
|
|||||||
/* Chip type constants */
|
/* Chip type constants */
|
||||||
#define CHIP_SE050C0 0
|
#define CHIP_SE050C0 0
|
||||||
#define CHIP_SE050C1 1
|
#define CHIP_SE050C1 1
|
||||||
#define CHIP_SE050C2 2
|
#define CHIP_SE050E2 2
|
||||||
#define CHIP_SE050E2 3
|
|
||||||
|
|
||||||
#if SE050_CHIP == CHIP_SE050C0
|
#if SE050_CHIP == CHIP_SE050C0
|
||||||
#define CHIP_NAME "SE050C0"
|
#define CHIP_NAME "SE050C0"
|
||||||
@@ -64,12 +52,6 @@
|
|||||||
#define ENC_KEY SE050C1_ENC_KEY
|
#define ENC_KEY SE050C1_ENC_KEY
|
||||||
#define MAC_KEY SE050C1_MAC_KEY
|
#define MAC_KEY SE050C1_MAC_KEY
|
||||||
#define DEK_KEY SE050C1_DEK_KEY
|
#define DEK_KEY SE050C1_DEK_KEY
|
||||||
#elif SE050_CHIP == CHIP_SE050C2
|
|
||||||
#define CHIP_NAME "SE050C2"
|
|
||||||
#define SE050_DEFAULT_I2C_ADDR 0x48 /* 7-bit address */
|
|
||||||
#define ENC_KEY SE050C2_ENC_KEY
|
|
||||||
#define MAC_KEY SE050C2_MAC_KEY
|
|
||||||
#define DEK_KEY SE050C2_DEK_KEY
|
|
||||||
#elif SE050_CHIP == CHIP_SE050E2
|
#elif SE050_CHIP == CHIP_SE050E2
|
||||||
#define CHIP_NAME "SE050E2"
|
#define CHIP_NAME "SE050E2"
|
||||||
#define SE050_DEFAULT_I2C_ADDR 0x48 /* 7-bit address */
|
#define SE050_DEFAULT_I2C_ADDR 0x48 /* 7-bit address */
|
||||||
@@ -77,7 +59,7 @@
|
|||||||
#define MAC_KEY SE050E2_MAC_KEY
|
#define MAC_KEY SE050E2_MAC_KEY
|
||||||
#define DEK_KEY SE050E2_DEK_KEY
|
#define DEK_KEY SE050E2_DEK_KEY
|
||||||
#else
|
#else
|
||||||
#error "Invalid SE050_CHIP. Use SE050C0, SE050C1, SE050C2, or SE050E2"
|
#error "Invalid SE050_CHIP. Use SE050C0, SE050C1, or SE050E2"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ============================================================================
|
/* ============================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user