NXP Reader Library  v17.1.0.2535

end of defgroup phhalHw_SamAV3_Cmd_PKI_ECC More...

Collaboration diagram for EMV:

Functions

phStatus_t phhalHw_SamAV3_Cmd_PKI_ImportCaPk (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bOption, uint8_t *pCaPkData, uint8_t bCaPkDataLen)
 Imports a CaPk key to Sam hardware. More...
 
phStatus_t phhalHw_SamAV3_Cmd_PKI_ImportCaPkOffline (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bReceiveOfflineAck, uint8_t bOption, uint8_t *pOfflineCryptogram, uint8_t bOfflineCryptogramLen, uint8_t **ppOfflineAck, uint16_t *pOfflineAckLen)
 Imports a offline CaPk key to Sam hardware. More...
 
phStatus_t phhalHw_SamAV3_Cmd_PKI_RemoveCaPk (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t *pRID, uint8_t bPkID)
 Removes a CaPk key to Sam hardware. More...
 
phStatus_t phhalHw_SamAV3_Cmd_PKI_RemoveCaPkOffline (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bReceiveOfflineAck, uint8_t *pOfflineCryptogram, uint8_t bOfflineCryptogramLen, uint8_t **ppOfflineAck, uint16_t *pOfflineAckLen)
 Removes a CaPk key to Sam hardware. More...
 
phStatus_t phhalHw_SamAV3_Cmd_PKI_ExportCaPk (phhalHw_SamAV3_DataParams_t *pDataParams, uint16_t wOption, uint8_t *pRID, uint8_t bPkID, uint8_t **ppKeyEntry, uint16_t *pKeyEntryLen)
 Exports a CaPk key to Sam hardware. More...
 
phStatus_t phhalHw_SamAV3_Cmd_PKI_LoadIssuerPk (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bLFI, uint16_t wOption, uint8_t *pData, uint8_t bDataLen, uint8_t *pIssureID, uint8_t *pExpDate, uint8_t *pSerialNo)
 Loads a Issuer Public Key. More...
 
phStatus_t phhalHw_SamAV3_Cmd_PKI_LoadIccPk (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bLFI, uint16_t wOption, uint8_t *pData, uint8_t bDataLen, uint8_t *pPAN, uint8_t *pExpDate, uint8_t *pSerialNo, uint8_t *pAlgoPk)
 Loads a ICC Public Key. More...
 

Sam AV3 command code for Public Key Infrastructure features.

#define PHHAL_HW_SAMAV3_CMD_PKI_IMPORT_CAPK_INS   0x24
 Sam AV3 Instruction code for Cmd.PKI_ImportCaPk command.
 
#define PHHAL_HW_SAMAV3_CMD_PKI_REMOVE_CAPK_INS   0x2F
 Sam AV3 Instruction code for Cmd.PKI_RemoveCaPk command.
 
#define PHHAL_HW_SAMAV3_CMD_PKI_EXPORT_CAPK_INS   0x3D
 Sam AV3 Instruction code for Cmd.PKI_ExportCaPk command.
 
#define PHHAL_HW_SAMAV3_CMD_PKI_LOAD_ISSUER_PK_INS   0x27
 Sam AV3 Instruction code for Cmd.PKI_LoadIssuerPk command.
 
#define PHHAL_HW_SAMAV3_CMD_PKI_LOAD_ICC_PK_INS   0x28
 Sam AV3 Instruction code for Cmd.PKI_LoadIccPk command.
 

Option macros for Sam AV3 Public Key Infrastructure ImportCaPK command.

#define PHHAL_HW_SAMAV3_CMD_PKI_IMPORT_KEY_SETTINGS_VALUE   0x00
 Option mask for updating key settings and key values.
 
#define PHHAL_HW_SAMAV3_CMD_PKI_IMPORT_KEY_SETTINGS_ONLY   0x80
 Option mask for updating key settings only.
 

Option macros for Sam AV3 Public Key Infrastructure ImportCaPkOffline, RemoveCaPKOffline.

#define PHHAL_HW_SAMAV3_CMD_PKI_OFFLINE_ACK_RECEPTION_OFF   0x00
 Option mask for not exchanging the Le and no reception of offline acknowledgement.
 
