Describes about the NTAG X DNA ASymmetric Key Management commands.
More...
|
| | Defines |
| | Macro Definitions for ASymmetric Key Management commands.
|
| |
|
| phStatus_t | phalNtagXDna_ManageKeyPair (void *pDataParams, uint8_t bComOption, uint8_t bKeyNo, uint8_t bOption, uint8_t bCurveID, uint8_t *pKeyPolicy, uint8_t bWriteAccess, uint32_t dwKUCLimit, uint16_t wPrivKey_No, uint16_t wPrivKey_Pos, uint8_t **ppResponse, uint16_t *pRspLen) |
| | Creates or updates a private key entry by generating a key pair or importing a private key. More...
|
| |
| phStatus_t | phalNtagXDna_ManageCARootKey (void *pDataParams, uint8_t bComOption, uint8_t bKeyNo, uint8_t bCurveID, uint8_t *pAccessRights, uint8_t bWriteAccess, uint16_t wPubKey_No, uint16_t wPubKey_Pos, uint8_t *pIssuer, uint8_t bIssuerLen) |
| | Creates or updates a public key entry for storing a CARootKey. More...
|
| |
Describes about the NTAG X DNA ASymmetric Key Management commands.
◆ phalNtagXDna_ManageKeyPair()
| phStatus_t phalNtagXDna_ManageKeyPair |
( |
void * |
pDataParams, |
|
|
uint8_t |
bComOption, |
|
|
uint8_t |
bKeyNo, |
|
|
uint8_t |
bOption, |
|
|
uint8_t |
bCurveID, |
|
|
uint8_t * |
pKeyPolicy, |
|
|
uint8_t |
bWriteAccess, |
|
|
uint32_t |
dwKUCLimit, |
|
|
uint16_t |
wPrivKey_No, |
|
|
uint16_t |
wPrivKey_Pos, |
|
|
uint8_t ** |
ppResponse, |
|
|
uint16_t * |
pRspLen |
|
) |
| |
Creates or updates a private key entry by generating a key pair or importing a private key.
- Note
- bComOption will be
- Communication mode of the targeted key
- If targeting not yet existing key, default CommMode defined by SetConfiguration for option ECC Key Management should be used. Default is Fully Enciphered.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
- If the buffers are null.
- The values provided in bComOption is not supported.
|
| PH_ERR_KEY |
- If Key type is not ECC.
- The Key format is not Binary (Uncompressed Point Representation).
- The Key pair is not Private type.
|
| XXXX |
- Depending on status codes return by tag.
- Other Depending on implementation and underlying component.
|
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bComOption | [In] Indicates the mode of communication to be used while exchanging the data to tag.
|
| [in] | bKeyNo | [In] Key number of the key to be managed.
- At tag level, two keys are supported.
- At application level, up to five keys are supported.
|
| [in] | bOption | [In] Target action to perform. Should be one of the below values.
|
| [in] | bCurveID | [In] The targeted curve. Should be one of the below values.
|
| [in] | pKeyPolicy | [In] Defines the allowed crypto operations with the targeted key.
- Should be two bytes as follows,
- Byte 0 => Bit 7 - 0
- Byte 1 => Bit 15 - 8
- Supported values are, should be ORed
|
| [in] | bWriteAccess | [In] Defines the CommMode and access right required to update the key with Cmd.ManageKeyPair. Should contain below information.
- Bits[7 - 6]: RFU
- Bits[5 - 4]: Communication Modes, One of the below values.
- Bits[3 - 0]: Access Rights, One of the below values.
- 0x00 - 0x0B: Authentication Required
- 0x0C : Free Access over NFC, Authentication required over I2C
- 0x0D : Free Access over I2C, Authentication required over NFC
- 0x0E : Free Access
- 0x0F : No Access or RFU
|
| [in] | dwKUCLimit | [In] Defines the key usage limit of the targeted key.
- 0x00000000: Key Usage Counter Limit is disabled
- Any other value: Key Usage Counter Limit enabled with the given value (LSB first).
|
| [in] | wPrivKey_No | [In] Key number in KeyStore of Private Key. |
| [in] | wPrivKey_Pos | [In] Key position in KeyStore of Private Key. |
| [out] | ppResponse | [Out] The Public Key in uncompressed point representation format.
|
| [out] | pRspLen | [Out] Length of bytes available in ppResponse buffer.
|
◆ phalNtagXDna_ManageCARootKey()
Creates or updates a public key entry for storing a CARootKey.
- Note
- bComOption will be
- Communication mode of the targeted key
- If targeting not yet existing key, default CommMode defined by SetConfiguration for option DUOX Key Management should be used. Default is Fully Enciphered.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_DATA_PARAMS | If DataParams is null. |
| PH_ERR_INVALID_PARAMETER |
- If the buffers are null.
- The values provided in bComOption is not supported.
|
| PH_ERR_KEY |
- If Key type is not DUOX.
- The Key format is not Binary (Uncompressed Point Representation).
- The Key pair is not Public type.
|
| XXXX |
- Depending on status codes return by tag.
- Other Depending on implementation and underlying component.
|
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bComOption | [In] Indicates the mode of communication to be used while exchanging the data to tag.
|
| [in] | bKeyNo | [In] Key number of the key to be managed.
- At tag level, two keys are supported.
- At application level, up to five keys are supported.
|
| [in] | bCurveID | [In] The targeted curve. Should be one of the below values.
|
| [in] | pAccessRights | [In] Access rights associated with the CARootKey. Should be 2 byte. |
| [in] | bWriteAccess | [In] Defines the CommMode and access right required to update the key with Cmd.ManageCARootKey. Should contain below information.
- Bits[7 - 6]: RFU
- Bits[5 - 4]: Communication Modes, One of the below values.
- Bits[3 - 0]: Access Rights, One of the below values.
- 0x00 - 0x0B: Authentication Required
- 0x0C : Free Access over NFC, Authentication required over I2C
- 0x0D : Free Access over I2C, Authentication required over NFC
- 0x0E : Free Access
- 0x0F : No Access or RFU
|
| [in] | wPubKey_No | [In] Key number in KeyStore of Public Key. |
| [in] | wPubKey_Pos | [In] Key position in KeyStore of Public Key. |
| [in] | pIssuer | [In] The Trusted issuer name. Should be one of the following.
- NULL in case if No trusted issuer name check required.
- The Trusted issuer information otherwise. Ranging from 1 - 255 bytes
|
| [in] | bIssuerLen | [In] Length of bytes available in pIssuer buffer. |