Modules | |
Related Project(s) | |
In this section you can find all the projects related to the SHA204 Service - command marshaling functions. | |
Functions | |
uint8_t | sha204m_check_mac (struct sha204_check_mac_parameters *args) |
This function sends a CheckMAC command to the device and receives its response. More... | |
uint8_t | sha204m_derive_key (struct sha204_derive_key_parameters *args) |
This function sends a DeriveKey command to the device and receives its response. More... | |
uint8_t | sha204m_dev_rev (struct sha204_dev_rev_parameters *args) |
This function sends a DevRev command to the device and receives its response. More... | |
uint8_t | sha204m_execute (struct sha204_command_parameters *args) |
This function creates a command packet, sends it, and receives its response. More... | |
uint8_t | sha204m_gen_dig (struct sha204_gen_dig_parameters *args) |
This function sends a GenDig command to the device and receives its response. More... | |
uint8_t | sha204m_hmac (struct sha204_hmac_parameters *args) |
This function sends an HMAC command to the device and receives its response. More... | |
uint8_t | sha204m_lock (struct sha204_lock_parameters *args) |
This function sends a Lock command to the device and receives its response. More... | |
uint8_t | sha204m_mac (struct sha204_mac_parameters *args) |
This function sends a MAC command to the device and receives its response. More... | |
uint8_t | sha204m_nonce (struct sha204_nonce_parameters *args) |
This function sends a Nonce command to the device and receives its response. More... | |
uint8_t | sha204m_pause (struct sha204_pause_parameters *args) |
This function sends a Pause command to SWI devices and receives a response from the selected device. More... | |
uint8_t | sha204m_random (struct sha204_random_parameters *args) |
This function sends a Random command to the device and receives its response. More... | |
uint8_t | sha204m_read (struct sha204_read_parameters *args) |
This function sends a Read command to the device and receives its response. More... | |
uint8_t | sha204m_update_extra (struct sha204_update_extra_parameters *args) |
This function sends an UpdateExtra command to the device and receives its response. More... | |
uint8_t | sha204m_write (struct sha204_write_parameters *args) |
This function sends a Write command to the device and receives its response. More... | |
uint8_t sha204m_check_mac | ( | struct sha204_check_mac_parameters * | args | ) |
This function sends a CheckMAC command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References CHECKMAC_CLIENT_CHALLENGE_IDX, CHECKMAC_CLIENT_CHALLENGE_SIZE, CHECKMAC_CLIENT_RESPONSE_IDX, CHECKMAC_CLIENT_RESPONSE_SIZE, CHECKMAC_COUNT, CHECKMAC_DATA_IDX, CHECKMAC_DELAY, CHECKMAC_EXEC_MAX, CHECKMAC_KEYID_IDX, CHECKMAC_MODE_IDX, CHECKMAC_MODE_MASK, CHECKMAC_OTHER_DATA_SIZE, CHECKMAC_RSP_SIZE, sha204_check_mac_parameters::client_challenge, sha204_check_mac_parameters::client_response, sha204_check_mac_parameters::key_id, sha204_check_mac_parameters::mode, sha204_check_mac_parameters::other_data, sha204_check_mac_parameters::rx_buffer, SHA204_BAD_PARAM, SHA204_CHECKMAC, SHA204_COUNT_IDX, SHA204_KEY_ID_MAX, SHA204_OPCODE_IDX, sha204c_send_and_receive(), sha204_send_and_receive_parameters::tx_buffer, and sha204_check_mac_parameters::tx_buffer.
Referenced by main().
uint8_t sha204m_derive_key | ( | struct sha204_derive_key_parameters * | args | ) |
This function sends a DeriveKey command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References DERIVE_KEY_COUNT_LARGE, DERIVE_KEY_COUNT_SMALL, DERIVE_KEY_DELAY, DERIVE_KEY_EXEC_MAX, DERIVE_KEY_MAC_IDX, DERIVE_KEY_MAC_SIZE, DERIVE_KEY_RANDOM_FLAG, DERIVE_KEY_RANDOM_IDX, DERIVE_KEY_RSP_SIZE, DERIVE_KEY_TARGETKEY_IDX, sha204_derive_key_parameters::mac, sha204_derive_key_parameters::rx_buffer, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_DERIVE_KEY, SHA204_KEY_ID_MAX, SHA204_OPCODE_IDX, sha204c_send_and_receive(), sha204_derive_key_parameters::target_key, sha204_send_and_receive_parameters::tx_buffer, sha204_derive_key_parameters::tx_buffer, and sha204_derive_key_parameters::use_random.
uint8_t sha204m_dev_rev | ( | struct sha204_dev_rev_parameters * | args | ) |
This function sends a DevRev command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References DEVREV_COUNT, DEVREV_DELAY, DEVREV_EXEC_MAX, DEVREV_PARAM1_IDX, DEVREV_PARAM2_IDX, DEVREV_RSP_SIZE, sha204_dev_rev_parameters::rx_buffer, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_DEVREV, SHA204_OPCODE_IDX, sha204c_send_and_receive(), sha204_send_and_receive_parameters::tx_buffer, and sha204_dev_rev_parameters::tx_buffer.
Referenced by main().
uint8_t sha204m_execute | ( | struct sha204_command_parameters * | args | ) |
This function creates a command packet, sends it, and receives its response.
[in,out] | args | pointer to parameter structure |
References CHECKMAC_DELAY, CHECKMAC_EXEC_MAX, CHECKMAC_RSP_SIZE, sha204_command_parameters::data_1, sha204_command_parameters::data_2, sha204_command_parameters::data_3, sha204_command_parameters::data_len_1, sha204_command_parameters::data_len_2, sha204_command_parameters::data_len_3, DERIVE_KEY_DELAY, DERIVE_KEY_EXEC_MAX, DERIVE_KEY_RSP_SIZE, DEVREV_DELAY, DEVREV_EXEC_MAX, DEVREV_RSP_SIZE, GENDIG_DELAY, GENDIG_EXEC_MAX, GENDIG_RSP_SIZE, HMAC_DELAY, HMAC_EXEC_MAX, HMAC_RSP_SIZE, LOCK_DELAY, LOCK_EXEC_MAX, LOCK_RSP_SIZE, MAC_DELAY, MAC_EXEC_MAX, MAC_RSP_SIZE, NONCE_DELAY, NONCE_EXEC_MAX, NONCE_MODE_PASSTHROUGH, NONCE_RSP_SIZE_LONG, NONCE_RSP_SIZE_SHORT, sha204_command_parameters::op_code, sha204_command_parameters::param_1, sha204_command_parameters::param_2, PAUSE_DELAY, PAUSE_EXEC_MAX, PAUSE_RSP_SIZE, sha204_send_and_receive_parameters::poll_delay, sha204_send_and_receive_parameters::poll_timeout, RANDOM_DELAY, RANDOM_EXEC_MAX, RANDOM_RSP_SIZE, READ_32_RSP_SIZE, READ_4_RSP_SIZE, READ_DELAY, READ_EXEC_MAX, sha204_command_parameters::rx_buffer, sha204_send_and_receive_parameters::rx_size, sha204_command_parameters::rx_size, SHA204_CHECKMAC, SHA204_CMD_SIZE_MIN, SHA204_COMMAND_EXEC_MAX, SHA204_CRC_SIZE, SHA204_DERIVE_KEY, SHA204_DEVREV, SHA204_GENDIG, SHA204_HMAC, SHA204_LOCK, SHA204_MAC, SHA204_NONCE, SHA204_PAUSE, SHA204_RANDOM, SHA204_READ, SHA204_SUCCESS, SHA204_UPDATE_EXTRA, SHA204_WRITE, SHA204_ZONE_COUNT_FLAG, sha204c_calculate_crc(), sha204c_send_and_receive(), sha204m_check_parameters(), sha204_send_and_receive_parameters::tx_buffer, sha204_command_parameters::tx_buffer, UPDATE_DELAY, UPDATE_EXEC_MAX, UPDATE_RSP_SIZE, WRITE_DELAY, WRITE_EXEC_MAX, and WRITE_RSP_SIZE.
uint8_t sha204m_gen_dig | ( | struct sha204_gen_dig_parameters * | args | ) |
This function sends a GenDig command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References GENDIG_COUNT, GENDIG_COUNT_DATA, GENDIG_DATA_IDX, GENDIG_DELAY, GENDIG_EXEC_MAX, GENDIG_KEYID_IDX, GENDIG_OTHER_DATA_SIZE, GENDIG_RSP_SIZE, GENDIG_ZONE_DATA, GENDIG_ZONE_IDX, GENDIG_ZONE_OTP, sha204_gen_dig_parameters::key_id, sha204_gen_dig_parameters::other_data, sha204_gen_dig_parameters::rx_buffer, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_GENDIG, SHA204_KEY_ID_MAX, SHA204_OPCODE_IDX, SHA204_OTP_BLOCK_MAX, sha204c_send_and_receive(), sha204_send_and_receive_parameters::tx_buffer, sha204_gen_dig_parameters::tx_buffer, and sha204_gen_dig_parameters::zone.
uint8_t sha204m_hmac | ( | struct sha204_hmac_parameters * | args | ) |
This function sends an HMAC command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References HMAC_COUNT, HMAC_DELAY, HMAC_EXEC_MAX, HMAC_KEYID_IDX, HMAC_MODE_IDX, HMAC_MODE_MASK, HMAC_RSP_SIZE, sha204_hmac_parameters::key_id, sha204_hmac_parameters::mode, sha204_hmac_parameters::rx_buffer, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_HMAC, SHA204_OPCODE_IDX, sha204c_send_and_receive(), sha204_send_and_receive_parameters::tx_buffer, and sha204_hmac_parameters::tx_buffer.
uint8_t sha204m_lock | ( | struct sha204_lock_parameters * | args | ) |
This function sends a Lock command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References LOCK_COUNT, LOCK_DELAY, LOCK_EXEC_MAX, LOCK_RSP_SIZE, LOCK_SUMMARY_IDX, LOCK_ZONE_IDX, LOCK_ZONE_MASK, LOCK_ZONE_NO_CRC, sha204_lock_parameters::rx_buffer, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_LOCK, SHA204_OPCODE_IDX, sha204c_send_and_receive(), sha204_lock_parameters::summary, sha204_send_and_receive_parameters::tx_buffer, sha204_lock_parameters::tx_buffer, and sha204_lock_parameters::zone.
uint8_t sha204m_mac | ( | struct sha204_mac_parameters * | args | ) |
This function sends a MAC command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References sha204_mac_parameters::challenge, sha204_mac_parameters::key_id, MAC_CHALLENGE_IDX, MAC_CHALLENGE_SIZE, MAC_COUNT_LONG, MAC_COUNT_SHORT, MAC_DELAY, MAC_EXEC_MAX, MAC_KEYID_IDX, MAC_MODE_BLOCK2_TEMPKEY, MAC_MODE_IDX, MAC_MODE_MASK, MAC_RSP_SIZE, sha204_mac_parameters::mode, sha204_mac_parameters::rx_buffer, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_MAC, SHA204_OPCODE_IDX, sha204c_send_and_receive(), sha204_send_and_receive_parameters::tx_buffer, and sha204_mac_parameters::tx_buffer.
Referenced by main().
uint8_t sha204m_nonce | ( | struct sha204_nonce_parameters * | args | ) |
This function sends a Nonce command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References sha204_nonce_parameters::mode, NONCE_COUNT_LONG, NONCE_COUNT_SHORT, NONCE_DELAY, NONCE_EXEC_MAX, NONCE_INPUT_IDX, NONCE_MODE_IDX, NONCE_MODE_INVALID, NONCE_MODE_PASSTHROUGH, NONCE_NUMIN_SIZE, NONCE_NUMIN_SIZE_PASSTHROUGH, NONCE_PARAM2_IDX, NONCE_RSP_SIZE_LONG, NONCE_RSP_SIZE_SHORT, sha204_nonce_parameters::num_in, sha204_nonce_parameters::rx_buffer, sha204_send_and_receive_parameters::rx_size, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_NONCE, SHA204_OPCODE_IDX, sha204c_send_and_receive(), sha204_send_and_receive_parameters::tx_buffer, and sha204_nonce_parameters::tx_buffer.
uint8_t sha204m_pause | ( | struct sha204_pause_parameters * | args | ) |
This function sends a Pause command to SWI devices and receives a response from the selected device.
All others pause.
[in,out] | args | pointer to parameter structure |
References PAUSE_COUNT, PAUSE_DELAY, PAUSE_EXEC_MAX, PAUSE_PARAM2_IDX, PAUSE_RSP_SIZE, PAUSE_SELECT_IDX, sha204_pause_parameters::rx_buffer, sha204_pause_parameters::selector, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_OPCODE_IDX, SHA204_PAUSE, sha204c_send_and_receive(), sha204_send_and_receive_parameters::tx_buffer, and sha204_pause_parameters::tx_buffer.
uint8_t sha204m_random | ( | struct sha204_random_parameters * | args | ) |
This function sends a Random command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References sha204_random_parameters::mode, RANDOM_COUNT, RANDOM_DELAY, RANDOM_EXEC_MAX, RANDOM_MODE_IDX, RANDOM_NO_SEED_UPDATE, RANDOM_PARAM2_IDX, RANDOM_RSP_SIZE, RANDOM_SEED_UPDATE, sha204_random_parameters::rx_buffer, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_OPCODE_IDX, SHA204_RANDOM, sha204c_send_and_receive(), sha204_send_and_receive_parameters::tx_buffer, and sha204_random_parameters::tx_buffer.
Referenced by main().
uint8_t sha204m_read | ( | struct sha204_read_parameters * | args | ) |
This function sends a Read command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References sha204_read_parameters::address, READ_32_RSP_SIZE, READ_4_RSP_SIZE, READ_ADDR_IDX, READ_COUNT, READ_DELAY, READ_EXEC_MAX, READ_ZONE_IDX, READ_ZONE_MASK, READ_ZONE_MODE_32_BYTES, sha204_read_parameters::rx_buffer, sha204_send_and_receive_parameters::rx_size, SHA204_ADDRESS_MASK, SHA204_ADDRESS_MASK_CONFIG, SHA204_ADDRESS_MASK_OTP, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_OPCODE_IDX, SHA204_READ, SHA204_ZONE_CONFIG, SHA204_ZONE_COUNT_FLAG, SHA204_ZONE_DATA, SHA204_ZONE_MASK, SHA204_ZONE_OTP, sha204c_send_and_receive(), sha204_send_and_receive_parameters::tx_buffer, sha204_read_parameters::tx_buffer, and sha204_read_parameters::zone.
Referenced by test_all_devices().
uint8_t sha204m_update_extra | ( | struct sha204_update_extra_parameters * | args | ) |
This function sends an UpdateExtra command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References sha204_update_extra_parameters::mode, sha204_update_extra_parameters::new_value, sha204_update_extra_parameters::rx_buffer, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_OPCODE_IDX, SHA204_UPDATE_EXTRA, sha204c_send_and_receive(), sha204_send_and_receive_parameters::tx_buffer, sha204_update_extra_parameters::tx_buffer, UPDATE_CONFIG_BYTE_86, UPDATE_COUNT, UPDATE_DELAY, UPDATE_EXEC_MAX, UPDATE_MODE_IDX, UPDATE_RSP_SIZE, and UPDATE_VALUE_IDX.
uint8_t sha204m_write | ( | struct sha204_write_parameters * | args | ) |
This function sends a Write command to the device and receives its response.
[in,out] | args | pointer to parameter structure |
References sha204_write_parameters::address, sha204_write_parameters::mac, sha204_write_parameters::new_value, sha204_write_parameters::rx_buffer, SHA204_ADDRESS_MASK, SHA204_ADDRESS_MASK_CONFIG, SHA204_ADDRESS_MASK_OTP, SHA204_BAD_PARAM, SHA204_COUNT_IDX, SHA204_CRC_SIZE, SHA204_OPCODE_IDX, SHA204_WRITE, SHA204_ZONE_ACCESS_32, SHA204_ZONE_ACCESS_4, SHA204_ZONE_CONFIG, SHA204_ZONE_COUNT_FLAG, SHA204_ZONE_DATA, SHA204_ZONE_MASK, SHA204_ZONE_OTP, sha204c_send_and_receive(), sha204_send_and_receive_parameters::tx_buffer, sha204_write_parameters::tx_buffer, WRITE_DELAY, WRITE_EXEC_MAX, WRITE_MAC_SIZE, WRITE_RSP_SIZE, WRITE_ZONE_MASK, and sha204_write_parameters::zone.