/NetX-Duo-v6.4.1/crypto_libraries/src/ |
D | nx_crypto_cbc.c | 65 …P static VOID _nx_crypto_cbc_xor(UCHAR *plaintext, UCHAR *key, UCHAR *ciphertext, UCHAR block_size) in _nx_crypto_cbc_xor() argument 69 for (i = 0; i < block_size; i++) in _nx_crypto_cbc_xor() 129 … UCHAR *input, UCHAR *output, UINT length, UCHAR block_size) in _nx_crypto_cbc_encrypt() argument 134 if (block_size == 0) in _nx_crypto_cbc_encrypt() 140 if (length % block_size) in _nx_crypto_cbc_encrypt() 146 if (block_size > sizeof(cbc_metadata -> nx_crypto_cbc_last_block)) in _nx_crypto_cbc_encrypt() 154 for (i = 0; i < length; i += block_size) in _nx_crypto_cbc_encrypt() 158 _nx_crypto_cbc_xor(&input[i], last_cipher, output, block_size); in _nx_crypto_cbc_encrypt() 161 crypto_function(crypto_metadata, output, output, block_size); in _nx_crypto_cbc_encrypt() 166 output += block_size; in _nx_crypto_cbc_encrypt() [all …]
|
D | nx_crypto_ccm.c | 148 … UCHAR *input, UCHAR *output, UINT length, UCHAR *iv, UINT block_size) in _nx_crypto_ccm_cbc_pad() argument 153 NX_CRYPTO_MEMCPY(last_cipher, iv, block_size); /* Use case of memcpy is verified. */ in _nx_crypto_ccm_cbc_pad() 154 for (i = 0; i < length; i += block_size) in _nx_crypto_ccm_cbc_pad() 158 if ((length - i) < block_size) in _nx_crypto_ccm_cbc_pad() 163 NX_CRYPTO_MEMSET(output + length - i, 0, block_size - (length - i)); in _nx_crypto_ccm_cbc_pad() 172 crypto_function(crypto_metadata, output, last_cipher, block_size); in _nx_crypto_ccm_cbc_pad() 176 NX_CRYPTO_MEMCPY(output, last_cipher, block_size); /* Use case of memcpy is verified. */ in _nx_crypto_ccm_cbc_pad() 187 USHORT M, UINT block_size) in _nx_crypto_ccm_authentication_init() argument 223 _nx_crypto_ccm_cbc_pad(crypto_metadata, crypto_function, B, X, block_size, X, block_size); in _nx_crypto_ccm_authentication_init() 230 temp_len = (UCHAR)((a_len > (block_size - 2)) ? (block_size - 2) : a_len); in _nx_crypto_ccm_authentication_init() [all …]
|
D | nx_crypto_xcbc_mac.c | 156 UCHAR *iv, UCHAR icv_len, UINT block_size) in _nx_crypto_xcbc_mac() argument 170 if (block_size != NX_CRYPTO_XCBC_MAC_BLOCK_SIZE) in _nx_crypto_xcbc_mac() 179 crypto_function(crypto_metadata, K1, K1, block_size); in _nx_crypto_xcbc_mac() 184 while (input_length_in_byte > block_size) in _nx_crypto_xcbc_mac() 192 crypto_function(crypto_metadata, E, E, block_size); in _nx_crypto_xcbc_mac() 194 input_length_in_byte -= block_size; in _nx_crypto_xcbc_mac() 195 input += block_size; in _nx_crypto_xcbc_mac() 198 if (input_length_in_byte == block_size) in _nx_crypto_xcbc_mac() 215 crypto_function(crypto_metadata, K2, K2, block_size); in _nx_crypto_xcbc_mac() 225 crypto_function(crypto_metadata, E, E, block_size); in _nx_crypto_xcbc_mac()
|
D | nx_crypto_ctr.c | 211 … UCHAR *input, UCHAR *output, UINT length, UINT block_size) in _nx_crypto_ctr_encrypt() argument 218 if (block_size != NX_CRYPTO_CTR_BLOCK_SIZE) in _nx_crypto_ctr_encrypt() 223 for (i = 0; i < length; i += block_size) in _nx_crypto_ctr_encrypt() 225 if (length - i < block_size) in _nx_crypto_ctr_encrypt() 229 crypto_function(crypto_metadata, control_block, aes_output, block_size); in _nx_crypto_ctr_encrypt() 237 crypto_function(crypto_metadata, control_block, aes_output, block_size); in _nx_crypto_ctr_encrypt()
|
D | nx_crypto_hmac.c | 146 if (key_length > hmac_metadata -> block_size) in _nx_crypto_hmac_initialize() 171 NX_CRYPTO_MEMSET(hmac_metadata -> k_ipad, 0, hmac_metadata -> block_size); in _nx_crypto_hmac_initialize() 173 NX_CRYPTO_MEMSET(hmac_metadata -> k_opad, 0, hmac_metadata -> block_size); in _nx_crypto_hmac_initialize() 181 for (i = 0; i < hmac_metadata -> block_size; i++) in _nx_crypto_hmac_initialize() 188 …a -> crypto_update(hmac_metadata -> context, hmac_metadata -> k_ipad, hmac_metadata -> block_size); in _nx_crypto_hmac_initialize() 308 …a -> crypto_update(hmac_metadata -> context, hmac_metadata -> k_opad, hmac_metadata -> block_size); in _nx_crypto_hmac_digest_calculate() 380 … UINT algorithm, UINT block_size, UINT output_length, in _nx_crypto_hmac_metadata_set() argument 388 hmac_metadata -> block_size = block_size; in _nx_crypto_hmac_metadata_set()
|
D | nx_crypto_gcm.c | 460 UCHAR *iv, UINT block_size) in _nx_crypto_gcm_encrypt_init() argument 470 if (block_size != NX_CRYPTO_GCM_BLOCK_SIZE) in _nx_crypto_gcm_encrypt_init() 574 UINT block_size) in _nx_crypto_gcm_encrypt_update() argument 581 if (block_size != NX_CRYPTO_GCM_BLOCK_SIZE) in _nx_crypto_gcm_encrypt_update() 645 UCHAR *output, UINT icv_len, UINT block_size) in _nx_crypto_gcm_encrypt_calculate() argument 655 if (block_size != NX_CRYPTO_GCM_BLOCK_SIZE) in _nx_crypto_gcm_encrypt_calculate() 743 UINT block_size) in _nx_crypto_gcm_decrypt_update() argument 750 if (block_size != NX_CRYPTO_GCM_BLOCK_SIZE) in _nx_crypto_gcm_decrypt_update() 813 UCHAR *input, UINT icv_len, UINT block_size) in _nx_crypto_gcm_decrypt_calculate() argument 824 if (block_size != NX_CRYPTO_GCM_BLOCK_SIZE) in _nx_crypto_gcm_decrypt_calculate()
|
/NetX-Duo-v6.4.1/nx_secure/src/ |
D | nx_secure_tls_record_payload_encrypt.c | 96 UINT block_size; in _nx_secure_tls_record_payload_encrypt() local 145 block_size = session_cipher_method -> nx_crypto_block_size_in_bytes; in _nx_secure_tls_record_payload_encrypt() 152 (block_size <= NX_SECURE_TLS_MAX_CIPHER_BLOCK_SIZE)); in _nx_secure_tls_record_payload_encrypt() 215 if (block_size == 0) in _nx_secure_tls_record_payload_encrypt() 221 remainder_length = (ULONG)((current_length % block_size)); in _nx_secure_tls_record_payload_encrypt() 245 NX_SECURE_MEMSET(_nx_secure_tls_record_block_buffer, 0, block_size); in _nx_secure_tls_record_payload_encrypt() 267 if (copy_length > (ULONG)(block_size - remainder_length)) in _nx_secure_tls_record_payload_encrypt() 269 copy_length = (ULONG)(block_size - remainder_length); in _nx_secure_tls_record_payload_encrypt() 293 NX_SECURE_MEMSET(_nx_secure_tls_record_block_buffer, 0, block_size); in _nx_secure_tls_record_payload_encrypt() 315 NX_SECURE_MEMSET(_nx_secure_tls_record_block_buffer, 0, block_size); in _nx_secure_tls_record_payload_encrypt() [all …]
|
D | nx_secure_tls_record_payload_decrypt.c | 748 UINT block_size; in _nx_secure_tls_record_packet_decrypt() local 759 block_size = session_cipher_method -> nx_crypto_block_size_in_bytes; in _nx_secure_tls_record_packet_decrypt() 760 NX_ASSERT(block_size <= sizeof(_nx_secure_tls_record_block_buffer)); in _nx_secure_tls_record_packet_decrypt() 781 if (encrypted_length < block_size) in _nx_secure_tls_record_packet_decrypt() 786 … _nx_secure_tls_record_block_buffer, block_size, &bytes_copied); in _nx_secure_tls_record_packet_decrypt() 799 if (block_size) in _nx_secure_tls_record_packet_decrypt() 803 remainder_length = length % block_size; in _nx_secure_tls_record_packet_decrypt() 841 if ((decrypted_length < block_size) && (decrypted_length < length)) in _nx_secure_tls_record_packet_decrypt() 846 decrypted_length = block_size; in _nx_secure_tls_record_packet_decrypt() 854 if ((block_size) && (decrypted_length > block_size)) in _nx_secure_tls_record_packet_decrypt() [all …]
|
/NetX-Duo-v6.4.1/common/src/ |
D | nx_ip_max_payload_size_find.c | 119 UINT block_size; in _nx_ip_max_payload_size_find() local 230 block_size = sa -> nx_ipsec_sa_integrity_method -> nx_crypto_block_size_in_bytes; in _nx_ip_max_payload_size_find() 231 payload_length -= block_size; in _nx_ip_max_payload_size_find() 239 block_size = 4; in _nx_ip_max_payload_size_find() 242 … block_size = sa -> nx_ipsec_sa_encryption_method -> nx_crypto_block_size_in_bytes; in _nx_ip_max_payload_size_find() 246 payload_length = payload_length / block_size; in _nx_ip_max_payload_size_find() 247 payload_length = payload_length * block_size; in _nx_ip_max_payload_size_find()
|
/NetX-Duo-v6.4.1/crypto_libraries/inc/ |
D | nx_crypto_gcm.h | 92 UCHAR *iv, UINT block_size); 97 UINT block_size); 101 UCHAR *output, UINT icv_len, UINT block_size); 106 UINT block_size); 110 UCHAR *input, UINT icv_len, UINT block_size);
|
D | nx_crypto_ccm.h | 85 … UINT length, UCHAR *iv, USHORT icv_len, USHORT block_size); 89 … UCHAR *input, UCHAR *output, UINT length, UINT block_size); 93 UCHAR *icv, UINT block_size); 96 UCHAR *icv, UINT block_size);
|
D | nx_crypto_cbc.h | 77 … UCHAR *input, UCHAR *output, UINT length, UCHAR block_size); 81 … UCHAR *input, UCHAR *output, UINT length, UCHAR block_size);
|
D | nx_crypto_hmac.h | 74 UINT block_size; member 96 UINT algorithm, UINT block_size, UINT output_length,
|
D | nx_crypto_xcbc_mac.h | 70 UCHAR *iv, UCHAR icv_len, UINT block_size);
|
D | nx_crypto_ctr.h | 76 … UCHAR *input, UCHAR *output, UINT length, UINT block_size);
|
/NetX-Duo-v6.4.1/addons/ftp/ |
D | nxd_ftp_server.c | 1640 ULONG block_size; in _nx_ftp_server_command_process() local 2971 … _nx_ftp_server_block_size_get(ftp_server_ptr, ftp_command, filename, &block_size); in _nx_ftp_server_command_process() 2974 if (block_size) in _nx_ftp_server_command_process() 2975 …ver_block_header_send(ftp_server_ptr -> nx_ftp_server_packet_pool_ptr, client_req_ptr, block_size); in _nx_ftp_server_command_process() 3389 … _nx_ftp_server_block_size_get(ftp_server_ptr, ftp_command, filename, &block_size); in _nx_ftp_server_command_process() 3392 if (block_size) in _nx_ftp_server_command_process() 3393 …ver_block_header_send(ftp_server_ptr -> nx_ftp_server_packet_pool_ptr, client_req_ptr, block_size); in _nx_ftp_server_command_process() 6403 …_block_size_get(NX_FTP_SERVER *ftp_server_ptr, UINT ftp_command, CHAR *filename, ULONG *block_size) in _nx_ftp_server_block_size_get() argument 6416 *block_size = 0; in _nx_ftp_server_block_size_get() 6452 (*block_size) += (length + 2); in _nx_ftp_server_block_size_get() [all …]
|
D | nxd_ftp_server.h | 436 …block_size_get(NX_FTP_SERVER *ftp_server_ptr, UINT ftp_command, CHAR *filename, ULONG *block_size); 437 …header_send(NX_PACKET_POOL *pool_ptr, NX_FTP_CLIENT_REQUEST *client_request_ptr, ULONG block_size);
|
D | nxd_ftp_client.c | 5939 UINT _nx_ftp_client_block_header_send(NX_FTP_CLIENT *ftp_client_ptr, ULONG block_size) in _nx_ftp_client_block_header_send() argument 5964 if (block_size) in _nx_ftp_client_block_header_send() 5971 buffer_ptr[1] = (UCHAR)(block_size >> 8); in _nx_ftp_client_block_header_send() 5972 buffer_ptr[2] = (UCHAR)(block_size); in _nx_ftp_client_block_header_send()
|
D | nxd_ftp_client.h | 365 UINT _nx_ftp_client_block_header_send(NX_FTP_CLIENT *ftp_client_ptr, ULONG block_size);
|