@@ -6970,6 +6970,41 @@ test_snow3g_auth_cipher_part_digest_enc_oop_sgl(void)
OUT_OF_PLACE, 0);
}
+static int
+test_snow3g_auth_cipher_total_digest_enc_1(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_total_digest_encryption_1, IN_PLACE, 0);
+}
+
+static int
+test_snow3g_auth_cipher_total_digest_enc_2(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_total_digest_encryption_2, IN_PLACE, 0);
+}
+
+static int
+test_snow3g_auth_cipher_total_digest_enc_2_oop(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_total_digest_encryption_2, OUT_OF_PLACE, 0);
+}
+
+static int
+test_snow3g_auth_cipher_total_digest_enc_2_sgl(void)
+{
+ return test_snow3g_auth_cipher_sgl(
+ &snow3g_auth_cipher_total_digest_encryption_2, IN_PLACE, 0);
+}
+
+static int
+test_snow3g_auth_cipher_total_digest_enc_2_oop_sgl(void)
+{
+ return test_snow3g_auth_cipher_sgl(
+ &snow3g_auth_cipher_total_digest_encryption_2, OUT_OF_PLACE, 0);
+}
+
static int
test_snow3g_auth_cipher_verify_test_case_1(void)
{
@@ -7037,6 +7072,41 @@ test_snow3g_auth_cipher_verify_part_digest_enc_oop_sgl(void)
OUT_OF_PLACE, 1);
}
+static int
+test_snow3g_auth_cipher_verify_total_digest_enc_1(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_total_digest_encryption_1, IN_PLACE, 1);
+}
+
+static int
+test_snow3g_auth_cipher_verify_total_digest_enc_2(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_total_digest_encryption_2, IN_PLACE, 1);
+}
+
+static int
+test_snow3g_auth_cipher_verify_total_digest_enc_2_oop(void)
+{
+ return test_snow3g_auth_cipher(
+ &snow3g_auth_cipher_total_digest_encryption_2, OUT_OF_PLACE, 1);
+}
+
+static int
+test_snow3g_auth_cipher_verify_total_digest_enc_2_sgl(void)
+{
+ return test_snow3g_auth_cipher_sgl(
+ &snow3g_auth_cipher_total_digest_encryption_2, IN_PLACE, 1);
+}
+
+static int
+test_snow3g_auth_cipher_verify_total_digest_enc_2_oop_sgl(void)
+{
+ return test_snow3g_auth_cipher_sgl(
+ &snow3g_auth_cipher_total_digest_encryption_2, OUT_OF_PLACE, 1);
+}
+
static int
test_snow3g_auth_cipher_with_digest_test_case_1(void)
{
@@ -7262,6 +7332,20 @@ test_zuc_auth_cipher_test_case_1_oop_sgl(void)
&zuc_auth_cipher_test_case_1, OUT_OF_PLACE, 0);
}
+static int
+test_zuc_auth_cipher_test_case_2(void)
+{
+ return test_zuc_auth_cipher(
+ &zuc_auth_cipher_test_case_2, IN_PLACE, 0);
+}
+
+static int
+test_zuc_auth_cipher_test_case_2_oop(void)
+{
+ return test_zuc_auth_cipher(
+ &zuc_auth_cipher_test_case_2, OUT_OF_PLACE, 0);
+}
+
static int
test_zuc_auth_cipher_verify_test_case_1(void)
{
@@ -7290,6 +7374,20 @@ test_zuc_auth_cipher_verify_test_case_1_oop_sgl(void)
&zuc_auth_cipher_test_case_1, OUT_OF_PLACE, 1);
}
+static int
+test_zuc_auth_cipher_verify_test_case_2(void)
+{
+ return test_zuc_auth_cipher(
+ &zuc_auth_cipher_test_case_2, IN_PLACE, 1);
+}
+
+static int
+test_zuc_auth_cipher_verify_test_case_2_oop(void)
+{
+ return test_zuc_auth_cipher(
+ &zuc_auth_cipher_test_case_2, OUT_OF_PLACE, 1);
+}
+
static int
test_zuc256_encryption_test_case_1(void)
{
@@ -7779,6 +7877,20 @@ test_aes_cmac_aes_ctr_digest_enc_test_case_1_oop_sgl(void)
&auth_aes_cmac_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 0);
}
+static int
+test_aes_cmac_aes_ctr_digest_enc_test_case_2(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_aes_cmac_cipher_aes_ctr_test_case_2, IN_PLACE, 0);
+}
+
+static int
+test_aes_cmac_aes_ctr_digest_enc_test_case_2_oop(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_aes_cmac_cipher_aes_ctr_test_case_2, OUT_OF_PLACE, 0);
+}
+
static int
test_verify_aes_cmac_aes_ctr_digest_enc_test_case_1(void)
{
@@ -7786,6 +7898,13 @@ test_verify_aes_cmac_aes_ctr_digest_enc_test_case_1(void)
&auth_aes_cmac_cipher_aes_ctr_test_case_1, IN_PLACE, 1);
}
+static int
+test_verify_aes_cmac_aes_ctr_digest_enc_test_case_2(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_aes_cmac_cipher_aes_ctr_test_case_2, IN_PLACE, 1);
+}
+
static int
test_verify_aes_cmac_aes_ctr_digest_enc_test_case_1_oop(void)
{
@@ -7807,6 +7926,13 @@ test_verify_aes_cmac_aes_ctr_digest_enc_test_case_1_oop_sgl(void)
&auth_aes_cmac_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 1);
}
+static int
+test_verify_aes_cmac_aes_ctr_digest_enc_test_case_2_oop(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_aes_cmac_cipher_aes_ctr_test_case_2, OUT_OF_PLACE, 1);
+}
+
/** MIXED AUTH + CIPHER */
static int
@@ -7823,6 +7949,21 @@ test_verify_auth_zuc_cipher_snow_test_case_1(void)
&auth_zuc_cipher_snow_test_case_1, OUT_OF_PLACE, 1);
}
+static int
+test_auth_zuc_cipher_snow_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_zuc_cipher_snow_test_case_1, IN_PLACE, 0);
+}
+
+static int
+test_verify_auth_zuc_cipher_snow_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_zuc_cipher_snow_test_case_1, IN_PLACE, 1);
+}
+
+
static int
test_auth_aes_cmac_cipher_snow_test_case_1(void)
{
@@ -7837,6 +7978,20 @@ test_verify_auth_aes_cmac_cipher_snow_test_case_1(void)
&auth_aes_cmac_cipher_snow_test_case_1, OUT_OF_PLACE, 1);
}
+static int
+test_auth_aes_cmac_cipher_snow_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_aes_cmac_cipher_snow_test_case_1, IN_PLACE, 0);
+}
+
+static int
+test_verify_auth_aes_cmac_cipher_snow_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_aes_cmac_cipher_snow_test_case_1, IN_PLACE, 1);
+}
+
static int
test_auth_zuc_cipher_aes_ctr_test_case_1(void)
{
@@ -7851,6 +8006,20 @@ test_verify_auth_zuc_cipher_aes_ctr_test_case_1(void)
&auth_zuc_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 1);
}
+static int
+test_auth_zuc_cipher_aes_ctr_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_zuc_cipher_aes_ctr_test_case_1, IN_PLACE, 0);
+}
+
+static int
+test_verify_auth_zuc_cipher_aes_ctr_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_zuc_cipher_aes_ctr_test_case_1, IN_PLACE, 1);
+}
+
static int
test_auth_snow_cipher_aes_ctr_test_case_1(void)
{
@@ -7865,6 +8034,34 @@ test_verify_auth_snow_cipher_aes_ctr_test_case_1(void)
&auth_snow_cipher_aes_ctr_test_case_1, OUT_OF_PLACE, 1);
}
+static int
+test_auth_snow_cipher_aes_ctr_test_case_1_inplace_sgl(void)
+{
+ return test_mixed_auth_cipher_sgl(
+ &auth_snow_cipher_aes_ctr_test_case_1, IN_PLACE, 0);
+}
+
+static int
+test_auth_snow_cipher_aes_ctr_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_snow_cipher_aes_ctr_test_case_1, IN_PLACE, 0);
+}
+
+static int
+test_verify_auth_snow_cipher_aes_ctr_test_case_1_inplace_sgl(void)
+{
+ return test_mixed_auth_cipher_sgl(
+ &auth_snow_cipher_aes_ctr_test_case_1, IN_PLACE, 1);
+}
+
+static int
+test_verify_auth_snow_cipher_aes_ctr_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_snow_cipher_aes_ctr_test_case_1, IN_PLACE, 1);
+}
+
static int
test_auth_snow_cipher_zuc_test_case_1(void)
{
@@ -7879,6 +8076,20 @@ test_verify_auth_snow_cipher_zuc_test_case_1(void)
&auth_snow_cipher_zuc_test_case_1, OUT_OF_PLACE, 1);
}
+static int
+test_auth_snow_cipher_zuc_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_snow_cipher_zuc_test_case_1, IN_PLACE, 0);
+}
+
+static int
+test_verify_auth_snow_cipher_zuc_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_snow_cipher_zuc_test_case_1, IN_PLACE, 1);
+}
+
static int
test_auth_aes_cmac_cipher_zuc_test_case_1(void)
{
@@ -7892,6 +8103,19 @@ test_verify_auth_aes_cmac_cipher_zuc_test_case_1(void)
return test_mixed_auth_cipher(
&auth_aes_cmac_cipher_zuc_test_case_1, OUT_OF_PLACE, 1);
}
+static int
+test_auth_aes_cmac_cipher_zuc_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_aes_cmac_cipher_zuc_test_case_1, IN_PLACE, 0);
+}
+
+static int
+test_verify_auth_aes_cmac_cipher_zuc_test_case_1_inplace(void)
+{
+ return test_mixed_auth_cipher(
+ &auth_aes_cmac_cipher_zuc_test_case_1, IN_PLACE, 1);
+}
static int
test_auth_null_cipher_snow_test_case_1(void)
@@ -15796,6 +16020,16 @@ static struct unit_test_suite cryptodev_snow3g_testsuite = {
test_snow3g_auth_cipher_part_digest_enc_sgl),
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_auth_cipher_part_digest_enc_oop_sgl),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_total_digest_enc_1),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_total_digest_enc_2),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_total_digest_enc_2_oop),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_total_digest_enc_2_sgl),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_total_digest_enc_2_oop_sgl),
/** SNOW 3G decrypt (UEA2), then verify auth */
TEST_CASE_ST(ut_setup, ut_teardown,
@@ -15816,6 +16050,16 @@ static struct unit_test_suite cryptodev_snow3g_testsuite = {
test_snow3g_auth_cipher_verify_part_digest_enc_sgl),
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_auth_cipher_verify_part_digest_enc_oop_sgl),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_verify_total_digest_enc_1),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_verify_total_digest_enc_2),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_verify_total_digest_enc_2_oop),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_verify_total_digest_enc_2_sgl),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_snow3g_auth_cipher_verify_total_digest_enc_2_oop_sgl),
/** SNOW 3G decrypt only (UEA2) */
TEST_CASE_ST(ut_setup, ut_teardown,
@@ -15924,6 +16168,10 @@ static struct unit_test_suite cryptodev_zuc_testsuite = {
test_zuc_auth_cipher_test_case_1_sgl),
TEST_CASE_ST(ut_setup, ut_teardown,
test_zuc_auth_cipher_test_case_1_oop_sgl),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_zuc_auth_cipher_test_case_2),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_zuc_auth_cipher_test_case_2_oop),
/** ZUC decrypt (EEA3), then verify auth */
TEST_CASE_ST(ut_setup, ut_teardown,
@@ -15934,6 +16182,10 @@ static struct unit_test_suite cryptodev_zuc_testsuite = {
test_zuc_auth_cipher_verify_test_case_1_sgl),
TEST_CASE_ST(ut_setup, ut_teardown,
test_zuc_auth_cipher_verify_test_case_1_oop_sgl),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_zuc_auth_cipher_verify_test_case_2),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_zuc_auth_cipher_verify_test_case_2_oop),
/** ZUC-256 encrypt only **/
TEST_CASE_ST(ut_setup, ut_teardown,
@@ -16137,37 +16389,73 @@ static struct unit_test_suite cryptodev_mixed_cipher_hash_testsuite = {
test_verify_aes_cmac_aes_ctr_digest_enc_test_case_1_sgl),
TEST_CASE_ST(ut_setup, ut_teardown,
test_verify_aes_cmac_aes_ctr_digest_enc_test_case_1_oop_sgl),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_aes_cmac_aes_ctr_digest_enc_test_case_2),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_aes_cmac_aes_ctr_digest_enc_test_case_2_oop),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_verify_aes_cmac_aes_ctr_digest_enc_test_case_2),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_verify_aes_cmac_aes_ctr_digest_enc_test_case_2_oop),
/** AUTH ZUC + CIPHER SNOW3G */
TEST_CASE_ST(ut_setup, ut_teardown,
test_auth_zuc_cipher_snow_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
test_verify_auth_zuc_cipher_snow_test_case_1),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_auth_zuc_cipher_snow_test_case_1_inplace),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_verify_auth_zuc_cipher_snow_test_case_1_inplace),
/** AUTH AES CMAC + CIPHER SNOW3G */
TEST_CASE_ST(ut_setup, ut_teardown,
test_auth_aes_cmac_cipher_snow_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
test_verify_auth_aes_cmac_cipher_snow_test_case_1),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_auth_aes_cmac_cipher_snow_test_case_1_inplace),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_verify_auth_aes_cmac_cipher_snow_test_case_1_inplace),
/** AUTH ZUC + CIPHER AES CTR */
TEST_CASE_ST(ut_setup, ut_teardown,
test_auth_zuc_cipher_aes_ctr_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
test_verify_auth_zuc_cipher_aes_ctr_test_case_1),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_auth_zuc_cipher_aes_ctr_test_case_1_inplace),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_verify_auth_zuc_cipher_aes_ctr_test_case_1_inplace),
/** AUTH SNOW3G + CIPHER AES CTR */
TEST_CASE_ST(ut_setup, ut_teardown,
test_auth_snow_cipher_aes_ctr_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
test_verify_auth_snow_cipher_aes_ctr_test_case_1),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_auth_snow_cipher_aes_ctr_test_case_1_inplace),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_auth_snow_cipher_aes_ctr_test_case_1_inplace_sgl),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_verify_auth_snow_cipher_aes_ctr_test_case_1_inplace),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_verify_auth_snow_cipher_aes_ctr_test_case_1_inplace_sgl),
/** AUTH SNOW3G + CIPHER ZUC */
TEST_CASE_ST(ut_setup, ut_teardown,
test_auth_snow_cipher_zuc_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
test_verify_auth_snow_cipher_zuc_test_case_1),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_auth_snow_cipher_zuc_test_case_1_inplace),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_verify_auth_snow_cipher_zuc_test_case_1_inplace),
/** AUTH AES CMAC + CIPHER ZUC */
TEST_CASE_ST(ut_setup, ut_teardown,
test_auth_aes_cmac_cipher_zuc_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
test_verify_auth_aes_cmac_cipher_zuc_test_case_1),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_auth_aes_cmac_cipher_zuc_test_case_1_inplace),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_verify_auth_aes_cmac_cipher_zuc_test_case_1_inplace),
/** AUTH NULL + CIPHER SNOW3G */
TEST_CASE_ST(ut_setup, ut_teardown,
@@ -169,6 +169,200 @@ struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_aes_ctr_test_case_1 = {
}
};
+struct mixed_cipher_auth_test_data auth_aes_cmac_cipher_aes_ctr_test_case_2 = {
+ .auth_algo = RTE_CRYPTO_AUTH_AES_CMAC,
+ .auth_key = {
+ .data = {
+ 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
+ 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C
+ },
+ .len = 16,
+ },
+ .auth_iv = {
+ .data = {
+ },
+ .len = 0,
+ },
+ .auth = {
+ .len_bits = 512 << 3,
+ .offset_bits = 0,
+ },
+ .cipher_algo = RTE_CRYPTO_CIPHER_AES_CTR,
+ .cipher_key = {
+ .data = {
+ 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6,
+ 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C
+ },
+ .len = 16,
+ },
+ .cipher_iv = {
+ .data = {
+ 0xa9, 0x40, 0x59, 0xda, 0x50, 0x00, 0x00, 0x00,
+ 0x29, 0x40, 0x59, 0xda, 0x50, 0x00, 0x80, 0x00
+ },
+ .len = 16,
+ },
+ .cipher = {
+ .len_bits = 516 << 3,
+ .offset_bits = 0,
+ },
+ .plaintext = {
+ .data = {
+ 0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C,
+ 0x6F, 0x75, 0x73, 0x79, 0x20, 0x65, 0x61, 0x72,
+ 0x74, 0x68, 0x21, 0x20, 0x48, 0x65, 0x20, 0x77,
+ 0x6F, 0x6E, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20,
+ 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79,
+ 0x20, 0x70, 0x65, 0x6F, 0x70, 0x6C, 0x65, 0x20,
+ 0x77, 0x65, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73,
+ 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x20, 0x74,
+ 0x68, 0x61, 0x74, 0x20, 0x73, 0x61, 0x6D, 0x65,
+ 0x20, 0x6E, 0x69, 0x67, 0x68, 0x74, 0x20, 0x65,
+ 0x76, 0x65, 0x6E, 0x20, 0x69, 0x6E, 0x20, 0x68,
+ 0x69, 0x73, 0x20, 0x6F, 0x77, 0x6E, 0x20, 0x70,
+ 0x72, 0x6F, 0x73, 0x70, 0x65, 0x72, 0x6F, 0x75,
+ 0x73, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x72,
+ 0x79, 0x2C, 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D,
+ 0x61, 0x6E, 0x79, 0x20, 0x68, 0x6F, 0x6D, 0x65,
+ 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x73,
+ 0x68, 0x61, 0x6E, 0x74, 0x69, 0x65, 0x73, 0x2C,
+ 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E,
+ 0x79, 0x20, 0x68, 0x75, 0x73, 0x62, 0x61, 0x6E,
+ 0x64, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20,
+ 0x64, 0x72, 0x75, 0x6E, 0x6B, 0x20, 0x61, 0x6E,
+ 0x64, 0x20, 0x77, 0x69, 0x76, 0x65, 0x73, 0x20,
+ 0x73, 0x6F, 0x63, 0x6B, 0x65, 0x64, 0x2C, 0x20,
+ 0x61, 0x6E, 0x64, 0x20, 0x68, 0x6F, 0x77, 0x20,
+ 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63, 0x68, 0x69,
+ 0x6C, 0x64, 0x72, 0x65, 0x6E, 0x20, 0x77, 0x65,
+ 0x72, 0x65, 0x20, 0x62, 0x75, 0x6C, 0x6C, 0x69,
+ 0x65, 0x64, 0x2C, 0x20, 0x61, 0x62, 0x75, 0x73,
+ 0x65, 0x64, 0x2C, 0x20, 0x6F, 0x72, 0x20, 0x61,
+ 0x62, 0x61, 0x6E, 0x64, 0x6F, 0x6E, 0x65, 0x64,
+ 0x2E, 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61,
+ 0x6E, 0x79, 0x20, 0x66, 0x61, 0x6D, 0x69, 0x6C,
+ 0x69, 0x65, 0x73, 0x20, 0x68, 0x75, 0x6E, 0x67,
+ 0x65, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6F, 0x72,
+ 0x20, 0x66, 0x6F, 0x6F, 0x64, 0x20, 0x74, 0x68,
+ 0x65, 0x79, 0x20, 0x63, 0x6F, 0x75, 0x6C, 0x64,
+ 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x61, 0x66, 0x66,
+ 0x6F, 0x72, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x62,
+ 0x75, 0x79, 0x3F, 0x20, 0x48, 0x6F, 0x77, 0x20,
+ 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x68, 0x65, 0x61,
+ 0x72, 0x74, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65,
+ 0x20, 0x62, 0x72, 0x6F, 0x6B, 0x65, 0x6E, 0x3F,
+ 0x20, 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E,
+ 0x79, 0x20, 0x73, 0x75, 0x69, 0x63, 0x69, 0x64,
+ 0x65, 0x73, 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64,
+ 0x20, 0x74, 0x61, 0x6B, 0x65, 0x20, 0x70, 0x6C,
+ 0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74,
+ 0x20, 0x73, 0x61, 0x6D, 0x65, 0x20, 0x6E, 0x69,
+ 0x67, 0x68, 0x74, 0x2C, 0x20, 0x68, 0x6F, 0x77,
+ 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x70, 0x65,
+ 0x6F, 0x70, 0x6C, 0x65, 0x20, 0x77, 0x6F, 0x75,
+ 0x6C, 0x64, 0x20, 0x67, 0x6F, 0x20, 0x69, 0x6E,
+ 0x73, 0x61, 0x6E, 0x65, 0x3F, 0x20, 0x48, 0x6F,
+ 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x63,
+ 0x6F, 0x63, 0x6B, 0x72, 0x6F, 0x61, 0x63, 0x68,
+ 0x65, 0x73, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x6C,
+ 0x61, 0x6E, 0x64, 0x6C, 0x6F, 0x72, 0x64, 0x73,
+ 0x20, 0x77, 0x6F, 0x75, 0x6C, 0x64, 0x20, 0x74,
+ 0x72, 0x69, 0x75, 0x6D, 0x70, 0x68, 0x3F, 0x20,
+ 0x48, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79,
+ 0x20, 0x77, 0x69, 0x6E, 0x6E, 0x65, 0x72, 0x73,
+ 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x6C, 0x6F,
+ 0x73, 0x65, 0x72, 0x73, 0x2C, 0x20, 0x73, 0x75
+ },
+ .len_bits = 512 << 3,
+ },
+ .ciphertext = {
+ .data = {
+ 0xA5, 0xC3, 0xEC, 0xC5, 0x14, 0x36, 0xC8, 0x00,
+ 0x6E, 0xA6, 0xAD, 0xFB, 0x1C, 0x4F, 0x60, 0x6C,
+ 0x60, 0xC0, 0x9C, 0x00, 0xED, 0xC0, 0x2A, 0xD8,
+ 0x41, 0xD3, 0x44, 0x27, 0xE6, 0x1A, 0x6E, 0xB3,
+ 0x9C, 0x5E, 0x3C, 0x71, 0x19, 0x96, 0x13, 0xED,
+ 0x06, 0xCA, 0xFB, 0x74, 0x7C, 0x23, 0x3E, 0x54,
+ 0x49, 0xF1, 0x32, 0xA4, 0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46, 0x6A, 0x81, 0x02, 0x4D, 0x66, 0xA4, 0x65,
+ 0xCC, 0x33, 0xEC, 0x99, 0x14, 0x4D, 0x28, 0xAB,
+ 0xF6, 0xCB, 0x46, 0x13, 0x0C, 0x13, 0x74, 0x22,
+ 0x4A, 0x7B, 0x53, 0x2F, 0x11, 0x54, 0xAF, 0xD9,
+ 0x2D, 0x66, 0x98, 0x7E, 0x20, 0x57, 0x01, 0x4C,
+ 0xF7, 0x0C, 0xCB, 0x70, 0xFF, 0x3D, 0xC4, 0x5F,
+ 0x3A, 0xAE, 0xD9, 0xC6, 0x93, 0xFC, 0x2C, 0x23,
+ 0x4C, 0x43, 0x92, 0x9B, 0x92, 0x3E, 0x35, 0xB7,
+ 0x1E, 0x96, 0xED, 0xCC, 0x60, 0xDE, 0x2E, 0x19,
+ 0xB8, 0x24, 0x55, 0x1E, 0x52, 0xB9, 0x52, 0x3C,
+ 0xC0, 0x06, 0x74, 0xC0, 0xEE, 0xD1, 0xA1, 0x80,
+ 0x98, 0xE8, 0xDF, 0x0D, 0x8A, 0x44, 0xC2, 0x36,
+ 0x16, 0xCC, 0x03, 0x68, 0xD9, 0xC2, 0xCF, 0xE2,
+ 0x78, 0xBD, 0x1A, 0x31, 0x19, 0x5D, 0xE0, 0x6E,
+ 0x09, 0x6E, 0xD5, 0x17, 0xB8, 0xA8, 0xF4, 0xBE,
+ 0x2C, 0xD6, 0xD1, 0x04
+ },
+ .len_bits = 516 << 3,
+ },
+ .digest_enc = {
+ .data = {
+ 0x2C, 0xD6, 0xD1, 0x04
+ },
+ .len = 4,
+ .offset = 512,
+ },
+ .validDataLen = {
+ .len_bits = 516 << 3,
+ },
+ .validCipherLen = {
+ .len_bits = 516 << 3,
+ },
+ .validAuthLen = {
+ .len_bits = 512 << 3,
+ }
+};
+
struct mixed_cipher_auth_test_data auth_zuc_cipher_snow_test_case_1 = {
.auth_algo = RTE_CRYPTO_AUTH_ZUC_EIA3,
.auth_key = {
@@ -736,4 +736,141 @@ struct snow3g_test_data snow3g_auth_cipher_partial_digest_encryption = {
},
};
+struct snow3g_test_data snow3g_auth_cipher_total_digest_encryption_1 = {
+ .key = {
+ .data = {
+ 0xC7, 0x36, 0xC6, 0xAA, 0xB2, 0x2B, 0xFF, 0xF9,
+ 0x1E, 0x26, 0x98, 0xD2, 0xE2, 0x2A, 0xD5, 0x7E
+ },
+ .len = 16
+ },
+ .cipher_iv = {
+ .data = {
+ 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+ 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+ },
+ .len = 16
+ },
+ .auth_iv = {
+ .data = {
+ 0x14, 0x79, 0x3E, 0x41, 0x03, 0x97, 0xE8, 0xFD,
+ 0x94, 0x79, 0x3E, 0x41, 0x03, 0x97, 0x68, 0xFD
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ 0xD0, 0xA7, 0xD4, 0x63, 0xDF, 0x9F, 0xB2, 0xB2,
+ 0x78, 0x83, 0x3F, 0xA0, 0x2E, 0x23, 0x5A, 0xA1,
+ 0x72, 0xBD, 0x97, 0x0C, 0x14, 0x73, 0xE1, 0x29,
+ 0x07, 0xFB, 0x64, 0x8B, 0x65, 0x99, 0xAA, 0xA0,
+ 0xB2, 0x4A, 0x03, 0x86, 0x65, 0x42, 0x2B, 0x20,
+ 0xA4, 0x99, 0x27, 0x6A, 0x50, 0x42, 0x70, 0x09,
+ },
+ .len = 384
+ },
+ .ciphertext = {
+ .data = {
+ 0x95, 0x2E, 0x5A, 0xE1, 0x50, 0xB8, 0x59, 0x2A,
+ 0x9B, 0xA0, 0x38, 0xA9, 0x8E, 0x2F, 0xED, 0xAB,
+ 0xFD, 0xC8, 0x3B, 0x47, 0x46, 0x0B, 0x50, 0x16,
+ 0xEC, 0x88, 0x45, 0xB6, 0x05, 0xC7, 0x54, 0xF8,
+ 0xBD, 0x91, 0xAA, 0xB6, 0xA4, 0xDC, 0x64, 0xB4,
+ 0xCB, 0xEB, 0x97, 0x06, 0x3B, 0x3E, 0xB6, 0x66
+ },
+ .len = 384
+ },
+ .cipher = {
+ .len_bits = 384,
+ .offset_bits = 0
+ },
+ .auth = {
+ .len_bits = 352,
+ .offset_bits = 0
+ },
+ .digest = {
+ .data = {
+ 0x3B, 0x3E, 0xB6, 0x66
+ },
+ .len = 4,
+ .offset_bytes = 44
+ },
+ .validDataLenInBits = {
+ .len = 384
+ },
+ .validCipherLenInBits = {
+ .len = 384
+ },
+ .validAuthLenInBits = {
+ .len = 352
+ },
+};
+
+struct snow3g_test_data snow3g_auth_cipher_total_digest_encryption_2 = {
+ .key = {
+ .data = {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10
+
+ },
+ .len = 16
+ },
+ .cipher_iv = {
+ .data = {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+ },
+ .len = 16
+ },
+ .auth_iv = {
+ .data = {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A,
+ },
+ .len = 32 << 3
+ },
+ .ciphertext = {
+ .data = {
+ 0x5A, 0x5A, 0xE4, 0xAD, 0x29, 0xA2, 0x6A, 0xA6,
+ 0x20, 0x1D, 0xCD, 0x08, 0x50, 0xD6, 0xE6, 0x47,
+ 0xBC, 0x88, 0x08, 0x01, 0x17, 0xFA, 0x47, 0x5B,
+ 0x90, 0x40, 0xBA, 0x0C, 0xE7, 0x31, 0x5B, 0x79,
+ },
+ .len = 32 << 3
+ },
+ .cipher = {
+ .len_bits = 30 << 3,
+ .offset_bits = 2 << 3
+ },
+ .auth = {
+ .len_bits = 26 << 3,
+ .offset_bits = 2 << 3
+ },
+ .digest = {
+ .data = {
+ 0xE7, 0x31, 0x5B, 0x79
+ },
+ .len = 4,
+ .offset_bytes = 28
+ },
+ .validDataLenInBits = {
+ .len = 32 << 3
+ },
+ .validCipherLenInBits = {
+ .len = 30 << 3
+ },
+ .validAuthLenInBits = {
+ .len = 26 << 3
+ },
+};
+
#endif /* TEST_CRYPTODEV_SNOW3G_TEST_VECTORS_H_ */
@@ -1239,6 +1239,83 @@ struct wireless_test_data zuc_auth_cipher_test_case_1 = {
}
};
+struct wireless_test_data zuc_auth_cipher_test_case_2 = {
+ .key = {
+ .data = {
+ 0xE5, 0xBD, 0x3E, 0xA0, 0xEB, 0x55, 0xAD, 0xE8,
+ 0x66, 0xC6, 0xAC, 0x58, 0xBD, 0x54, 0x30, 0x2A
+ },
+ .len = 16
+ },
+ .cipher_iv = {
+ .data = {
+ 0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00,
+ 0x00, 0x05, 0x68, 0x23, 0xC4, 0x00, 0x00, 0x00
+ },
+ .len = 16
+ },
+ .auth_iv = {
+ .data = {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ 0x14, 0xA8, 0xEF, 0x69, 0x3D, 0x67, 0x85, 0x07,
+ 0xBB, 0xE7, 0x27, 0x0A, 0x7F, 0x67, 0xFF, 0x50,
+ 0x06, 0xC3, 0x52, 0x5B, 0x98, 0x07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xA0, 0x0D,
+ 0x98, 0x5E, 0xBA, 0xD8, 0x80, 0xD6, 0xF2, 0x38,
+ 0x5A, 0xEC, 0x5A, 0x35
+ },
+ .len = 800
+ },
+ .validDataLenInBits = {
+ .len = 800
+ },
+ .validCipherLenInBits = {
+ .len = 800
+ },
+ .validAuthLenInBits = {
+ .len = 96 << 3
+ },
+ .validCipherOffsetInBits = {
+ .len = 0
+ },
+ .digest = {
+ .data = { 0x5A, 0xEC, 0x5A, 0x35 },
+ .len = 4,
+ .offset_bytes = 96
+ }
+};
+
/** ZUC-256 vectors **/
static struct wireless_test_data zuc256_test_case_cipher_1 = {
.key = {