#define PHHAL_HW_SAMAV3_CMD_PKI_OFFLINE_ACK_RECEPTION_ON   0x01
 Option mask for exchanging the Le and no reception of offline acknowledgement.
 

Option macros for Sam AV3 Public Key Infrastructure ExportCaPK command.

#define PHHAL_HW_SAMAV3_CMD_PKI_EXPORT_KEY_SETTINGS_VALUE   0x0000
 Option mask for exporting key settings and key values.
 
#define PHHAL_HW_SAMAV3_CMD_PKI_EXPORT_KEY_SETTINGS_ONLY   0x0080
 Option mask for exporting key settings only.
 

Detailed Description

end of defgroup phhalHw_SamAV3_Cmd_PKI_ECC

See also

SAM commands used for asymmetric ECC key management, signature handling and verification.

Function Documentation

◆ phhalHw_SamAV3_Cmd_PKI_ImportCaPk()

phStatus_t phhalHw_SamAV3_Cmd_PKI_ImportCaPk ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bOption,
uint8_t pCaPkData,
uint8_t  bCaPkDataLen 
)

Imports a CaPk key to Sam hardware.

This command is used to import a Certificate Authority Public Key in the SAM for a given RID (Registered Application Provider Identifier)

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bOption[In] Option for P2 information byte.
[in]pCaPkData[In] Certification Authority Public Key Related Data. This data buffer should have the complete data based on the selected option.
[in]bCaPkDataLen[In] Certification Authority Public Key Related Data length.

◆ phhalHw_SamAV3_Cmd_PKI_ImportCaPkOffline()

phStatus_t phhalHw_SamAV3_Cmd_PKI_ImportCaPkOffline ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bReceiveOfflineAck,
uint8_t  bOption,
uint8_t pOfflineCryptogram,
uint8_t  bOfflineCryptogramLen,
uint8_t **  ppOfflineAck,
uint16_t pOfflineAckLen 
)

Imports a offline CaPk key to Sam hardware.

This command is used to import a Certificate Authority Public Key in the SAM

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bReceiveOfflineAck[In] Flag to exchange LE and receive the offline acknowledgement.
[in]bOption[In] Option for P2 information byte.
[in]pOfflineCryptogram[In] Offline change cryptogram. This data buffer should have the complete data based on the selected option.
[in]bOfflineCryptogramLen[In] Length of bytes available in OfflineCryptogram buffer.
[out]ppOfflineAck[Out] Offline remove acknowledge as MACt(Kcm, 0x90 || 0x00 || INS || Change_Ctr || RID || PkID || SAMUID).
[out]pOfflineAckLen[Out] Length of bytes available in OfflineAck buffer.

◆ phhalHw_SamAV3_Cmd_PKI_RemoveCaPk()

phStatus_t phhalHw_SamAV3_Cmd_PKI_RemoveCaPk ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t pRID,
uint8_t  bPkID 
)

Removes a CaPk key to Sam hardware.

This command is used to permanently remove a Certificate Authority Public Key from the EMV key storage table (EMV_KST). The command shall clear and reset the permanent storage containg the CAPk related data.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pRID[In] Registered Application provider Identifier. This buffer should contain 5 bytes of RID.
[in]bPkID[In] Certification Authority Public Key Index.

◆ phhalHw_SamAV3_Cmd_PKI_RemoveCaPkOffline()

phStatus_t phhalHw_SamAV3_Cmd_PKI_RemoveCaPkOffline ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bReceiveOfflineAck,
uint8_t pOfflineCryptogram,
uint8_t  bOfflineCryptogramLen,
uint8_t **  ppOfflineAck,
uint16_t pOfflineAckLen 
)

Removes a CaPk key to Sam hardware.

This command is used to permanently remove a Certificate Authority Public Key from the EMV key storage table (EMV_KST). The command shall clear and reset the permanent storage containg the CAPk related data.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bReceiveOfflineAck[In] Flag to exchange LE and receive the offline acknowledgement.
[in]pOfflineCryptogram[In] Offline change cryptogram. This data buffer should have the complete data based on the selected option.
[in]bOfflineCryptogramLen[In] Length of bytes available in OfflineCryptogram buffer.
[out]ppOfflineAck[Out] Offline remove acknowledge as MACt(Kcm, 0x90 || 0x00 || INS || Change_Ctr || RID || PkID || SAMUID).
[out]pOfflineAckLen[Out] Length of bytes available in OfflineAck buffer.

