/NetX-Duo-v6.4.1/test/regression/nx_secure_test/ |
D | nx_secure_sha256_rfc_test.c | 69 UCHAR output[32]; in TEST() local 72 memset(output, 0xFF, sizeof(output)); in TEST() 82 output, in TEST() 83 sizeof(output), in TEST() 88 EXPECT_EQ(0, memcmp(output, expected, 32)); in TEST() 90 memset(output, 0xFF, sizeof(output)); in TEST() 128 output, in TEST() 129 sizeof(output), in TEST() 134 EXPECT_EQ(0, memcmp(output, expected, 32)); in TEST() 148 UCHAR output[32]; in TEST() local [all …]
|
D | nx_secure_des_test.c | 67 UCHAR output[TEST_TEXT_LENGTH]; in thread_0_entry() local 76 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 100 (UCHAR *)output, in thread_0_entry() 101 sizeof(output), in thread_0_entry() 112 (UCHAR *)output, in thread_0_entry() 113 sizeof(output), in thread_0_entry() 115 (UCHAR *)output, in thread_0_entry() 116 sizeof(output), in thread_0_entry() 121 EXPECT_EQ(0, memcmp(output, input, sizeof(input))); in thread_0_entry() 137 memset(output, 0xFF, sizeof(output)); in thread_0_entry() [all …]
|
D | nx_secure_3des_test.c | 65 UCHAR output[TEST_TEXT_LENGTH]; in thread_0_entry() local 77 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 101 (UCHAR *)output, in thread_0_entry() 102 sizeof(output), in thread_0_entry() 113 (UCHAR *)output, in thread_0_entry() 114 sizeof(output), in thread_0_entry() 116 (UCHAR *)output, in thread_0_entry() 117 sizeof(output), in thread_0_entry() 122 EXPECT_EQ(0, memcmp(output, input, sizeof(input))); in thread_0_entry() 137 memset(output, 0xFF, sizeof(output)); in thread_0_entry() [all …]
|
D | nx_secure_aes_ccm_test.c | 43 static ULONG output[(TEST_ADDITIONAL_DATA_LENGTH + TEST_DATA_LENGTH + TEST_MAXIMUM_TAG_LENGTH) >> 2… variable 84 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 116 memcpy(output, aes_ccm_data[i].plain, additional_len); in thread_0_entry() 127 (UCHAR *)output, in thread_0_entry() 128 sizeof(output), in thread_0_entry() 141 (UCHAR *)output + additional_len, in thread_0_entry() 142 sizeof(output) - additional_len, in thread_0_entry() 147 EXPECT_EQ(0, memcmp(output, aes_ccm_data[i].secret, aes_ccm_data[i].secret_len)); in thread_0_entry() 154 memcpy(output, aes_ccm_data[i].secret, additional_len); in thread_0_entry() 165 (UCHAR *)output, in thread_0_entry() [all …]
|
D | nx_secure_aes_test.c | 44 static ULONG output[TEST_TEXT_LENGTH >> 2]; variable 86 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 120 (UCHAR *)output, in thread_0_entry() 121 sizeof(output), in thread_0_entry() 126 EXPECT_EQ(0, memcmp(output, aes_data[i].secret, aes_data[i].secret_len)); in thread_0_entry() 137 (UCHAR *)output, in thread_0_entry() 138 sizeof(output), in thread_0_entry() 143 EXPECT_EQ(0, memcmp(output, aes_data[i].plain, aes_data[i].plain_len)); in thread_0_entry() 203 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 229 (UCHAR *)output, in thread_0_entry() [all …]
|
D | nx_secure_hmac_md5_test.c | 29 static ULONG output[4]; variable 64 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 74 (UCHAR *)output, in thread_0_entry() 75 sizeof(output), in thread_0_entry() 80 EXPECT_EQ(0, memcmp(output, hmac_md5_data[i].secret, sizeof(output))); in thread_0_entry() 82 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 121 (UCHAR *)output, in thread_0_entry() 122 sizeof(output), in thread_0_entry() 127 EXPECT_EQ(0, memcmp(output, hmac_md5_data[i].secret, sizeof(output))); in thread_0_entry()
|
D | nx_secure_hmac_sha224_test.c | 29 static ULONG output[7]; variable 64 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 74 (UCHAR *)output, in thread_0_entry() 75 sizeof(output), in thread_0_entry() 80 EXPECT_EQ(0, memcmp(output, hmac_sha224_data[i].secret, sizeof(output))); in thread_0_entry() 82 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 121 (UCHAR *)output, in thread_0_entry() 122 sizeof(output), in thread_0_entry() 127 EXPECT_EQ(0, memcmp(output, hmac_sha224_data[i].secret, sizeof(output))); in thread_0_entry()
|
D | nx_secure_rsa_test.c | 33 static ULONG output[MAXIMUM_KEY_BITS >> 5]; variable 68 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 84 (UCHAR *)output, in thread_0_entry() 85 sizeof(output), in thread_0_entry() 90 EXPECT_EQ(0, memcmp(output, rsa_data[i].secret, rsa_data[i].secret_len)); in thread_0_entry() 93 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 109 (UCHAR *)output, in thread_0_entry() 110 sizeof(output), in thread_0_entry() 115 EXPECT_EQ(0, memcmp(output, rsa_data[i].plain, rsa_data[i].plain_len)); in thread_0_entry() 118 memset(output, 0xFF, sizeof(output)); in thread_0_entry() [all …]
|
D | nx_secure_3des_error_checking_test.c | 56 …in_bits, UCHAR *input, ULONG input_length_in_byte, UCHAR *iv_ptr, UCHAR *output, ULONG output_leng… in test_nx_crypto_operation_failed() argument 62 …ler, method, key, key_size_in_bits, input, input_length_in_byte, iv_ptr, output, output_length_in_… in test_nx_crypto_operation_failed() 65 …in_bits, UCHAR *input, ULONG input_length_in_byte, UCHAR *iv_ptr, UCHAR *output, ULONG output_leng… in test_nx_crypto_operation_succeed() argument 71 …ler, method, key, key_size_in_bits, input, input_length_in_byte, iv_ptr, output, output_length_in_… in test_nx_crypto_operation_succeed() 99 UCHAR output[24]; in thread_0_entry() local 112 (UCHAR *)output, in thread_0_entry() 113 sizeof(output), in thread_0_entry() 115 (UCHAR *)output, in thread_0_entry() 116 sizeof(output), in thread_0_entry() 128 (UCHAR *)output, in thread_0_entry() [all …]
|
D | nx_secure_sha256_test.c | 19 static ULONG output[8]; variable 54 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 64 (UCHAR *)output, in thread_0_entry() 65 sizeof(output), in thread_0_entry() 70 EXPECT_EQ(0, memcmp(output, sha256_data[i].secret, sizeof(output))); in thread_0_entry()
|
D | nx_secure_sha384_test.c | 18 static ULONG output[12]; variable 53 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 63 (UCHAR *)output, in thread_0_entry() 64 sizeof(output), in thread_0_entry() 69 EXPECT_EQ(0, memcmp(output, sha384_data[i].secret, sizeof(output))); in thread_0_entry()
|
D | nx_secure_sha512_test.c | 17 static ULONG output[16]; variable 52 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 62 (UCHAR *)output, in thread_0_entry() 63 sizeof(output), in thread_0_entry() 68 EXPECT_EQ(0, memcmp(output, sha512_data[i].secret, sizeof(output))); in thread_0_entry()
|
D | nx_secure_sha224_test.c | 18 static ULONG output[7]; variable 53 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 63 (UCHAR *)output, in thread_0_entry() 64 sizeof(output), in thread_0_entry() 69 EXPECT_EQ(0, memcmp(output, sha224_data[i].secret, sizeof(output))); in thread_0_entry()
|
D | nx_secure_hmac_sha384_test.c | 29 static ULONG output[12]; variable 64 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 74 (UCHAR *)output, in thread_0_entry() 75 sizeof(output), in thread_0_entry() 80 EXPECT_EQ(0, memcmp(output, hmac_sha384_data[i].secret, sizeof(output))); in thread_0_entry()
|
D | nx_secure_hmac_sha512_test.c | 29 static ULONG output[16]; variable 64 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 74 (UCHAR *)output, in thread_0_entry() 75 sizeof(output), in thread_0_entry() 80 EXPECT_EQ(0, memcmp(output, hmac_sha512_data[i].secret, sizeof(output))); in thread_0_entry() 82 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 121 (UCHAR *)output, in thread_0_entry() 122 sizeof(output), in thread_0_entry() 127 EXPECT_EQ(0, memcmp(output, hmac_sha512_data[i].secret, sizeof(output))); in thread_0_entry() 172 (UCHAR *)output, in thread_0_entry() [all …]
|
D | nx_secure_des_error_checking_test.c | 51 …in_bits, UCHAR *input, ULONG input_length_in_byte, UCHAR *iv_ptr, UCHAR *output, ULONG output_leng… in test_nx_crypto_operation_failed() argument 57 …ler, method, key, key_size_in_bits, input, input_length_in_byte, iv_ptr, output, output_length_in_… in test_nx_crypto_operation_failed() 60 …in_bits, UCHAR *input, ULONG input_length_in_byte, UCHAR *iv_ptr, UCHAR *output, ULONG output_leng… in test_nx_crypto_operation_succeed() argument 66 …ler, method, key, key_size_in_bits, input, input_length_in_byte, iv_ptr, output, output_length_in_… in test_nx_crypto_operation_succeed() 89 UCHAR output[8]; in thread_0_entry() local 137 (UCHAR *)output, sizeof(output), /* output */ in thread_0_entry() 148 (UCHAR *)output, sizeof(output), /* output */ in thread_0_entry() 159 (UCHAR *)output, sizeof(output), /* output */ in thread_0_entry() 170 (UCHAR *)output, sizeof(output), /* output */ in thread_0_entry() 181 (UCHAR *)output, sizeof(output), /* output */ in thread_0_entry() [all …]
|
D | nx_secure_hmac_sha256_test.c | 29 static ULONG output[8]; variable 65 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 75 (UCHAR *)output, in thread_0_entry() 76 sizeof(output), in thread_0_entry() 81 EXPECT_EQ(0, memcmp(output, hmac_sha256_data[i].secret, sizeof(output))); in thread_0_entry() 83 memset(output, 0xFF, sizeof(output)); in thread_0_entry() 122 (UCHAR *)output, in thread_0_entry() 123 sizeof(output), in thread_0_entry() 128 EXPECT_EQ(0, memcmp(output, hmac_sha256_data[i].secret, sizeof(output))); in thread_0_entry()
|
/NetX-Duo-v6.4.1/crypto_libraries/src/ |
D | nx_crypto_cbc.c | 129 … UCHAR *input, UCHAR *output, UINT length, UCHAR block_size) in _nx_crypto_cbc_encrypt() argument 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() 164 last_cipher = output; in _nx_crypto_cbc_encrypt() 166 output += block_size; in _nx_crypto_cbc_encrypt() 230 … UCHAR *input, UCHAR *output, UINT length, UCHAR block_size) in _nx_crypto_cbc_decrypt() argument 262 crypto_function(crypto_metadata, &input[i], &output[i], block_size); in _nx_crypto_cbc_decrypt() 265 _nx_crypto_cbc_xor(&output[i], last_cipher, &output[i], block_size); in _nx_crypto_cbc_decrypt()
|
D | nx_crypto_method_self_test_hmac_md5.c | 52 static ULONG output[4]; variable 145 NX_CRYPTO_MEMSET(output, 0xFF, sizeof(output)); in _nx_crypto_method_self_test_hmac_md5() 156 (UCHAR *)output, in _nx_crypto_method_self_test_hmac_md5() 169 if(NX_CRYPTO_MEMCMP(output, secret_1, output_length) != 0) in _nx_crypto_method_self_test_hmac_md5() 175 NX_CRYPTO_MEMSET(output, 0xFF, sizeof(output)); in _nx_crypto_method_self_test_hmac_md5() 226 (UCHAR *)output, in _nx_crypto_method_self_test_hmac_md5() 239 if(NX_CRYPTO_MEMCMP(output, secret_1, output_length) != 0) in _nx_crypto_method_self_test_hmac_md5()
|
D | nx_crypto_method_self_test_rsa.c | 554 static UCHAR output[512]; variable 625 NX_CRYPTO_MEMSET(output, 0xFF, sizeof(output)); in _nx_crypto_method_self_test_rsa() 645 output, in _nx_crypto_method_self_test_rsa() 656 if (NX_CRYPTO_MEMCMP(output, secret[i], output_size[i]) != 0) in _nx_crypto_method_self_test_rsa() 672 NX_CRYPTO_MEMSET(output, 0xFF, sizeof(output)); in _nx_crypto_method_self_test_rsa() 692 output, in _nx_crypto_method_self_test_rsa() 703 if (NX_CRYPTO_MEMCMP(output, plain[i], output_size[i]) != 0) in _nx_crypto_method_self_test_rsa() 719 NX_CRYPTO_MEMSET(output, 0xFF, sizeof(output)); in _nx_crypto_method_self_test_rsa() 776 output, in _nx_crypto_method_self_test_rsa() 787 if (NX_CRYPTO_MEMCMP(output, plain[i], output_size[i]) != 0) in _nx_crypto_method_self_test_rsa()
|
D | nx_crypto_gcm.c | 201 NX_CRYPTO_KEEP static VOID _nx_crypto_gcm_multi(UCHAR *x, UCHAR *y, UCHAR *output) in _nx_crypto_gcm_multi() argument 209 NX_CRYPTO_MEMSET(output, 0, NX_CRYPTO_GCM_BLOCK_SIZE); in _nx_crypto_gcm_multi() 219 _nx_crypto_gcm_xor(output, v, output); in _nx_crypto_gcm_multi() 293 …tatic VOID _nx_crypto_gcm_ghash_update(UCHAR *hkey, UCHAR *input, UINT input_length, UCHAR *output) in _nx_crypto_gcm_ghash_update() argument 303 _nx_crypto_gcm_xor(output, input, tmp_block); in _nx_crypto_gcm_ghash_update() 304 _nx_crypto_gcm_multi(tmp_block, hkey, output); in _nx_crypto_gcm_ghash_update() 316 _nx_crypto_gcm_xor(output, tmp_block, tmp_block); in _nx_crypto_gcm_ghash_update() 317 _nx_crypto_gcm_multi(tmp_block, hkey, output); in _nx_crypto_gcm_ghash_update() 370 … UCHAR *input, UCHAR *output, UINT length, UCHAR *counter_block) in _nx_crypto_gcm_gctr() argument 384 _nx_crypto_gcm_xor(input, aes_output, output); in _nx_crypto_gcm_gctr() [all …]
|
D | nx_crypto_aes.c | 1050 NX_CRYPTO_KEEP UINT _nx_crypto_aes_encrypt(NX_CRYPTO_AES *aes_ptr, UCHAR *input, UCHAR *output, UIN… in _nx_crypto_aes_encrypt() argument 1106 output[0] = aes_state[0]; in _nx_crypto_aes_encrypt() 1107 output[1] = aes_state[1]; in _nx_crypto_aes_encrypt() 1108 output[2] = aes_state[2]; in _nx_crypto_aes_encrypt() 1109 output[3] = aes_state[3]; in _nx_crypto_aes_encrypt() 1110 output[4] = aes_state[4]; in _nx_crypto_aes_encrypt() 1111 output[5] = aes_state[5]; in _nx_crypto_aes_encrypt() 1112 output[6] = aes_state[6]; in _nx_crypto_aes_encrypt() 1113 output[7] = aes_state[7]; in _nx_crypto_aes_encrypt() 1114 output[8] = aes_state[8]; in _nx_crypto_aes_encrypt() [all …]
|
/NetX-Duo-v6.4.1/nx_secure/src/ |
D | nx_secure_crypto_method_self_test_hmac_md5.c | 52 static ULONG output[4]; variable 141 NX_SECURE_MEMSET(output, 0xFF, sizeof(output)); in _nx_secure_crypto_method_self_test_hmac_md5() 152 (UCHAR *)output, in _nx_secure_crypto_method_self_test_hmac_md5() 165 if(NX_SECURE_MEMCMP(output, secret_1, output_length) != 0) in _nx_secure_crypto_method_self_test_hmac_md5() 171 NX_SECURE_MEMSET(output, 0xFF, sizeof(output)); in _nx_secure_crypto_method_self_test_hmac_md5() 222 (UCHAR *)output, in _nx_secure_crypto_method_self_test_hmac_md5() 235 if(NX_SECURE_MEMCMP(output, secret_1, output_length) != 0) in _nx_secure_crypto_method_self_test_hmac_md5()
|
D | nx_secure_crypto_method_self_test_rsa.c | 407 static UCHAR output[512]; variable 474 NX_SECURE_MEMSET(output, 0xFF, sizeof(output)); in _nx_secure_crypto_method_self_test_rsa() 494 output, in _nx_secure_crypto_method_self_test_rsa() 505 if (NX_SECURE_MEMCMP(output, secret[i], output_size[i]) != 0) in _nx_secure_crypto_method_self_test_rsa() 521 NX_SECURE_MEMSET(output, 0xFF, sizeof(output)); in _nx_secure_crypto_method_self_test_rsa() 541 output, in _nx_secure_crypto_method_self_test_rsa() 552 if (NX_SECURE_MEMCMP(output, plain[i], output_size[i]) != 0) in _nx_secure_crypto_method_self_test_rsa() 568 NX_SECURE_MEMSET(output, 0xFF, sizeof(output)); in _nx_secure_crypto_method_self_test_rsa() 625 output, in _nx_secure_crypto_method_self_test_rsa() 636 if (NX_SECURE_MEMCMP(output, plain[i], output_size[i]) != 0) in _nx_secure_crypto_method_self_test_rsa()
|
D | nx_secure_crypto_method_self_test_hmac_sha.c | 134 static ULONG output[16]; variable 262 NX_SECURE_MEMSET(output, 0xFF, sizeof(output)); in _nx_secure_crypto_method_self_test_hmac_sha() 273 (UCHAR *)output, in _nx_secure_crypto_method_self_test_hmac_sha() 286 if(NX_SECURE_MEMCMP(output, secret, output_length) != 0) in _nx_secure_crypto_method_self_test_hmac_sha() 292 NX_SECURE_MEMSET(output, 0xFF, sizeof(output)); in _nx_secure_crypto_method_self_test_hmac_sha() 343 (UCHAR *)output, in _nx_secure_crypto_method_self_test_hmac_sha() 356 if(NX_SECURE_MEMCMP(output, secret, output_length) != 0) in _nx_secure_crypto_method_self_test_hmac_sha()
|