hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
nbt-cmd-perso.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2024-2026 Infineon Technologies AG
2// SPDX-License-Identifier: MIT
3
8#ifndef NBT_CMD_PERSO_H
9#define NBT_CMD_PERSO_H
10
11#include "infineon/ifx-utils.h"
13#include "infineon/nbt-apdu.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/* Function identifiers */
20
24#define NBT_FINALIZE_PERSONALIZATION UINT8_C(0x01)
25
29#define NBT_PERSONALIZE_DATA UINT8_C(0x02)
30
34#define NBT_BACKEND_TEST UINT8_C(0x03)
35
39#define NBT_BACKEND_TEST_DISABLE UINT8_C(0x04)
40
45typedef enum
46{
47 /* DGI for personalize AES COTT key */
48 NBT_DGI_A001 = UINT16_C(0xA001),
49
50 /* DGI for personalize ECC key */
51 NBT_DGI_A002 = UINT16_C(0xA002),
52
53 /* DGI for personalize password data */
54 NBT_DGI_A003 = UINT16_C(0xA003),
55
56 /* DGI for personalize NDEF file content */
57 NBT_DGI_E104 = UINT16_C(0xE104),
58
59 /* DGI for personalize proprietary files (E1A1) content */
60 NBT_DGI_E1A1 = UINT16_C(0xE1A1),
61
62 /* DGI for personalize proprietary files (E1A2) content */
63 NBT_DGI_E1A2 = UINT16_C(0xE1A2),
64
65 /* DGI for personalize proprietary files (E1A3) content */
66 NBT_DGI_E1A3 = UINT16_C(0xE1A3),
67
68 /* DGI for personalize proprietary files (E1A4) content */
69 NBT_DGI_E1A4 = UINT16_C(0xE1A4),
70
71 /* DGI for personalize configuration data (File access policy) */
72 NBT_DGI_E1AF = UINT16_C(0xE1AF),
73
74 /* DGI for finalize personalization command */
75 NBT_DGI_BF63 = UINT16_C(0xBF63)
77
81typedef enum
82{
83 /* Backend Test - Random number generation */
84 NBT_BACKEND_TEST_RANDOM_NUM_GENERATION = (1 << 0),
85
86 /* Backend Test - ECDSA sign */
87 NBT_BACKEND_TEST_ECDSA_SIGN = (1 << 1),
88
89 /* Backend Test - Public key extraction from certificate */
90 NBT_BACKEND_TEST_PUBLIC_KEY_EXTRACTION_FROM_CERT = (1 << 2),
91
92 /* Backend Test - ECDSA verification */
93 NBT_BACKEND_TEST_ECDSA_VERIFY = (1 << 3),
94
95 /* Backend Test - UID Extraction from Certificate */
96 NBT_BACKEND_TEST_UID_EXTRACTION_FROM_CERT = (1 << 4),
97
98 /* Backend Test - UID comparison */
99 NBT_BACKEND_TEST_UID_COMPARISON = (1 << 5),
100
101 /* Backend Test - COTT computation */
102 NBT_BACKEND_TEST_COTT_COMPUTATION = (1 << 6),
103
104 /* Backend Test - Enable all */
105 NBT_BACKEND_TEST_ALL = 0x7F,
107
123
140 const ifx_blob_t *dgi_data);
180ifx_status_t nbt_backend_test(nbt_cmd_t *self, uint8_t test_request);
181
198
199#ifdef __cplusplus
200}
201
202#endif /* __cplusplus */
203#endif /* NBT_CMD_PERSO_H */
uint32_t ifx_status_t
Custom return code type used by all Infineon host software libraries.
Definition ifx-error.h:91
Provides utility functions and macros.
Provides the library and module identifiers code of the library.
NBT protocol API for exchanging APDUs with NBT product.
ifx_status_t nbt_finalize_personalization(nbt_cmd_t *self)
Issues finalize personalization command. Personalization is considered completed after successful exe...
nbt_personalize_data_dgi
Enumeration stores data group identifier (DGI) for personalize data command.
ifx_status_t nbt_personalize_data(nbt_cmd_t *self, uint16_t dgi, const ifx_blob_t *dgi_data)
Issues personalize data command to personalize the data elements of the applet. Applet personalizatio...
ifx_status_t nbt_backend_test_disable(nbt_cmd_t *self)
Issues backend test command that permanently disables the backend test support in the chip.
nbt_backend_test_request
Enumeration holds the bitmaps to perform backend tests.
ifx_status_t nbt_backend_test(nbt_cmd_t *self, uint8_t test_request)
Issues backend test command to perform the requested backend tests.
Data storage for data and data length where both are required as parameters.
Definition ifx-utils.h:189
Generic NBT command set structure for building and performing NBT commands.
Definition nbt-apdu.h:76