◆ phhalHw_SamAV3_Cmd_PKI_ExportCaPk()

phStatus_t phhalHw_SamAV3_Cmd_PKI_ExportCaPk ( phhalHw_SamAV3_DataParams_t pDataParams,
uint16_t  wOption,
uint8_t pRID,
uint8_t  bPkID,
uint8_t **  ppKeyEntry,
uint16_t pKeyEntryLen 
)

Exports a CaPk key to Sam hardware.

This command is used export a Certificate Authority Public Key from the EMV CA public keys key set entry (KST). The CA Pk entry is selected with the RID and PkID.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful. PH_ERR_SUCCESS_CHAINING for successfull chaining operation.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wOption[In] Option for P1 information byte.
[in]pRID[In] Registered Application provider Identifier. This buffer should contain 5 bytes of RID.
[in]bPkID[In] Certification Authority Public Key Index.
[out]ppKeyEntry[Out] CAPk key entry information returned by Sam hardware.
[out]pKeyEntryLen[Out] Length of bytes available in KeyEntry buffer.

◆ phhalHw_SamAV3_Cmd_PKI_LoadIssuerPk()

phStatus_t phhalHw_SamAV3_Cmd_PKI_LoadIssuerPk ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bLFI,
uint16_t  wOption,
uint8_t pData,
uint8_t  bDataLen,
uint8_t pIssureID,
uint8_t pExpDate,
uint8_t pSerialNo 
)

Loads a Issuer Public Key.

This command is used to load an Issuer Public Key. The SAM only accepts Issuer Public Key Certificate signed by the selected Certification Authority identified by RID and PkID. The required Certification Authority Public Key must be stored in the CA Key Storage otherwise Cmd.PKI_LoadIssuerPk will fail.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful. PH_ERR_SUCCESS_CHAINING for successfull chaining operation.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bLFI[In] Option for P1 information byte.
[in]wOption[In] Bufferring options for exchanging the payload information.
[in]pData[In] The payload to be exchanged or bufferred.
[in]bDataLen[In] Length of bytes available in Data buffer.
[out]pIssureID[Out] Issuer Identifier. This buffer will have 4 bytes of ID.
[out]pExpDate[Out] Certificate Expiration Date (MMYY). The buffer will have 2 bytes of data.
[out]pSerialNo[Out] Certificate Serial Number. The buffer will have 3 bytes of serial number.

◆ phhalHw_SamAV3_Cmd_PKI_LoadIccPk()

phStatus_t phhalHw_SamAV3_Cmd_PKI_LoadIccPk ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bLFI,
uint16_t  wOption,
uint8_t pData,
uint8_t  bDataLen,
uint8_t pPAN,
uint8_t pExpDate,
uint8_t pSerialNo,
uint8_t pAlgoPk 
)

Loads a ICC Public Key.

This command is used to load an ICC Public Key or an ICC PIN Encipherment Public Key. The SAM only accepts Public Key Certificate signed by the Issuer identified by the Issuer Public Key previously loaded with Cmd.PKI_LoadIssuerPk Cmd.PKI_LoadIccPk fails if the Issuer Public Key is not previously loaded, or has not signed the ICC (PIN Encipherment) Public Key Certificate.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful. PH_ERR_SUCCESS_CHAINING for successfull chaining operation.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bLFI[In] Option for P1 information byte.
[in]wOption[In] Bufferring options for exchanging the payload information.
[in]pData[In] The payload to be exchanged or bufferred.
[in]bDataLen[In] Length of bytes available in Data buffer.
[out]pPAN[Out] Application PAN. This buffer will have 10 bytes of information.
[out]pExpDate[Out] Certificate Expiration Date (MMYY). The buffer will have 2 bytes of data.
[out]pSerialNo[Out] Certificate Serial Number. The buffer will have 3 bytes of serial number.
[out]pAlgoPk[Out] ICC Public Key Algorithm Indicator. The buffer will have 1 bytes of algorithm information.