Home
last modified time | relevance | path

Searched refs:block_size (Results 1 – 19 of 19) sorted by relevance

/NetX-Duo-v6.2.1/crypto_libraries/src/
Dnx_crypto_cbc.c66 …P static VOID _nx_crypto_cbc_xor(UCHAR *plaintext, UCHAR *key, UCHAR *ciphertext, UCHAR block_size) in _nx_crypto_cbc_xor() argument
70 for (i = 0; i < block_size; i++) in _nx_crypto_cbc_xor()
130 … UCHAR *input, UCHAR *output, UINT length, UCHAR block_size) in _nx_crypto_cbc_encrypt() argument
135 if (block_size == 0) in _nx_crypto_cbc_encrypt()
141 if (length % block_size) in _nx_crypto_cbc_encrypt()
147 if (block_size > sizeof(cbc_metadata -> nx_crypto_cbc_last_block)) in _nx_crypto_cbc_encrypt()
155 for (i = 0; i < length; i += block_size) in _nx_crypto_cbc_encrypt()
159 _nx_crypto_cbc_xor(&input[i], last_cipher, output, block_size); in _nx_crypto_cbc_encrypt()
162 crypto_function(crypto_metadata, output, output, block_size); in _nx_crypto_cbc_encrypt()
167 output += block_size; in _nx_crypto_cbc_encrypt()
[all …]
Dnx_crypto_ccm.c149 … UCHAR *input, UCHAR *output, UINT length, UCHAR *iv, UINT block_size) in _nx_crypto_ccm_cbc_pad() argument
154 NX_CRYPTO_MEMCPY(last_cipher, iv, block_size); /* Use case of memcpy is verified. */ in _nx_crypto_ccm_cbc_pad()
155 for (i = 0; i < length; i += block_size) in _nx_crypto_ccm_cbc_pad()
159 if ((length - i) < block_size) in _nx_crypto_ccm_cbc_pad()
164 NX_CRYPTO_MEMSET(output + length - i, 0, block_size - (length - i)); in _nx_crypto_ccm_cbc_pad()
173 crypto_function(crypto_metadata, output, last_cipher, block_size); in _nx_crypto_ccm_cbc_pad()
177 NX_CRYPTO_MEMCPY(output, last_cipher, block_size); /* Use case of memcpy is verified. */ in _nx_crypto_ccm_cbc_pad()
188 USHORT M, UINT block_size) in _nx_crypto_ccm_authentication_init() argument
224 _nx_crypto_ccm_cbc_pad(crypto_metadata, crypto_function, B, X, block_size, X, block_size); in _nx_crypto_ccm_authentication_init()
231 temp_len = (UCHAR)((a_len > (block_size - 2)) ? (block_size - 2) : a_len); in _nx_crypto_ccm_authentication_init()
[all …]
Dnx_crypto_xcbc_mac.c157 UCHAR *iv, UCHAR icv_len, UINT block_size) in _nx_crypto_xcbc_mac() argument
171 if (block_size != NX_CRYPTO_XCBC_MAC_BLOCK_SIZE) in _nx_crypto_xcbc_mac()
180 crypto_function(crypto_metadata, K1, K1, block_size); in _nx_crypto_xcbc_mac()
185 while (input_length_in_byte > block_size) in _nx_crypto_xcbc_mac()
193 crypto_function(crypto_metadata, E, E, block_size); in _nx_crypto_xcbc_mac()
195 input_length_in_byte -= block_size; in _nx_crypto_xcbc_mac()
196 input += block_size; in _nx_crypto_xcbc_mac()
199 if (input_length_in_byte == block_size) in _nx_crypto_xcbc_mac()
216 crypto_function(crypto_metadata, K2, K2, block_size); in _nx_crypto_xcbc_mac()
226 crypto_function(crypto_metadata, E, E, block_size); in _nx_crypto_xcbc_mac()
Dnx_crypto_ctr.c212 … UCHAR *input, UCHAR *output, UINT length, UINT block_size) in _nx_crypto_ctr_encrypt() argument
219 if (block_size != NX_CRYPTO_CTR_BLOCK_SIZE) in _nx_crypto_ctr_encrypt()
224 for (i = 0; i < length; i += block_size) in _nx_crypto_ctr_encrypt()
226 if (length - i < block_size) in _nx_crypto_ctr_encrypt()
230 crypto_function(crypto_metadata, control_block, aes_output, block_size); in _nx_crypto_ctr_encrypt()
238 crypto_function(crypto_metadata, control_block, aes_output, block_size); in _nx_crypto_ctr_encrypt()
Dnx_crypto_hmac.c147 if (key_length > hmac_metadata -> block_size) in _nx_crypto_hmac_initialize()
172 NX_CRYPTO_MEMSET(hmac_metadata -> k_ipad, 0, hmac_metadata -> block_size); in _nx_crypto_hmac_initialize()
174 NX_CRYPTO_MEMSET(hmac_metadata -> k_opad, 0, hmac_metadata -> block_size); in _nx_crypto_hmac_initialize()
182 for (i = 0; i < hmac_metadata -> block_size; i++) in _nx_crypto_hmac_initialize()
189 …a -> crypto_update(hmac_metadata -> context, hmac_metadata -> k_ipad, hmac_metadata -> block_size); in _nx_crypto_hmac_initialize()
309 …a -> crypto_update(hmac_metadata -> context, hmac_metadata -> k_opad, hmac_metadata -> block_size); in _nx_crypto_hmac_digest_calculate()
381 … UINT algorithm, UINT block_size, UINT output_length, in _nx_crypto_hmac_metadata_set() argument
389 hmac_metadata -> block_size = block_size; in _nx_crypto_hmac_metadata_set()
Dnx_crypto_gcm.c461 UCHAR *iv, UINT block_size) in _nx_crypto_gcm_encrypt_init() argument
471 if (block_size != NX_CRYPTO_GCM_BLOCK_SIZE) in _nx_crypto_gcm_encrypt_init()
575 UINT block_size) in _nx_crypto_gcm_encrypt_update() argument
582 if (block_size != NX_CRYPTO_GCM_BLOCK_SIZE) in _nx_crypto_gcm_encrypt_update()
646 UCHAR *output, UINT icv_len, UINT block_size) in _nx_crypto_gcm_encrypt_calculate() argument
656 if (block_size != NX_CRYPTO_GCM_BLOCK_SIZE) in _nx_crypto_gcm_encrypt_calculate()
744 UINT block_size) in _nx_crypto_gcm_decrypt_update() argument
751 if (block_size != NX_CRYPTO_GCM_BLOCK_SIZE) in _nx_crypto_gcm_decrypt_update()
814 UCHAR *input, UINT icv_len, UINT block_size) in _nx_crypto_gcm_decrypt_calculate() argument
825 if (block_size != NX_CRYPTO_GCM_BLOCK_SIZE) in _nx_crypto_gcm_decrypt_calculate()
/NetX-Duo-v6.2.1/nx_secure/src/
Dnx_secure_tls_record_payload_encrypt.c97 UINT block_size; in _nx_secure_tls_record_payload_encrypt() local
146 block_size = session_cipher_method -> nx_crypto_block_size_in_bytes; in _nx_secure_tls_record_payload_encrypt()
153 (block_size <= NX_SECURE_TLS_MAX_CIPHER_BLOCK_SIZE)); in _nx_secure_tls_record_payload_encrypt()
216 if (block_size == 0) in _nx_secure_tls_record_payload_encrypt()
222 remainder_length = (ULONG)((current_length % block_size)); in _nx_secure_tls_record_payload_encrypt()
246 NX_SECURE_MEMSET(_nx_secure_tls_record_block_buffer, 0, block_size); in _nx_secure_tls_record_payload_encrypt()
268 if (copy_length > (ULONG)(block_size - remainder_length)) in _nx_secure_tls_record_payload_encrypt()
270 copy_length = (ULONG)(block_size - remainder_length); in _nx_secure_tls_record_payload_encrypt()
294 NX_SECURE_MEMSET(_nx_secure_tls_record_block_buffer, 0, block_size); in _nx_secure_tls_record_payload_encrypt()
316 NX_SECURE_MEMSET(_nx_secure_tls_record_block_buffer, 0, block_size); in _nx_secure_tls_record_payload_encrypt()
[all …]
Dnx_secure_tls_record_payload_decrypt.c749 UINT block_size; in _nx_secure_tls_record_packet_decrypt() local
760 block_size = session_cipher_method -> nx_crypto_block_size_in_bytes; in _nx_secure_tls_record_packet_decrypt()
761 NX_ASSERT(block_size <= sizeof(_nx_secure_tls_record_block_buffer)); in _nx_secure_tls_record_packet_decrypt()
782 if (encrypted_length < block_size) in _nx_secure_tls_record_packet_decrypt()
787 … _nx_secure_tls_record_block_buffer, block_size, &bytes_copied); in _nx_secure_tls_record_packet_decrypt()
800 if (block_size) in _nx_secure_tls_record_packet_decrypt()
804 remainder_length = length % block_size; in _nx_secure_tls_record_packet_decrypt()
842 if ((decrypted_length < block_size) && (decrypted_length < length)) in _nx_secure_tls_record_packet_decrypt()
847 decrypted_length = block_size; in _nx_secure_tls_record_packet_decrypt()
855 if ((block_size) && (decrypted_length > block_size)) in _nx_secure_tls_record_packet_decrypt()
[all …]
/NetX-Duo-v6.2.1/crypto_libraries/inc/
Dnx_crypto_gcm.h93 UCHAR *iv, UINT block_size);
98 UINT block_size);
102 UCHAR *output, UINT icv_len, UINT block_size);
107 UINT block_size);
111 UCHAR *input, UINT icv_len, UINT block_size);
Dnx_crypto_ccm.h86 … UINT length, UCHAR *iv, USHORT icv_len, USHORT block_size);
90 … UCHAR *input, UCHAR *output, UINT length, UINT block_size);
94 UCHAR *icv, UINT block_size);
97 UCHAR *icv, UINT block_size);
Dnx_crypto_cbc.h78 … UCHAR *input, UCHAR *output, UINT length, UCHAR block_size);
82 … UCHAR *input, UCHAR *output, UINT length, UCHAR block_size);
Dnx_crypto_hmac.h75 UINT block_size; member
97 UINT algorithm, UINT block_size, UINT output_length,
Dnx_crypto_xcbc_mac.h71 UCHAR *iv, UCHAR icv_len, UINT block_size);
Dnx_crypto_ctr.h77 … UCHAR *input, UCHAR *output, UINT length, UINT block_size);
/NetX-Duo-v6.2.1/common/src/
Dnx_ip_max_payload_size_find.c120 UINT block_size; in _nx_ip_max_payload_size_find() local
231 block_size = sa -> nx_ipsec_sa_integrity_method -> nx_crypto_block_size_in_bytes; in _nx_ip_max_payload_size_find()
232 payload_length -= block_size; in _nx_ip_max_payload_size_find()
240 block_size = 4; in _nx_ip_max_payload_size_find()
243block_size = sa -> nx_ipsec_sa_encryption_method -> nx_crypto_block_size_in_bytes; in _nx_ip_max_payload_size_find()
247 payload_length = payload_length / block_size; in _nx_ip_max_payload_size_find()
248 payload_length = payload_length * block_size; in _nx_ip_max_payload_size_find()
/NetX-Duo-v6.2.1/addons/ftp/
Dnxd_ftp_server.c1633 ULONG block_size; in _nx_ftp_server_command_process() local
2939 … _nx_ftp_server_block_size_get(ftp_server_ptr, ftp_command, filename, &block_size); in _nx_ftp_server_command_process()
2942 if (block_size) in _nx_ftp_server_command_process()
2943 …ver_block_header_send(ftp_server_ptr -> nx_ftp_server_packet_pool_ptr, client_req_ptr, block_size); in _nx_ftp_server_command_process()
3344 … _nx_ftp_server_block_size_get(ftp_server_ptr, ftp_command, filename, &block_size); in _nx_ftp_server_command_process()
3347 if (block_size) in _nx_ftp_server_command_process()
3348 …ver_block_header_send(ftp_server_ptr -> nx_ftp_server_packet_pool_ptr, client_req_ptr, block_size); in _nx_ftp_server_command_process()
6340 …_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
6353 *block_size = 0; in _nx_ftp_server_block_size_get()
6389 (*block_size) += (length + 2); in _nx_ftp_server_block_size_get()
[all …]
Dnxd_ftp_server.h437 …block_size_get(NX_FTP_SERVER *ftp_server_ptr, UINT ftp_command, CHAR *filename, ULONG *block_size);
438 …header_send(NX_PACKET_POOL *pool_ptr, NX_FTP_CLIENT_REQUEST *client_request_ptr, ULONG block_size);
Dnxd_ftp_client.h366 UINT _nx_ftp_client_block_header_send(NX_FTP_CLIENT *ftp_client_ptr, ULONG block_size);
Dnxd_ftp_client.c5936 UINT _nx_ftp_client_block_header_send(NX_FTP_CLIENT *ftp_client_ptr, ULONG block_size) in _nx_ftp_client_block_header_send() argument
5961 if (block_size) in _nx_ftp_client_block_header_send()
5968 buffer_ptr[1] = (UCHAR)(block_size >> 8); in _nx_ftp_client_block_header_send()
5969 buffer_ptr[2] = (UCHAR)(block_size); in _nx_ftp_client_block_header_send()