Lines Matching refs:tdata
2203 const struct wireless_test_data *tdata) in create_wireless_cipher_auth_session() argument
2205 const uint8_t key_len = tdata->key.len; in create_wireless_cipher_auth_session()
2211 const uint8_t *key = tdata->key.data; in create_wireless_cipher_auth_session()
2212 const uint8_t auth_len = tdata->digest.len; in create_wireless_cipher_auth_session()
2213 uint8_t cipher_iv_len = tdata->cipher_iv.len; in create_wireless_cipher_auth_session()
2214 uint8_t auth_iv_len = tdata->auth_iv.len; in create_wireless_cipher_auth_session()
2263 const struct wireless_test_data *tdata) in create_zuc_cipher_auth_encrypt_generate_session() argument
2268 RTE_CRYPTO_CIPHER_ZUC_EEA3, tdata); in create_zuc_cipher_auth_encrypt_generate_session()
2391 create_wireless_cipher_hash_operation(const struct wireless_test_data *tdata, in create_wireless_cipher_hash_operation() argument
2397 const uint8_t *auth_tag = tdata->digest.data; in create_wireless_cipher_hash_operation()
2398 const unsigned int auth_tag_len = tdata->digest.len; in create_wireless_cipher_hash_operation()
2399 unsigned int plaintext_len = ceil_byte_length(tdata->plaintext.len); in create_wireless_cipher_hash_operation()
2402 const uint8_t *cipher_iv = tdata->cipher_iv.data; in create_wireless_cipher_hash_operation()
2403 const uint8_t cipher_iv_len = tdata->cipher_iv.len; in create_wireless_cipher_hash_operation()
2404 const uint8_t *auth_iv = tdata->auth_iv.data; in create_wireless_cipher_hash_operation()
2405 const uint8_t auth_iv_len = tdata->auth_iv.len; in create_wireless_cipher_hash_operation()
2406 const unsigned int cipher_len = tdata->validCipherLenInBits.len; in create_wireless_cipher_hash_operation()
2407 const unsigned int auth_len = tdata->validAuthLenInBits.len; in create_wireless_cipher_hash_operation()
2457 const struct wireless_test_data *tdata) in create_zuc_cipher_hash_generate_operation() argument
2459 return create_wireless_cipher_hash_operation(tdata, in create_zuc_cipher_hash_generate_operation()
2657 test_snow3g_authentication(const struct snow3g_hash_test_data *tdata) in test_snow3g_authentication() argument
2672 ((tdata->validAuthLenInBits.len % 8) != 0)) { in test_snow3g_authentication()
2696 tdata->key.data, tdata->key.len, in test_snow3g_authentication()
2697 tdata->auth_iv.len, tdata->digest.len, in test_snow3g_authentication()
2709 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_snow3g_authentication()
2715 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_snow3g_authentication()
2718 retval = create_wireless_algo_hash_operation(NULL, tdata->digest.len, in test_snow3g_authentication()
2719 tdata->auth_iv.data, tdata->auth_iv.len, in test_snow3g_authentication()
2721 tdata->validAuthLenInBits.len, in test_snow3g_authentication()
2740 tdata->digest.data, in test_snow3g_authentication()
2748 test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata) in test_snow3g_authentication_verify() argument
2763 ((tdata->validAuthLenInBits.len % 8) != 0)) { in test_snow3g_authentication_verify()
2787 tdata->key.data, tdata->key.len, in test_snow3g_authentication_verify()
2788 tdata->auth_iv.len, tdata->digest.len, in test_snow3g_authentication_verify()
2799 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_snow3g_authentication_verify()
2805 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_snow3g_authentication_verify()
2808 retval = create_wireless_algo_hash_operation(tdata->digest.data, in test_snow3g_authentication_verify()
2809 tdata->digest.len, in test_snow3g_authentication_verify()
2810 tdata->auth_iv.data, tdata->auth_iv.len, in test_snow3g_authentication_verify()
2813 tdata->validAuthLenInBits.len, in test_snow3g_authentication_verify()
2839 test_kasumi_authentication(const struct kasumi_hash_test_data *tdata) in test_kasumi_authentication() argument
2872 tdata->key.data, tdata->key.len, in test_kasumi_authentication()
2873 0, tdata->digest.len, in test_kasumi_authentication()
2885 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_kasumi_authentication()
2891 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_kasumi_authentication()
2894 retval = create_wireless_algo_hash_operation(NULL, tdata->digest.len, in test_kasumi_authentication()
2897 tdata->plaintext.len, in test_kasumi_authentication()
2920 tdata->digest.data, in test_kasumi_authentication()
2928 test_kasumi_authentication_verify(const struct kasumi_hash_test_data *tdata) in test_kasumi_authentication_verify() argument
2961 tdata->key.data, tdata->key.len, in test_kasumi_authentication_verify()
2962 0, tdata->digest.len, in test_kasumi_authentication_verify()
2973 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_kasumi_authentication_verify()
2979 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_kasumi_authentication_verify()
2982 retval = create_wireless_algo_hash_operation(tdata->digest.data, in test_kasumi_authentication_verify()
2983 tdata->digest.len, in test_kasumi_authentication_verify()
2987 tdata->plaintext.len, in test_kasumi_authentication_verify()
3152 test_kasumi_encryption(const struct kasumi_test_data *tdata) in test_kasumi_encryption() argument
3187 tdata->key.data, tdata->key.len, in test_kasumi_encryption()
3188 tdata->cipher_iv.len); in test_kasumi_encryption()
3198 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_kasumi_encryption()
3204 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_kasumi_encryption()
3209 retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, in test_kasumi_encryption()
3210 tdata->cipher_iv.len, in test_kasumi_encryption()
3211 RTE_ALIGN_CEIL(tdata->validCipherLenInBits.len, 8), in test_kasumi_encryption()
3212 tdata->validCipherOffsetInBits.len); in test_kasumi_encryption()
3218 ut_params->op, 1, 0, 1, tdata->cipher_iv.len); in test_kasumi_encryption()
3228 ciphertext = plaintext + (tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_encryption()
3232 const uint8_t *reference_ciphertext = tdata->ciphertext.data + in test_kasumi_encryption()
3233 (tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_encryption()
3238 tdata->validCipherLenInBits.len, in test_kasumi_encryption()
3244 test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata) in test_kasumi_encryption_sgl() argument
3290 tdata->key.data, tdata->key.len, in test_kasumi_encryption_sgl()
3291 tdata->cipher_iv.len); in test_kasumi_encryption_sgl()
3295 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_kasumi_encryption_sgl()
3305 pktmbuf_write(ut_params->ibuf, 0, plaintext_len, tdata->plaintext.data); in test_kasumi_encryption_sgl()
3308 retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, in test_kasumi_encryption_sgl()
3309 tdata->cipher_iv.len, in test_kasumi_encryption_sgl()
3310 RTE_ALIGN_CEIL(tdata->validCipherLenInBits.len, 8), in test_kasumi_encryption_sgl()
3311 tdata->validCipherOffsetInBits.len); in test_kasumi_encryption_sgl()
3317 ut_params->op, 1, 0, 1, tdata->cipher_iv.len); in test_kasumi_encryption_sgl()
3330 tdata->validCipherOffsetInBits.len >> 3, in test_kasumi_encryption_sgl()
3336 const uint8_t *reference_ciphertext = tdata->ciphertext.data + in test_kasumi_encryption_sgl()
3337 (tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_encryption_sgl()
3342 tdata->validCipherLenInBits.len, in test_kasumi_encryption_sgl()
3348 test_kasumi_encryption_oop(const struct kasumi_test_data *tdata) in test_kasumi_encryption_oop() argument
3377 tdata->key.data, tdata->key.len, in test_kasumi_encryption_oop()
3378 tdata->cipher_iv.len); in test_kasumi_encryption_oop()
3389 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_kasumi_encryption_oop()
3396 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_kasumi_encryption_oop()
3401 retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data, in test_kasumi_encryption_oop()
3402 tdata->cipher_iv.len, in test_kasumi_encryption_oop()
3403 RTE_ALIGN_CEIL(tdata->validCipherLenInBits.len, 8), in test_kasumi_encryption_oop()
3404 tdata->validCipherOffsetInBits.len); in test_kasumi_encryption_oop()
3416 ciphertext = plaintext + (tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_encryption_oop()
3420 const uint8_t *reference_ciphertext = tdata->ciphertext.data + in test_kasumi_encryption_oop()
3421 (tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_encryption_oop()
3426 tdata->validCipherLenInBits.len, in test_kasumi_encryption_oop()
3432 test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata) in test_kasumi_encryption_oop_sgl() argument
3474 tdata->key.data, tdata->key.len, in test_kasumi_encryption_oop_sgl()
3475 tdata->cipher_iv.len); in test_kasumi_encryption_oop_sgl()
3479 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_kasumi_encryption_oop_sgl()
3491 pktmbuf_write(ut_params->ibuf, 0, plaintext_len, tdata->plaintext.data); in test_kasumi_encryption_oop_sgl()
3494 retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data, in test_kasumi_encryption_oop_sgl()
3495 tdata->cipher_iv.len, in test_kasumi_encryption_oop_sgl()
3496 RTE_ALIGN_CEIL(tdata->validCipherLenInBits.len, 8), in test_kasumi_encryption_oop_sgl()
3497 tdata->validCipherOffsetInBits.len); in test_kasumi_encryption_oop_sgl()
3511 tdata->validCipherOffsetInBits.len >> 3, in test_kasumi_encryption_oop_sgl()
3514 const uint8_t *reference_ciphertext = tdata->ciphertext.data + in test_kasumi_encryption_oop_sgl()
3515 (tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_encryption_oop_sgl()
3520 tdata->validCipherLenInBits.len, in test_kasumi_encryption_oop_sgl()
3527 test_kasumi_decryption_oop(const struct kasumi_test_data *tdata) in test_kasumi_decryption_oop() argument
3555 tdata->key.data, tdata->key.len, in test_kasumi_decryption_oop()
3556 tdata->cipher_iv.len); in test_kasumi_decryption_oop()
3567 ciphertext_len = ceil_byte_length(tdata->ciphertext.len); in test_kasumi_decryption_oop()
3574 memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); in test_kasumi_decryption_oop()
3579 retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data, in test_kasumi_decryption_oop()
3580 tdata->cipher_iv.len, in test_kasumi_decryption_oop()
3581 RTE_ALIGN_CEIL(tdata->validCipherLenInBits.len, 8), in test_kasumi_decryption_oop()
3582 tdata->validCipherOffsetInBits.len); in test_kasumi_decryption_oop()
3594 plaintext = ciphertext + (tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_decryption_oop()
3598 const uint8_t *reference_plaintext = tdata->plaintext.data + in test_kasumi_decryption_oop()
3599 (tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_decryption_oop()
3604 tdata->validCipherLenInBits.len, in test_kasumi_decryption_oop()
3610 test_kasumi_decryption(const struct kasumi_test_data *tdata) in test_kasumi_decryption() argument
3645 tdata->key.data, tdata->key.len, in test_kasumi_decryption()
3646 tdata->cipher_iv.len); in test_kasumi_decryption()
3656 ciphertext_len = ceil_byte_length(tdata->ciphertext.len); in test_kasumi_decryption()
3662 memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); in test_kasumi_decryption()
3667 retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, in test_kasumi_decryption()
3668 tdata->cipher_iv.len, in test_kasumi_decryption()
3669 tdata->ciphertext.len, in test_kasumi_decryption()
3670 tdata->validCipherOffsetInBits.len); in test_kasumi_decryption()
3686 plaintext = ciphertext + (tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_decryption()
3690 const uint8_t *reference_plaintext = tdata->plaintext.data + in test_kasumi_decryption()
3691 (tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_decryption()
3696 tdata->validCipherLenInBits.len, in test_kasumi_decryption()
3702 test_snow3g_encryption(const struct snow3g_test_data *tdata) in test_snow3g_encryption() argument
3737 tdata->key.data, tdata->key.len, in test_snow3g_encryption()
3738 tdata->cipher_iv.len); in test_snow3g_encryption()
3748 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_snow3g_encryption()
3754 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_snow3g_encryption()
3759 retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, in test_snow3g_encryption()
3760 tdata->cipher_iv.len, in test_snow3g_encryption()
3761 tdata->validCipherLenInBits.len, in test_snow3g_encryption()
3768 ut_params->op, 1, 0, 1, tdata->cipher_iv.len); in test_snow3g_encryption()
3785 tdata->ciphertext.data, in test_snow3g_encryption()
3786 tdata->validDataLenInBits.len, in test_snow3g_encryption()
3793 test_snow3g_encryption_oop(const struct snow3g_test_data *tdata) in test_snow3g_encryption_oop() argument
3821 tdata->key.data, tdata->key.len, in test_snow3g_encryption_oop()
3822 tdata->cipher_iv.len); in test_snow3g_encryption_oop()
3838 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_snow3g_encryption_oop()
3845 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_snow3g_encryption_oop()
3850 retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data, in test_snow3g_encryption_oop()
3851 tdata->cipher_iv.len, in test_snow3g_encryption_oop()
3852 tdata->validCipherLenInBits.len, in test_snow3g_encryption_oop()
3872 tdata->ciphertext.data, in test_snow3g_encryption_oop()
3873 tdata->validDataLenInBits.len, in test_snow3g_encryption_oop()
3879 test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata) in test_snow3g_encryption_oop_sgl() argument
3921 tdata->key.data, tdata->key.len, in test_snow3g_encryption_oop_sgl()
3922 tdata->cipher_iv.len); in test_snow3g_encryption_oop_sgl()
3926 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_snow3g_encryption_oop_sgl()
3941 pktmbuf_write(ut_params->ibuf, 0, plaintext_len, tdata->plaintext.data); in test_snow3g_encryption_oop_sgl()
3944 retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data, in test_snow3g_encryption_oop_sgl()
3945 tdata->cipher_iv.len, in test_snow3g_encryption_oop_sgl()
3946 tdata->validCipherLenInBits.len, in test_snow3g_encryption_oop_sgl()
3968 tdata->ciphertext.data, in test_snow3g_encryption_oop_sgl()
3969 tdata->validDataLenInBits.len, in test_snow3g_encryption_oop_sgl()
3996 test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata) in test_snow3g_encryption_offset_oop() argument
4012 ((tdata->validDataLenInBits.len % 8) != 0)) { in test_snow3g_encryption_offset_oop()
4035 tdata->key.data, tdata->key.len, in test_snow3g_encryption_offset_oop()
4036 tdata->cipher_iv.len); in test_snow3g_encryption_offset_oop()
4052 plaintext_len = ceil_byte_length(tdata->plaintext.len + extra_offset); in test_snow3g_encryption_offset_oop()
4064 memcpy(plaintext, tdata->plaintext.data, (tdata->plaintext.len >> 3)); in test_snow3g_encryption_offset_oop()
4065 buffer_shift_right(plaintext, tdata->plaintext.len, extra_offset); in test_snow3g_encryption_offset_oop()
4068 rte_hexdump(stdout, "plaintext:", plaintext, tdata->plaintext.len); in test_snow3g_encryption_offset_oop()
4071 retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data, in test_snow3g_encryption_offset_oop()
4072 tdata->cipher_iv.len, in test_snow3g_encryption_offset_oop()
4073 tdata->validCipherLenInBits.len, in test_snow3g_encryption_offset_oop()
4097 memcpy(expected_ciphertext_shifted, tdata->ciphertext.data, in test_snow3g_encryption_offset_oop()
4098 ceil_byte_length(tdata->ciphertext.len)); in test_snow3g_encryption_offset_oop()
4099 buffer_shift_right(expected_ciphertext_shifted, tdata->ciphertext.len, in test_snow3g_encryption_offset_oop()
4105 tdata->validDataLenInBits.len, in test_snow3g_encryption_offset_oop()
4111 static int test_snow3g_decryption(const struct snow3g_test_data *tdata) in test_snow3g_decryption() argument
4147 tdata->key.data, tdata->key.len, in test_snow3g_decryption()
4148 tdata->cipher_iv.len); in test_snow3g_decryption()
4158 ciphertext_len = ceil_byte_length(tdata->ciphertext.len); in test_snow3g_decryption()
4164 memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); in test_snow3g_decryption()
4169 retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, in test_snow3g_decryption()
4170 tdata->cipher_iv.len, in test_snow3g_decryption()
4171 tdata->validCipherLenInBits.len, in test_snow3g_decryption()
4172 tdata->cipher.offset_bits); in test_snow3g_decryption()
4178 ut_params->op, 1, 0, 1, tdata->cipher_iv.len); in test_snow3g_decryption()
4193 tdata->plaintext.data, in test_snow3g_decryption()
4194 tdata->validDataLenInBits.len, in test_snow3g_decryption()
4199 static int test_snow3g_decryption_oop(const struct snow3g_test_data *tdata) in test_snow3g_decryption_oop() argument
4228 tdata->key.data, tdata->key.len, in test_snow3g_decryption_oop()
4229 tdata->cipher_iv.len); in test_snow3g_decryption_oop()
4248 ciphertext_len = ceil_byte_length(tdata->ciphertext.len); in test_snow3g_decryption_oop()
4255 memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); in test_snow3g_decryption_oop()
4260 retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data, in test_snow3g_decryption_oop()
4261 tdata->cipher_iv.len, in test_snow3g_decryption_oop()
4262 tdata->validCipherLenInBits.len, in test_snow3g_decryption_oop()
4280 tdata->plaintext.data, in test_snow3g_decryption_oop()
4281 tdata->validDataLenInBits.len, in test_snow3g_decryption_oop()
4287 test_zuc_cipher_auth(const struct wireless_test_data *tdata) in test_zuc_cipher_auth() argument
4305 ((tdata->validAuthLenInBits.len % 8 != 0) || in test_zuc_cipher_auth()
4306 (tdata->validDataLenInBits.len % 8 != 0))) { in test_zuc_cipher_auth()
4339 tdata); in test_zuc_cipher_auth()
4348 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_zuc_cipher_auth()
4354 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_zuc_cipher_auth()
4359 retval = create_zuc_cipher_hash_generate_operation(tdata); in test_zuc_cipher_auth()
4365 ut_params->op, 1, 1, 1, tdata->cipher_iv.len); in test_zuc_cipher_auth()
4380 tdata->ciphertext.data, in test_zuc_cipher_auth()
4381 tdata->validDataLenInBits.len, in test_zuc_cipher_auth()
4390 tdata->digest.data, in test_zuc_cipher_auth()
4397 test_snow3g_cipher_auth(const struct snow3g_test_data *tdata) in test_snow3g_cipher_auth() argument
4440 tdata->key.data, tdata->key.len, in test_snow3g_cipher_auth()
4441 tdata->auth_iv.len, tdata->digest.len, in test_snow3g_cipher_auth()
4442 tdata->cipher_iv.len); in test_snow3g_cipher_auth()
4451 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_snow3g_cipher_auth()
4457 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_snow3g_cipher_auth()
4462 retval = create_wireless_algo_cipher_hash_operation(tdata->digest.data, in test_snow3g_cipher_auth()
4463 tdata->digest.len, tdata->auth_iv.data, in test_snow3g_cipher_auth()
4464 tdata->auth_iv.len, in test_snow3g_cipher_auth()
4466 tdata->cipher_iv.data, tdata->cipher_iv.len, in test_snow3g_cipher_auth()
4467 tdata->validCipherLenInBits.len, in test_snow3g_cipher_auth()
4469 tdata->validAuthLenInBits.len, in test_snow3g_cipher_auth()
4477 ut_params->op, 1, 1, 1, tdata->cipher_iv.len); in test_snow3g_cipher_auth()
4492 tdata->ciphertext.data, in test_snow3g_cipher_auth()
4493 tdata->validDataLenInBits.len, in test_snow3g_cipher_auth()
4502 tdata->digest.data, in test_snow3g_cipher_auth()
4509 test_snow3g_auth_cipher(const struct snow3g_test_data *tdata, in test_snow3g_auth_cipher() argument
4569 tdata->key.data, tdata->key.len, in test_snow3g_auth_cipher()
4570 tdata->auth_iv.len, tdata->digest.len, in test_snow3g_auth_cipher()
4571 tdata->cipher_iv.len); in test_snow3g_auth_cipher()
4587 ciphertext_len = ceil_byte_length(tdata->ciphertext.len); in test_snow3g_auth_cipher()
4588 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_snow3g_auth_cipher()
4595 memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); in test_snow3g_auth_cipher()
4603 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_snow3g_auth_cipher()
4611 tdata->digest.data, tdata->digest.len, in test_snow3g_auth_cipher()
4612 tdata->cipher_iv.data, tdata->cipher_iv.len, in test_snow3g_auth_cipher()
4613 tdata->auth_iv.data, tdata->auth_iv.len, in test_snow3g_auth_cipher()
4614 (tdata->digest.offset_bytes == 0 ? in test_snow3g_auth_cipher()
4616 : tdata->digest.offset_bytes), in test_snow3g_auth_cipher()
4617 tdata->validCipherLenInBits.len, in test_snow3g_auth_cipher()
4618 tdata->cipher.offset_bits, in test_snow3g_auth_cipher()
4619 tdata->validAuthLenInBits.len, in test_snow3g_auth_cipher()
4620 tdata->auth.offset_bits, in test_snow3g_auth_cipher()
4628 ut_params->op, 1, 1, 1, tdata->cipher_iv.len); in test_snow3g_auth_cipher()
4644 (tdata->cipher.offset_bits >> 3); in test_snow3g_auth_cipher()
4647 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_snow3g_auth_cipher()
4649 tdata->plaintext.data, in test_snow3g_auth_cipher()
4650 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_snow3g_auth_cipher()
4661 tdata->ciphertext.data, tdata->ciphertext.len >> 3); in test_snow3g_auth_cipher()
4664 + (tdata->digest.offset_bytes == 0 ? in test_snow3g_auth_cipher()
4665 plaintext_pad_len : tdata->digest.offset_bytes); in test_snow3g_auth_cipher()
4668 tdata->digest.len); in test_snow3g_auth_cipher()
4669 debug_hexdump(stdout, "digest expected:", tdata->digest.data, in test_snow3g_auth_cipher()
4670 tdata->digest.len); in test_snow3g_auth_cipher()
4677 tdata->plaintext.data, in test_snow3g_auth_cipher()
4678 tdata->plaintext.len >> 3, in test_snow3g_auth_cipher()
4683 tdata->ciphertext.data, in test_snow3g_auth_cipher()
4684 tdata->validDataLenInBits.len, in test_snow3g_auth_cipher()
4689 tdata->digest.data, in test_snow3g_auth_cipher()
4697 test_snow3g_auth_cipher_sgl(const struct snow3g_test_data *tdata, in test_snow3g_auth_cipher_sgl() argument
4771 tdata->key.data, tdata->key.len, in test_snow3g_auth_cipher_sgl()
4772 tdata->auth_iv.len, tdata->digest.len, in test_snow3g_auth_cipher_sgl()
4773 tdata->cipher_iv.len); in test_snow3g_auth_cipher_sgl()
4778 ciphertext_len = ceil_byte_length(tdata->ciphertext.len); in test_snow3g_auth_cipher_sgl()
4779 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_snow3g_auth_cipher_sgl()
4797 tdata->ciphertext.data); in test_snow3g_auth_cipher_sgl()
4804 tdata->plaintext.data); in test_snow3g_auth_cipher_sgl()
4814 tdata->digest.data, tdata->digest.len, in test_snow3g_auth_cipher_sgl()
4815 tdata->cipher_iv.data, tdata->cipher_iv.len, in test_snow3g_auth_cipher_sgl()
4816 tdata->auth_iv.data, tdata->auth_iv.len, in test_snow3g_auth_cipher_sgl()
4817 (tdata->digest.offset_bytes == 0 ? in test_snow3g_auth_cipher_sgl()
4819 : tdata->digest.offset_bytes), in test_snow3g_auth_cipher_sgl()
4820 tdata->validCipherLenInBits.len, in test_snow3g_auth_cipher_sgl()
4821 tdata->cipher.offset_bits, in test_snow3g_auth_cipher_sgl()
4822 tdata->validAuthLenInBits.len, in test_snow3g_auth_cipher_sgl()
4823 tdata->auth.offset_bits, in test_snow3g_auth_cipher_sgl()
4831 ut_params->op, 1, 1, 1, tdata->cipher_iv.len); in test_snow3g_auth_cipher_sgl()
4850 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_snow3g_auth_cipher_sgl()
4852 tdata->plaintext.data, in test_snow3g_auth_cipher_sgl()
4853 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_snow3g_auth_cipher_sgl()
4865 tdata->ciphertext.data, tdata->ciphertext.len >> 3); in test_snow3g_auth_cipher_sgl()
4869 (tdata->digest.offset_bytes == 0 ? in test_snow3g_auth_cipher_sgl()
4870 plaintext_pad_len : tdata->digest.offset_bytes), in test_snow3g_auth_cipher_sgl()
4871 tdata->digest.len, digest_buffer); in test_snow3g_auth_cipher_sgl()
4874 (tdata->digest.offset_bytes == 0 ? in test_snow3g_auth_cipher_sgl()
4875 plaintext_pad_len : tdata->digest.offset_bytes), in test_snow3g_auth_cipher_sgl()
4876 tdata->digest.len, digest_buffer); in test_snow3g_auth_cipher_sgl()
4879 tdata->digest.len); in test_snow3g_auth_cipher_sgl()
4881 tdata->digest.data, tdata->digest.len); in test_snow3g_auth_cipher_sgl()
4888 tdata->plaintext.data, in test_snow3g_auth_cipher_sgl()
4889 tdata->plaintext.len >> 3, in test_snow3g_auth_cipher_sgl()
4894 tdata->ciphertext.data, in test_snow3g_auth_cipher_sgl()
4895 tdata->validDataLenInBits.len, in test_snow3g_auth_cipher_sgl()
4900 tdata->digest.data, in test_snow3g_auth_cipher_sgl()
4908 test_kasumi_auth_cipher(const struct kasumi_test_data *tdata, in test_kasumi_auth_cipher() argument
4968 tdata->key.data, tdata->key.len, in test_kasumi_auth_cipher()
4969 0, tdata->digest.len, in test_kasumi_auth_cipher()
4970 tdata->cipher_iv.len); in test_kasumi_auth_cipher()
4986 ciphertext_len = ceil_byte_length(tdata->ciphertext.len); in test_kasumi_auth_cipher()
4987 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_kasumi_auth_cipher()
4994 memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); in test_kasumi_auth_cipher()
5002 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_kasumi_auth_cipher()
5011 tdata->digest.data, tdata->digest.len, in test_kasumi_auth_cipher()
5012 tdata->cipher_iv.data, tdata->cipher_iv.len, in test_kasumi_auth_cipher()
5014 (tdata->digest.offset_bytes == 0 ? in test_kasumi_auth_cipher()
5016 : tdata->digest.offset_bytes), in test_kasumi_auth_cipher()
5017 tdata->validCipherLenInBits.len, in test_kasumi_auth_cipher()
5018 tdata->validCipherOffsetInBits.len, in test_kasumi_auth_cipher()
5019 tdata->validAuthLenInBits.len, in test_kasumi_auth_cipher()
5028 ut_params->op, 1, 1, 1, tdata->cipher_iv.len); in test_kasumi_auth_cipher()
5047 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_kasumi_auth_cipher()
5049 tdata->plaintext.data, in test_kasumi_auth_cipher()
5050 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_kasumi_auth_cipher()
5061 tdata->ciphertext.data, tdata->ciphertext.len >> 3); in test_kasumi_auth_cipher()
5065 (tdata->digest.offset_bytes == 0 ? in test_kasumi_auth_cipher()
5066 plaintext_pad_len : tdata->digest.offset_bytes); in test_kasumi_auth_cipher()
5069 tdata->digest.len); in test_kasumi_auth_cipher()
5071 tdata->digest.data, tdata->digest.len); in test_kasumi_auth_cipher()
5078 tdata->plaintext.data, in test_kasumi_auth_cipher()
5079 tdata->plaintext.len >> 3, in test_kasumi_auth_cipher()
5084 tdata->ciphertext.data, in test_kasumi_auth_cipher()
5085 tdata->ciphertext.len >> 3, in test_kasumi_auth_cipher()
5090 tdata->digest.data, in test_kasumi_auth_cipher()
5098 test_kasumi_auth_cipher_sgl(const struct kasumi_test_data *tdata, in test_kasumi_auth_cipher_sgl() argument
5172 tdata->key.data, tdata->key.len, in test_kasumi_auth_cipher_sgl()
5173 0, tdata->digest.len, in test_kasumi_auth_cipher_sgl()
5174 tdata->cipher_iv.len); in test_kasumi_auth_cipher_sgl()
5179 ciphertext_len = ceil_byte_length(tdata->ciphertext.len); in test_kasumi_auth_cipher_sgl()
5180 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_kasumi_auth_cipher_sgl()
5198 tdata->ciphertext.data); in test_kasumi_auth_cipher_sgl()
5205 tdata->plaintext.data); in test_kasumi_auth_cipher_sgl()
5215 tdata->digest.data, tdata->digest.len, in test_kasumi_auth_cipher_sgl()
5216 tdata->cipher_iv.data, tdata->cipher_iv.len, in test_kasumi_auth_cipher_sgl()
5218 (tdata->digest.offset_bytes == 0 ? in test_kasumi_auth_cipher_sgl()
5220 : tdata->digest.offset_bytes), in test_kasumi_auth_cipher_sgl()
5221 tdata->validCipherLenInBits.len, in test_kasumi_auth_cipher_sgl()
5222 tdata->validCipherOffsetInBits.len, in test_kasumi_auth_cipher_sgl()
5223 tdata->validAuthLenInBits.len, in test_kasumi_auth_cipher_sgl()
5232 ut_params->op, 1, 1, 1, tdata->cipher_iv.len); in test_kasumi_auth_cipher_sgl()
5251 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_kasumi_auth_cipher_sgl()
5253 tdata->plaintext.data, in test_kasumi_auth_cipher_sgl()
5254 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_kasumi_auth_cipher_sgl()
5266 tdata->ciphertext.data, tdata->ciphertext.len >> 3); in test_kasumi_auth_cipher_sgl()
5270 (tdata->digest.offset_bytes == 0 ? in test_kasumi_auth_cipher_sgl()
5271 plaintext_pad_len : tdata->digest.offset_bytes), in test_kasumi_auth_cipher_sgl()
5272 tdata->digest.len, digest_buffer); in test_kasumi_auth_cipher_sgl()
5275 (tdata->digest.offset_bytes == 0 ? in test_kasumi_auth_cipher_sgl()
5276 plaintext_pad_len : tdata->digest.offset_bytes), in test_kasumi_auth_cipher_sgl()
5277 tdata->digest.len, digest_buffer); in test_kasumi_auth_cipher_sgl()
5280 tdata->digest.len); in test_kasumi_auth_cipher_sgl()
5282 tdata->digest.data, tdata->digest.len); in test_kasumi_auth_cipher_sgl()
5289 tdata->plaintext.data, in test_kasumi_auth_cipher_sgl()
5290 tdata->plaintext.len >> 3, in test_kasumi_auth_cipher_sgl()
5295 tdata->ciphertext.data, in test_kasumi_auth_cipher_sgl()
5296 tdata->validDataLenInBits.len, in test_kasumi_auth_cipher_sgl()
5301 tdata->digest.data, in test_kasumi_auth_cipher_sgl()
5309 test_kasumi_cipher_auth(const struct kasumi_test_data *tdata) in test_kasumi_cipher_auth() argument
5353 tdata->key.data, tdata->key.len, in test_kasumi_cipher_auth()
5354 0, tdata->digest.len, in test_kasumi_cipher_auth()
5355 tdata->cipher_iv.len); in test_kasumi_cipher_auth()
5365 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_kasumi_cipher_auth()
5371 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_kasumi_cipher_auth()
5376 retval = create_wireless_algo_cipher_hash_operation(tdata->digest.data, in test_kasumi_cipher_auth()
5377 tdata->digest.len, NULL, 0, in test_kasumi_cipher_auth()
5379 tdata->cipher_iv.data, tdata->cipher_iv.len, in test_kasumi_cipher_auth()
5380 RTE_ALIGN_CEIL(tdata->validCipherLenInBits.len, 8), in test_kasumi_cipher_auth()
5381 tdata->validCipherOffsetInBits.len, in test_kasumi_cipher_auth()
5382 tdata->validAuthLenInBits.len, in test_kasumi_cipher_auth()
5390 ut_params->op, 1, 1, 1, tdata->cipher_iv.len); in test_kasumi_cipher_auth()
5402 tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_cipher_auth()
5407 const uint8_t *reference_ciphertext = tdata->ciphertext.data + in test_kasumi_cipher_auth()
5408 (tdata->validCipherOffsetInBits.len >> 3); in test_kasumi_cipher_auth()
5413 tdata->validCipherLenInBits.len, in test_kasumi_cipher_auth()
5419 tdata->digest.data, in test_kasumi_cipher_auth()
5426 test_zuc_encryption(const struct wireless_test_data *tdata) in test_zuc_encryption() argument
5463 tdata->key.data, tdata->key.len, in test_zuc_encryption()
5464 tdata->cipher_iv.len); in test_zuc_encryption()
5474 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_zuc_encryption()
5480 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_zuc_encryption()
5485 retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, in test_zuc_encryption()
5486 tdata->cipher_iv.len, in test_zuc_encryption()
5487 tdata->plaintext.len, in test_zuc_encryption()
5494 ut_params->op, 1, 0, 1, tdata->cipher_iv.len); in test_zuc_encryption()
5511 tdata->ciphertext.data, in test_zuc_encryption()
5512 tdata->validCipherLenInBits.len, in test_zuc_encryption()
5518 test_zuc_encryption_sgl(const struct wireless_test_data *tdata) in test_zuc_encryption_sgl() argument
5560 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_zuc_encryption_sgl()
5570 tdata->plaintext.data); in test_zuc_encryption_sgl()
5576 tdata->key.data, tdata->key.len, in test_zuc_encryption_sgl()
5577 tdata->cipher_iv.len); in test_zuc_encryption_sgl()
5583 pktmbuf_write(ut_params->ibuf, 0, plaintext_len, tdata->plaintext.data); in test_zuc_encryption_sgl()
5586 retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data, in test_zuc_encryption_sgl()
5587 tdata->cipher_iv.len, tdata->plaintext.len, in test_zuc_encryption_sgl()
5594 ut_params->op, 1, 0, 1, tdata->cipher_iv.len); in test_zuc_encryption_sgl()
5614 tdata->ciphertext.data, in test_zuc_encryption_sgl()
5615 tdata->validCipherLenInBits.len, in test_zuc_encryption_sgl()
5622 test_zuc_authentication(const struct wireless_test_data *tdata) in test_zuc_authentication() argument
5639 (tdata->validAuthLenInBits.len % 8 != 0)) { in test_zuc_authentication()
5663 tdata->key.data, tdata->key.len, in test_zuc_authentication()
5664 tdata->auth_iv.len, tdata->digest.len, in test_zuc_authentication()
5676 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_zuc_authentication()
5682 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_zuc_authentication()
5685 retval = create_wireless_algo_hash_operation(NULL, tdata->digest.len, in test_zuc_authentication()
5686 tdata->auth_iv.data, tdata->auth_iv.len, in test_zuc_authentication()
5688 tdata->validAuthLenInBits.len, in test_zuc_authentication()
5707 tdata->digest.data, in test_zuc_authentication()
5708 tdata->digest.len, in test_zuc_authentication()
5715 test_zuc_auth_cipher(const struct wireless_test_data *tdata, in test_zuc_auth_cipher() argument
5779 tdata->key.data, tdata->key.len, in test_zuc_auth_cipher()
5780 tdata->auth_iv.len, tdata->digest.len, in test_zuc_auth_cipher()
5781 tdata->cipher_iv.len); in test_zuc_auth_cipher()
5797 ciphertext_len = ceil_byte_length(tdata->ciphertext.len); in test_zuc_auth_cipher()
5798 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_zuc_auth_cipher()
5805 memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); in test_zuc_auth_cipher()
5813 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_zuc_auth_cipher()
5822 tdata->digest.data, tdata->digest.len, in test_zuc_auth_cipher()
5823 tdata->cipher_iv.data, tdata->cipher_iv.len, in test_zuc_auth_cipher()
5824 tdata->auth_iv.data, tdata->auth_iv.len, in test_zuc_auth_cipher()
5825 (tdata->digest.offset_bytes == 0 ? in test_zuc_auth_cipher()
5827 : tdata->digest.offset_bytes), in test_zuc_auth_cipher()
5828 tdata->validCipherLenInBits.len, in test_zuc_auth_cipher()
5829 tdata->validCipherOffsetInBits.len, in test_zuc_auth_cipher()
5830 tdata->validAuthLenInBits.len, in test_zuc_auth_cipher()
5839 ut_params->op, 1, 1, 1, tdata->cipher_iv.len); in test_zuc_auth_cipher()
5858 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_zuc_auth_cipher()
5860 tdata->plaintext.data, in test_zuc_auth_cipher()
5861 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_zuc_auth_cipher()
5872 tdata->ciphertext.data, tdata->ciphertext.len >> 3); in test_zuc_auth_cipher()
5876 (tdata->digest.offset_bytes == 0 ? in test_zuc_auth_cipher()
5877 plaintext_pad_len : tdata->digest.offset_bytes); in test_zuc_auth_cipher()
5880 tdata->digest.len); in test_zuc_auth_cipher()
5882 tdata->digest.data, tdata->digest.len); in test_zuc_auth_cipher()
5889 tdata->plaintext.data, in test_zuc_auth_cipher()
5890 tdata->plaintext.len >> 3, in test_zuc_auth_cipher()
5895 tdata->ciphertext.data, in test_zuc_auth_cipher()
5896 tdata->ciphertext.len >> 3, in test_zuc_auth_cipher()
5901 tdata->digest.data, in test_zuc_auth_cipher()
5909 test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata, in test_zuc_auth_cipher_sgl() argument
5977 tdata->key.data, tdata->key.len, in test_zuc_auth_cipher_sgl()
5978 tdata->auth_iv.len, tdata->digest.len, in test_zuc_auth_cipher_sgl()
5979 tdata->cipher_iv.len); in test_zuc_auth_cipher_sgl()
5984 ciphertext_len = ceil_byte_length(tdata->ciphertext.len); in test_zuc_auth_cipher_sgl()
5985 plaintext_len = ceil_byte_length(tdata->plaintext.len); in test_zuc_auth_cipher_sgl()
6003 tdata->ciphertext.data); in test_zuc_auth_cipher_sgl()
6010 tdata->plaintext.data); in test_zuc_auth_cipher_sgl()
6020 tdata->digest.data, tdata->digest.len, in test_zuc_auth_cipher_sgl()
6021 tdata->cipher_iv.data, tdata->cipher_iv.len, in test_zuc_auth_cipher_sgl()
6023 (tdata->digest.offset_bytes == 0 ? in test_zuc_auth_cipher_sgl()
6025 : tdata->digest.offset_bytes), in test_zuc_auth_cipher_sgl()
6026 tdata->validCipherLenInBits.len, in test_zuc_auth_cipher_sgl()
6027 tdata->validCipherOffsetInBits.len, in test_zuc_auth_cipher_sgl()
6028 tdata->validAuthLenInBits.len, in test_zuc_auth_cipher_sgl()
6037 ut_params->op, 1, 1, 1, tdata->cipher_iv.len); in test_zuc_auth_cipher_sgl()
6056 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_zuc_auth_cipher_sgl()
6058 tdata->plaintext.data, in test_zuc_auth_cipher_sgl()
6059 (tdata->plaintext.len >> 3) - tdata->digest.len); in test_zuc_auth_cipher_sgl()
6071 tdata->ciphertext.data, tdata->ciphertext.len >> 3); in test_zuc_auth_cipher_sgl()
6075 (tdata->digest.offset_bytes == 0 ? in test_zuc_auth_cipher_sgl()
6076 plaintext_pad_len : tdata->digest.offset_bytes), in test_zuc_auth_cipher_sgl()
6077 tdata->digest.len, digest_buffer); in test_zuc_auth_cipher_sgl()
6080 (tdata->digest.offset_bytes == 0 ? in test_zuc_auth_cipher_sgl()
6081 plaintext_pad_len : tdata->digest.offset_bytes), in test_zuc_auth_cipher_sgl()
6082 tdata->digest.len, digest_buffer); in test_zuc_auth_cipher_sgl()
6085 tdata->digest.len); in test_zuc_auth_cipher_sgl()
6087 tdata->digest.data, tdata->digest.len); in test_zuc_auth_cipher_sgl()
6094 tdata->plaintext.data, in test_zuc_auth_cipher_sgl()
6095 tdata->plaintext.len >> 3, in test_zuc_auth_cipher_sgl()
6100 tdata->ciphertext.data, in test_zuc_auth_cipher_sgl()
6101 tdata->validDataLenInBits.len, in test_zuc_auth_cipher_sgl()
6106 tdata->digest.data, in test_zuc_auth_cipher_sgl()
6720 test_mixed_check_if_unsupported(const struct mixed_cipher_auth_test_data *tdata) in test_mixed_check_if_unsupported() argument
6728 cap_idx.algo.cipher = tdata->cipher_algo; in test_mixed_check_if_unsupported()
6734 cap_idx.algo.auth = tdata->auth_algo; in test_mixed_check_if_unsupported()
6742 test_mixed_auth_cipher(const struct mixed_cipher_auth_test_data *tdata, in test_mixed_auth_cipher() argument
6760 if (test_mixed_check_if_unsupported(tdata)) in test_mixed_auth_cipher()
6780 tdata->auth_algo, in test_mixed_auth_cipher()
6781 tdata->cipher_algo, in test_mixed_auth_cipher()
6782 tdata->auth_key.data, tdata->auth_key.len, in test_mixed_auth_cipher()
6783 tdata->auth_iv.len, tdata->digest_enc.len, in test_mixed_auth_cipher()
6784 tdata->cipher_iv.len); in test_mixed_auth_cipher()
6790 tdata->auth_algo, in test_mixed_auth_cipher()
6791 tdata->cipher_algo, in test_mixed_auth_cipher()
6792 tdata->auth_key.data, tdata->auth_key.len, in test_mixed_auth_cipher()
6793 tdata->auth_iv.len, tdata->digest_enc.len, in test_mixed_auth_cipher()
6794 tdata->cipher_iv.len); in test_mixed_auth_cipher()
6811 ciphertext_len = ceil_byte_length(tdata->ciphertext.len_bits); in test_mixed_auth_cipher()
6812 plaintext_len = ceil_byte_length(tdata->plaintext.len_bits); in test_mixed_auth_cipher()
6819 memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len); in test_mixed_auth_cipher()
6827 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_mixed_auth_cipher()
6835 tdata->digest_enc.data, tdata->digest_enc.len, in test_mixed_auth_cipher()
6836 tdata->cipher_iv.data, tdata->cipher_iv.len, in test_mixed_auth_cipher()
6837 tdata->auth_iv.data, tdata->auth_iv.len, in test_mixed_auth_cipher()
6838 (tdata->digest_enc.offset == 0 ? in test_mixed_auth_cipher()
6840 : tdata->digest_enc.offset), in test_mixed_auth_cipher()
6841 tdata->validCipherLen.len_bits, in test_mixed_auth_cipher()
6842 tdata->cipher.offset_bits, in test_mixed_auth_cipher()
6843 tdata->validAuthLen.len_bits, in test_mixed_auth_cipher()
6844 tdata->auth.offset_bits, in test_mixed_auth_cipher()
6873 (tdata->cipher.offset_bits >> 3); in test_mixed_auth_cipher()
6876 tdata->plaintext.len_bits >> 3); in test_mixed_auth_cipher()
6878 tdata->plaintext.data, in test_mixed_auth_cipher()
6879 tdata->plaintext.len_bits >> 3); in test_mixed_auth_cipher()
6890 tdata->ciphertext.data, in test_mixed_auth_cipher()
6891 tdata->ciphertext.len_bits >> 3); in test_mixed_auth_cipher()
6894 + (tdata->digest_enc.offset == 0 ? in test_mixed_auth_cipher()
6895 plaintext_pad_len : tdata->digest_enc.offset); in test_mixed_auth_cipher()
6898 tdata->digest_enc.len); in test_mixed_auth_cipher()
6900 tdata->digest_enc.data, in test_mixed_auth_cipher()
6901 tdata->digest_enc.len); in test_mixed_auth_cipher()
6908 tdata->plaintext.data, in test_mixed_auth_cipher()
6909 tdata->plaintext.len_bits >> 3, in test_mixed_auth_cipher()
6914 tdata->ciphertext.data, in test_mixed_auth_cipher()
6915 tdata->validDataLen.len_bits, in test_mixed_auth_cipher()
6920 tdata->digest_enc.data, in test_mixed_auth_cipher()
6932 test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata, in test_mixed_auth_cipher_sgl() argument
6954 if (test_mixed_check_if_unsupported(tdata)) in test_mixed_auth_cipher_sgl()
6987 tdata->auth_algo, in test_mixed_auth_cipher_sgl()
6988 tdata->cipher_algo, in test_mixed_auth_cipher_sgl()
6989 tdata->auth_key.data, tdata->auth_key.len, in test_mixed_auth_cipher_sgl()
6990 tdata->auth_iv.len, tdata->digest_enc.len, in test_mixed_auth_cipher_sgl()
6991 tdata->cipher_iv.len); in test_mixed_auth_cipher_sgl()
6997 tdata->auth_algo, in test_mixed_auth_cipher_sgl()
6998 tdata->cipher_algo, in test_mixed_auth_cipher_sgl()
6999 tdata->auth_key.data, tdata->auth_key.len, in test_mixed_auth_cipher_sgl()
7000 tdata->auth_iv.len, tdata->digest_enc.len, in test_mixed_auth_cipher_sgl()
7001 tdata->cipher_iv.len); in test_mixed_auth_cipher_sgl()
7005 ciphertext_len = ceil_byte_length(tdata->ciphertext.len_bits); in test_mixed_auth_cipher_sgl()
7006 plaintext_len = ceil_byte_length(tdata->plaintext.len_bits); in test_mixed_auth_cipher_sgl()
7024 tdata->ciphertext.data); in test_mixed_auth_cipher_sgl()
7031 tdata->plaintext.data); in test_mixed_auth_cipher_sgl()
7041 tdata->digest_enc.data, tdata->digest_enc.len, in test_mixed_auth_cipher_sgl()
7042 tdata->cipher_iv.data, tdata->cipher_iv.len, in test_mixed_auth_cipher_sgl()
7043 tdata->auth_iv.data, tdata->auth_iv.len, in test_mixed_auth_cipher_sgl()
7044 (tdata->digest_enc.offset == 0 ? in test_mixed_auth_cipher_sgl()
7046 : tdata->digest_enc.offset), in test_mixed_auth_cipher_sgl()
7047 tdata->validCipherLen.len_bits, in test_mixed_auth_cipher_sgl()
7048 tdata->cipher.offset_bits, in test_mixed_auth_cipher_sgl()
7049 tdata->validAuthLen.len_bits, in test_mixed_auth_cipher_sgl()
7050 tdata->auth.offset_bits, in test_mixed_auth_cipher_sgl()
7082 (tdata->plaintext.len_bits >> 3) - in test_mixed_auth_cipher_sgl()
7083 tdata->digest_enc.len); in test_mixed_auth_cipher_sgl()
7085 tdata->plaintext.data, in test_mixed_auth_cipher_sgl()
7086 (tdata->plaintext.len_bits >> 3) - in test_mixed_auth_cipher_sgl()
7087 tdata->digest_enc.len); in test_mixed_auth_cipher_sgl()
7099 tdata->ciphertext.data, in test_mixed_auth_cipher_sgl()
7100 tdata->ciphertext.len_bits >> 3); in test_mixed_auth_cipher_sgl()
7104 (tdata->digest_enc.offset == 0 ? in test_mixed_auth_cipher_sgl()
7106 tdata->digest_enc.offset), in test_mixed_auth_cipher_sgl()
7107 tdata->digest_enc.len, digest_buffer); in test_mixed_auth_cipher_sgl()
7110 (tdata->digest_enc.offset == 0 ? in test_mixed_auth_cipher_sgl()
7112 tdata->digest_enc.offset), in test_mixed_auth_cipher_sgl()
7113 tdata->digest_enc.len, digest_buffer); in test_mixed_auth_cipher_sgl()
7116 tdata->digest_enc.len); in test_mixed_auth_cipher_sgl()
7118 tdata->digest_enc.data, tdata->digest_enc.len); in test_mixed_auth_cipher_sgl()
7125 tdata->plaintext.data, in test_mixed_auth_cipher_sgl()
7126 tdata->plaintext.len_bits >> 3, in test_mixed_auth_cipher_sgl()
7131 tdata->ciphertext.data, in test_mixed_auth_cipher_sgl()
7132 tdata->validDataLen.len_bits, in test_mixed_auth_cipher_sgl()
7136 tdata->digest_enc.data, in test_mixed_auth_cipher_sgl()
7137 tdata->digest_enc.len, in test_mixed_auth_cipher_sgl()
7450 const struct aead_test_data *tdata) in create_aead_operation() argument
7467 if (tdata->algo == RTE_CRYPTO_AEAD_AES_CCM) { in create_aead_operation()
7468 aad_pad_len = RTE_ALIGN_CEIL(tdata->aad.len + 18, 16); in create_aead_operation()
7477 memcpy(sym_op->aead.aad.data + 18, tdata->aad.data, tdata->aad.len); in create_aead_operation()
7479 tdata->aad.len); in create_aead_operation()
7486 rte_memcpy(iv_ptr + 1, tdata->iv.data, tdata->iv.len); in create_aead_operation()
7488 tdata->iv.len); in create_aead_operation()
7490 aad_pad_len = RTE_ALIGN_CEIL(tdata->aad.len, 16); in create_aead_operation()
7498 memcpy(sym_op->aead.aad.data, tdata->aad.data, tdata->aad.len); in create_aead_operation()
7500 tdata->aad.len); in create_aead_operation()
7506 if (tdata->iv.len == 0) { in create_aead_operation()
7507 rte_memcpy(iv_ptr, tdata->iv.data, AES_GCM_J0_LENGTH); in create_aead_operation()
7511 rte_memcpy(iv_ptr, tdata->iv.data, tdata->iv.len); in create_aead_operation()
7513 tdata->iv.len); in create_aead_operation()
7519 plaintext_pad_len = RTE_ALIGN_CEIL(tdata->plaintext.len, 16); in create_aead_operation()
7524 memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len); in create_aead_operation()
7526 tdata->plaintext.len); in create_aead_operation()
7536 tdata->ciphertext.len); in create_aead_operation()
7539 plaintext_pad_len = RTE_ALIGN_CEIL(tdata->ciphertext.len, 16); in create_aead_operation()
7545 memcpy(ciphertext, tdata->ciphertext.data, in create_aead_operation()
7546 tdata->ciphertext.len); in create_aead_operation()
7548 tdata->ciphertext.len); in create_aead_operation()
7558 tdata->plaintext.len); in create_aead_operation()
7567 tdata->auth_tag.len); in create_aead_operation()
7570 memset(sym_op->aead.digest.data, 0, tdata->auth_tag.len); in create_aead_operation()
7578 ut_params->ibuf, tdata->auth_tag.len); in create_aead_operation()
7585 rte_memcpy(sym_op->aead.digest.data, tdata->auth_tag.data, in create_aead_operation()
7586 tdata->auth_tag.len); in create_aead_operation()
7589 tdata->auth_tag.len); in create_aead_operation()
7592 sym_op->aead.data.length = tdata->plaintext.len; in create_aead_operation()
7599 test_authenticated_encryption(const struct aead_test_data *tdata) in test_authenticated_encryption() argument
7623 cap_idx.algo.aead = tdata->algo; in test_authenticated_encryption()
7629 capability, tdata->key.len, tdata->auth_tag.len, in test_authenticated_encryption()
7630 tdata->aad.len, tdata->iv.len)) in test_authenticated_encryption()
7635 tdata->algo, in test_authenticated_encryption()
7637 tdata->key.data, tdata->key.len, in test_authenticated_encryption()
7638 tdata->aad.len, tdata->auth_tag.len, in test_authenticated_encryption()
7639 tdata->iv.len); in test_authenticated_encryption()
7643 if (tdata->aad.len > MBUF_SIZE) { in test_authenticated_encryption()
7647 memcpy(&tdata->aad.data[i], &tdata->aad.data[0], 32); in test_authenticated_encryption()
7656 retval = create_aead_operation(RTE_CRYPTO_AEAD_OP_ENCRYPT, tdata); in test_authenticated_encryption()
7678 plaintext_pad_len = RTE_ALIGN_CEIL(tdata->plaintext.len, 16); in test_authenticated_encryption()
7692 debug_hexdump(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len); in test_authenticated_encryption()
7693 debug_hexdump(stdout, "auth tag:", auth_tag, tdata->auth_tag.len); in test_authenticated_encryption()
7698 tdata->ciphertext.data, in test_authenticated_encryption()
7699 tdata->ciphertext.len, in test_authenticated_encryption()
7704 tdata->auth_tag.data, in test_authenticated_encryption()
7705 tdata->auth_tag.len, in test_authenticated_encryption()
9128 struct aead_test_data tdata; in test_AES_GCM_auth_encryption_fail_iv_corrupt() local
9132 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_encryption_fail_iv_corrupt()
9133 tdata.iv.data[0] += 1; in test_AES_GCM_auth_encryption_fail_iv_corrupt()
9134 res = test_authenticated_encryption(&tdata); in test_AES_GCM_auth_encryption_fail_iv_corrupt()
9144 struct aead_test_data tdata; in test_AES_GCM_auth_encryption_fail_in_data_corrupt() local
9148 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_encryption_fail_in_data_corrupt()
9149 tdata.plaintext.data[0] += 1; in test_AES_GCM_auth_encryption_fail_in_data_corrupt()
9150 res = test_authenticated_encryption(&tdata); in test_AES_GCM_auth_encryption_fail_in_data_corrupt()
9160 struct aead_test_data tdata; in test_AES_GCM_auth_encryption_fail_out_data_corrupt() local
9164 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_encryption_fail_out_data_corrupt()
9165 tdata.ciphertext.data[0] += 1; in test_AES_GCM_auth_encryption_fail_out_data_corrupt()
9166 res = test_authenticated_encryption(&tdata); in test_AES_GCM_auth_encryption_fail_out_data_corrupt()
9176 struct aead_test_data tdata; in test_AES_GCM_auth_encryption_fail_aad_len_corrupt() local
9180 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_encryption_fail_aad_len_corrupt()
9181 tdata.aad.len += 1; in test_AES_GCM_auth_encryption_fail_aad_len_corrupt()
9182 res = test_authenticated_encryption(&tdata); in test_AES_GCM_auth_encryption_fail_aad_len_corrupt()
9192 struct aead_test_data tdata; in test_AES_GCM_auth_encryption_fail_aad_corrupt() local
9197 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_encryption_fail_aad_corrupt()
9200 tdata.aad.data = aad; in test_AES_GCM_auth_encryption_fail_aad_corrupt()
9201 res = test_authenticated_encryption(&tdata); in test_AES_GCM_auth_encryption_fail_aad_corrupt()
9211 struct aead_test_data tdata; in test_AES_GCM_auth_encryption_fail_tag_corrupt() local
9215 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_encryption_fail_tag_corrupt()
9216 tdata.auth_tag.data[0] += 1; in test_AES_GCM_auth_encryption_fail_tag_corrupt()
9217 res = test_authenticated_encryption(&tdata); in test_AES_GCM_auth_encryption_fail_tag_corrupt()
9225 test_authenticated_decryption(const struct aead_test_data *tdata) in test_authenticated_decryption() argument
9248 cap_idx.algo.aead = tdata->algo; in test_authenticated_decryption()
9254 capability, tdata->key.len, tdata->auth_tag.len, in test_authenticated_decryption()
9255 tdata->aad.len, tdata->iv.len)) in test_authenticated_decryption()
9260 tdata->algo, in test_authenticated_decryption()
9262 tdata->key.data, tdata->key.len, in test_authenticated_decryption()
9263 tdata->aad.len, tdata->auth_tag.len, in test_authenticated_decryption()
9264 tdata->iv.len); in test_authenticated_decryption()
9269 if (tdata->aad.len > MBUF_SIZE) { in test_authenticated_decryption()
9273 memcpy(&tdata->aad.data[i], &tdata->aad.data[0], 32); in test_authenticated_decryption()
9281 retval = create_aead_operation(RTE_CRYPTO_AEAD_OP_DECRYPT, tdata); in test_authenticated_decryption()
9311 debug_hexdump(stdout, "plaintext:", plaintext, tdata->ciphertext.len); in test_authenticated_decryption()
9316 tdata->plaintext.data, in test_authenticated_decryption()
9317 tdata->plaintext.len, in test_authenticated_decryption()
9480 struct aead_test_data tdata; in test_AES_GCM_auth_decryption_fail_iv_corrupt() local
9483 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_decryption_fail_iv_corrupt()
9484 tdata.iv.data[0] += 1; in test_AES_GCM_auth_decryption_fail_iv_corrupt()
9485 res = test_authenticated_decryption(&tdata); in test_AES_GCM_auth_decryption_fail_iv_corrupt()
9495 struct aead_test_data tdata; in test_AES_GCM_auth_decryption_fail_in_data_corrupt() local
9499 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_decryption_fail_in_data_corrupt()
9500 tdata.plaintext.data[0] += 1; in test_AES_GCM_auth_decryption_fail_in_data_corrupt()
9501 res = test_authenticated_decryption(&tdata); in test_AES_GCM_auth_decryption_fail_in_data_corrupt()
9511 struct aead_test_data tdata; in test_AES_GCM_auth_decryption_fail_out_data_corrupt() local
9514 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_decryption_fail_out_data_corrupt()
9515 tdata.ciphertext.data[0] += 1; in test_AES_GCM_auth_decryption_fail_out_data_corrupt()
9516 res = test_authenticated_decryption(&tdata); in test_AES_GCM_auth_decryption_fail_out_data_corrupt()
9526 struct aead_test_data tdata; in test_AES_GCM_auth_decryption_fail_aad_len_corrupt() local
9529 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_decryption_fail_aad_len_corrupt()
9530 tdata.aad.len += 1; in test_AES_GCM_auth_decryption_fail_aad_len_corrupt()
9531 res = test_authenticated_decryption(&tdata); in test_AES_GCM_auth_decryption_fail_aad_len_corrupt()
9541 struct aead_test_data tdata; in test_AES_GCM_auth_decryption_fail_aad_corrupt() local
9545 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_decryption_fail_aad_corrupt()
9548 tdata.aad.data = aad; in test_AES_GCM_auth_decryption_fail_aad_corrupt()
9549 res = test_authenticated_decryption(&tdata); in test_AES_GCM_auth_decryption_fail_aad_corrupt()
9559 struct aead_test_data tdata; in test_AES_GCM_auth_decryption_fail_tag_corrupt() local
9562 memcpy(&tdata, &gcm_test_case_7, sizeof(struct aead_test_data)); in test_AES_GCM_auth_decryption_fail_tag_corrupt()
9563 tdata.auth_tag.data[0] += 1; in test_AES_GCM_auth_decryption_fail_tag_corrupt()
9564 res = test_authenticated_decryption(&tdata); in test_AES_GCM_auth_decryption_fail_tag_corrupt()
9572 test_authenticated_encryption_oop(const struct aead_test_data *tdata) in test_authenticated_encryption_oop() argument
9584 cap_idx.algo.aead = tdata->algo; in test_authenticated_encryption_oop()
9598 tdata->algo, in test_authenticated_encryption_oop()
9600 tdata->key.data, tdata->key.len, in test_authenticated_encryption_oop()
9601 tdata->aad.len, tdata->auth_tag.len, in test_authenticated_encryption_oop()
9602 tdata->iv.len); in test_authenticated_encryption_oop()
9616 retval = create_aead_operation(RTE_CRYPTO_AEAD_OP_ENCRYPT, tdata); in test_authenticated_encryption_oop()
9632 plaintext_pad_len = RTE_ALIGN_CEIL(tdata->plaintext.len, 16); in test_authenticated_encryption_oop()
9638 debug_hexdump(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len); in test_authenticated_encryption_oop()
9639 debug_hexdump(stdout, "auth tag:", auth_tag, tdata->auth_tag.len); in test_authenticated_encryption_oop()
9644 tdata->ciphertext.data, in test_authenticated_encryption_oop()
9645 tdata->ciphertext.len, in test_authenticated_encryption_oop()
9650 tdata->auth_tag.data, in test_authenticated_encryption_oop()
9651 tdata->auth_tag.len, in test_authenticated_encryption_oop()
9665 test_authenticated_decryption_oop(const struct aead_test_data *tdata) in test_authenticated_decryption_oop() argument
9676 cap_idx.algo.aead = tdata->algo; in test_authenticated_decryption_oop()
9688 tdata->algo, in test_authenticated_decryption_oop()
9690 tdata->key.data, tdata->key.len, in test_authenticated_decryption_oop()
9691 tdata->aad.len, tdata->auth_tag.len, in test_authenticated_decryption_oop()
9692 tdata->iv.len); in test_authenticated_decryption_oop()
9706 retval = create_aead_operation(RTE_CRYPTO_AEAD_OP_DECRYPT, tdata); in test_authenticated_decryption_oop()
9725 debug_hexdump(stdout, "plaintext:", plaintext, tdata->ciphertext.len); in test_authenticated_decryption_oop()
9730 tdata->plaintext.data, in test_authenticated_decryption_oop()
9731 tdata->plaintext.len, in test_authenticated_decryption_oop()
9748 const struct aead_test_data *tdata) in test_authenticated_encryption_sessionless() argument
9756 uint8_t key[tdata->key.len + 1]; in test_authenticated_encryption_sessionless()
9774 cap_idx.algo.aead = tdata->algo; in test_authenticated_encryption_sessionless()
9786 retval = create_aead_operation(RTE_CRYPTO_AEAD_OP_ENCRYPT, tdata); in test_authenticated_encryption_sessionless()
9791 memcpy(key, tdata->key.data, tdata->key.len); in test_authenticated_encryption_sessionless()
9793 tdata->algo, in test_authenticated_encryption_sessionless()
9795 key, tdata->key.len, in test_authenticated_encryption_sessionless()
9796 tdata->aad.len, tdata->auth_tag.len, in test_authenticated_encryption_sessionless()
9797 tdata->iv.len); in test_authenticated_encryption_sessionless()
9816 plaintext_pad_len = RTE_ALIGN_CEIL(tdata->plaintext.len, 16); in test_authenticated_encryption_sessionless()
9822 debug_hexdump(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len); in test_authenticated_encryption_sessionless()
9823 debug_hexdump(stdout, "auth tag:", auth_tag, tdata->auth_tag.len); in test_authenticated_encryption_sessionless()
9828 tdata->ciphertext.data, in test_authenticated_encryption_sessionless()
9829 tdata->ciphertext.len, in test_authenticated_encryption_sessionless()
9834 tdata->auth_tag.data, in test_authenticated_encryption_sessionless()
9835 tdata->auth_tag.len, in test_authenticated_encryption_sessionless()
9851 const struct aead_test_data *tdata) in test_authenticated_decryption_sessionless() argument
9858 uint8_t key[tdata->key.len + 1]; in test_authenticated_decryption_sessionless()
9882 cap_idx.algo.aead = tdata->algo; in test_authenticated_decryption_sessionless()
9894 retval = create_aead_operation(RTE_CRYPTO_AEAD_OP_DECRYPT, tdata); in test_authenticated_decryption_sessionless()
9899 memcpy(key, tdata->key.data, tdata->key.len); in test_authenticated_decryption_sessionless()
9901 tdata->algo, in test_authenticated_decryption_sessionless()
9903 key, tdata->key.len, in test_authenticated_decryption_sessionless()
9904 tdata->aad.len, tdata->auth_tag.len, in test_authenticated_decryption_sessionless()
9905 tdata->iv.len); in test_authenticated_decryption_sessionless()
9932 debug_hexdump(stdout, "plaintext:", plaintext, tdata->ciphertext.len); in test_authenticated_decryption_sessionless()
9937 tdata->plaintext.data, in test_authenticated_decryption_sessionless()
9938 tdata->plaintext.len, in test_authenticated_decryption_sessionless()
10741 const struct gmac_test_data *tdata) in create_gmac_operation() argument
10747 uint32_t plaintext_pad_len = RTE_ALIGN_CEIL(tdata->plaintext.len, 16); in create_gmac_operation()
10758 ut_params->ibuf, tdata->gmac_tag.len); in create_gmac_operation()
10766 rte_memcpy(sym_op->auth.digest.data, tdata->gmac_tag.data, in create_gmac_operation()
10767 tdata->gmac_tag.len); in create_gmac_operation()
10770 tdata->gmac_tag.len); in create_gmac_operation()
10776 rte_memcpy(iv_ptr, tdata->iv.data, tdata->iv.len); in create_gmac_operation()
10778 debug_hexdump(stdout, "iv:", iv_ptr, tdata->iv.len); in create_gmac_operation()
10784 sym_op->auth.data.length = tdata->plaintext.len; in create_gmac_operation()
10791 const struct gmac_test_data *tdata, in create_gmac_operation_sgl() argument
10813 rte_memcpy(sym_op->auth.digest.data, tdata->gmac_tag.data, in create_gmac_operation_sgl()
10814 tdata->gmac_tag.len); in create_gmac_operation_sgl()
10817 tdata->gmac_tag.len); in create_gmac_operation_sgl()
10823 rte_memcpy(iv_ptr, tdata->iv.data, tdata->iv.len); in create_gmac_operation_sgl()
10825 debug_hexdump(stdout, "iv:", iv_ptr, tdata->iv.len); in create_gmac_operation_sgl()
10831 sym_op->auth.data.length = tdata->plaintext.len; in create_gmac_operation_sgl()
10837 const struct gmac_test_data *tdata, in create_gmac_session() argument
10840 uint8_t auth_key[tdata->key.len]; in create_gmac_session()
10845 memcpy(auth_key, tdata->key.data, tdata->key.len); in create_gmac_session()
10852 ut_params->auth_xform.auth.digest_length = tdata->gmac_tag.len; in create_gmac_session()
10853 ut_params->auth_xform.auth.key.length = tdata->key.len; in create_gmac_session()
10856 ut_params->auth_xform.auth.iv.length = tdata->iv.len; in create_gmac_session()
10872 test_AES_GMAC_authentication(const struct gmac_test_data *tdata) in test_AES_GMAC_authentication() argument
10892 TEST_ASSERT_NOT_EQUAL(tdata->gmac_tag.len, 0, in test_AES_GMAC_authentication()
10904 tdata, RTE_CRYPTO_AUTH_OP_GENERATE); in test_AES_GMAC_authentication()
10909 if (tdata->plaintext.len > MBUF_SIZE) in test_AES_GMAC_authentication()
10919 plaintext_pad_len = RTE_ALIGN_CEIL(tdata->plaintext.len, 16); in test_AES_GMAC_authentication()
10925 if (tdata->plaintext.len == GMAC_LARGE_PLAINTEXT_LENGTH) in test_AES_GMAC_authentication()
10926 generate_gmac_large_plaintext(tdata->plaintext.data); in test_AES_GMAC_authentication()
10932 memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len); in test_AES_GMAC_authentication()
10934 tdata->plaintext.len); in test_AES_GMAC_authentication()
10937 tdata); in test_AES_GMAC_authentication()
10967 debug_hexdump(stdout, "auth tag:", auth_tag, tdata->gmac_tag.len); in test_AES_GMAC_authentication()
10971 tdata->gmac_tag.data, in test_AES_GMAC_authentication()
10972 tdata->gmac_tag.len, in test_AES_GMAC_authentication()
11003 test_AES_GMAC_authentication_verify(const struct gmac_test_data *tdata) in test_AES_GMAC_authentication_verify() argument
11021 TEST_ASSERT_NOT_EQUAL(tdata->gmac_tag.len, 0, in test_AES_GMAC_authentication_verify()
11033 tdata, RTE_CRYPTO_AUTH_OP_VERIFY); in test_AES_GMAC_authentication_verify()
11038 if (tdata->plaintext.len > MBUF_SIZE) in test_AES_GMAC_authentication_verify()
11048 plaintext_pad_len = RTE_ALIGN_CEIL(tdata->plaintext.len, 16); in test_AES_GMAC_authentication_verify()
11055 if (tdata->plaintext.len == GMAC_LARGE_PLAINTEXT_LENGTH) in test_AES_GMAC_authentication_verify()
11056 generate_gmac_large_plaintext(tdata->plaintext.data); in test_AES_GMAC_authentication_verify()
11062 memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len); in test_AES_GMAC_authentication_verify()
11064 tdata->plaintext.len); in test_AES_GMAC_authentication_verify()
11067 tdata); in test_AES_GMAC_authentication_verify()
11119 test_AES_GMAC_authentication_SGL(const struct gmac_test_data *tdata, in test_AES_GMAC_authentication_SGL() argument
11134 TEST_ASSERT_NOT_EQUAL(tdata->gmac_tag.len, 0, in test_AES_GMAC_authentication_SGL()
11154 if (fragsz > tdata->plaintext.len) in test_AES_GMAC_authentication_SGL()
11155 fragsz = tdata->plaintext.len; in test_AES_GMAC_authentication_SGL()
11160 tdata, RTE_CRYPTO_AUTH_OP_GENERATE); in test_AES_GMAC_authentication_SGL()
11176 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_AES_GMAC_authentication_SGL()
11186 while (trn_data < tdata->plaintext.len) { in test_AES_GMAC_authentication_SGL()
11188 to_trn = (tdata->plaintext.len - trn_data < fragsz) ? in test_AES_GMAC_authentication_SGL()
11189 (tdata->plaintext.len - trn_data) : fragsz; in test_AES_GMAC_authentication_SGL()
11200 memcpy(plaintext, tdata->plaintext.data + trn_data, in test_AES_GMAC_authentication_SGL()
11203 if (trn_data == tdata->plaintext.len) in test_AES_GMAC_authentication_SGL()
11205 tdata->gmac_tag.len); in test_AES_GMAC_authentication_SGL()
11216 + tdata->gmac_tag.len); in test_AES_GMAC_authentication_SGL()
11218 tdata->plaintext.len); in test_AES_GMAC_authentication_SGL()
11222 tdata, digest_mem, digest_phys); in test_AES_GMAC_authentication_SGL()
11242 debug_hexdump(stdout, "auth tag:", auth_tag, tdata->gmac_tag.len); in test_AES_GMAC_authentication_SGL()
11245 tdata->gmac_tag.data, in test_AES_GMAC_authentication_SGL()
11246 tdata->gmac_tag.len, in test_AES_GMAC_authentication_SGL()
12251 const struct aead_test_data *tdata, in create_aead_operation_SGL() argument
12257 const unsigned int auth_tag_len = tdata->auth_tag.len; in create_aead_operation_SGL()
12258 const unsigned int iv_len = tdata->iv.len; in create_aead_operation_SGL()
12259 unsigned int aad_len = tdata->aad.len; in create_aead_operation_SGL()
12278 rte_memcpy(sym_op->aead.digest.data, tdata->auth_tag.data, in create_aead_operation_SGL()
12286 if (tdata->algo == RTE_CRYPTO_AEAD_AES_CCM) { in create_aead_operation_SGL()
12291 rte_memcpy(iv_ptr + 1, tdata->iv.data, iv_len); in create_aead_operation_SGL()
12304 rte_memcpy(sym_op->aead.aad.data, tdata->aad.data, aad_len); in create_aead_operation_SGL()
12313 rte_memcpy(iv_ptr, tdata->iv.data, iv_len); in create_aead_operation_SGL()
12325 rte_memcpy(sym_op->aead.aad.data, tdata->aad.data, aad_len); in create_aead_operation_SGL()
12332 sym_op->aead.data.length = tdata->plaintext.len; in create_aead_operation_SGL()
12341 test_authenticated_encryption_SGL(const struct aead_test_data *tdata, in test_authenticated_encryption_SGL() argument
12358 cap_idx.algo.aead = tdata->algo; in test_authenticated_encryption_SGL()
12370 unsigned int sgl_in = fragsz < tdata->plaintext.len; in test_authenticated_encryption_SGL()
12383 unsigned int sgl_in = fragsz < tdata->plaintext.len; in test_authenticated_encryption_SGL()
12385 tdata->plaintext.len; in test_authenticated_encryption_SGL()
12404 if (fragsz > tdata->plaintext.len) in test_authenticated_encryption_SGL()
12405 fragsz = tdata->plaintext.len; in test_authenticated_encryption_SGL()
12410 if (fragsz_oop > tdata->plaintext.len) in test_authenticated_encryption_SGL()
12411 frag_size_oop = tdata->plaintext.len; in test_authenticated_encryption_SGL()
12416 uint32_t prepend_len = RTE_ALIGN_CEIL(tdata->aad.len, 16); in test_authenticated_encryption_SGL()
12418 if (tdata->plaintext.len % fragsz != 0) { in test_authenticated_encryption_SGL()
12419 if (tdata->plaintext.len / fragsz + 1 > SGL_MAX_NO) in test_authenticated_encryption_SGL()
12422 if (tdata->plaintext.len / fragsz > SGL_MAX_NO) in test_authenticated_encryption_SGL()
12438 tdata->algo, in test_authenticated_encryption_SGL()
12440 tdata->key.data, tdata->key.len, in test_authenticated_encryption_SGL()
12441 tdata->aad.len, tdata->auth_tag.len, in test_authenticated_encryption_SGL()
12442 tdata->iv.len); in test_authenticated_encryption_SGL()
12455 memcpy(plaintext, tdata->plaintext.data, plaintext_len); in test_authenticated_encryption_SGL()
12465 while (trn_data < tdata->plaintext.len) { in test_authenticated_encryption_SGL()
12467 to_trn = (tdata->plaintext.len - trn_data < fragsz) ? in test_authenticated_encryption_SGL()
12468 (tdata->plaintext.len - trn_data) : fragsz; in test_authenticated_encryption_SGL()
12491 memcpy(plaintext, tdata->plaintext.data + trn_data, in test_authenticated_encryption_SGL()
12494 if (trn_data == tdata->plaintext.len) { in test_authenticated_encryption_SGL()
12498 tdata->auth_tag.len); in test_authenticated_encryption_SGL()
12501 tdata->auth_tag.len); in test_authenticated_encryption_SGL()
12514 if (frag_size_oop == tdata->plaintext.len) { in test_authenticated_encryption_SGL()
12516 tdata->auth_tag.len); in test_authenticated_encryption_SGL()
12520 tdata->plaintext.len + prepend_len); in test_authenticated_encryption_SGL()
12524 while (trn_data < tdata->plaintext.len) { in test_authenticated_encryption_SGL()
12527 (tdata->plaintext.len - trn_data < in test_authenticated_encryption_SGL()
12529 (tdata->plaintext.len - trn_data) : in test_authenticated_encryption_SGL()
12543 if (trn_data == tdata->plaintext.len) { in test_authenticated_encryption_SGL()
12545 tdata->auth_tag.len); in test_authenticated_encryption_SGL()
12562 + tdata->auth_tag.len); in test_authenticated_encryption_SGL()
12564 tdata->plaintext.len); in test_authenticated_encryption_SGL()
12569 tdata, digest_mem, digest_phys); in test_authenticated_encryption_SGL()
12608 tdata->ciphertext.data, in test_authenticated_encryption_SGL()
12625 tdata->ciphertext.data + off, in test_authenticated_encryption_SGL()
12636 tdata->auth_tag.data, in test_authenticated_encryption_SGL()
12637 tdata->auth_tag.len, in test_authenticated_encryption_SGL()