From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 05C8442B83; Tue, 23 May 2023 21:50:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CEE942D50; Tue, 23 May 2023 21:50:11 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1E5BF42D41 for ; Tue, 23 May 2023 21:50:09 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34NG9UwB021276; Tue, 23 May 2023 12:50:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=fn4peazSl08suzj1ZIVeKrR65mIJbO7e769hEUVlJhE=; b=F3nmn9+ZUnN/KAVapUuvGUfRbuUdKySpBjfT1UdDIdk+DOoc9ojcTnpkjJTU8aRDKMfB 1C3VXlJtuP77oCbHG7RsHQ8aBnMCiMpR6STm3PQdzYYKJjknR5w3xPvkmpqAy6mqulHq Slflorjsp0y6qo9s0JUHBK7gQbqjoLUhulB+a4Rj92Jzn2u3c4R/Yatn3t6URnU4vWbD v6SgC7VdFT/RXLqEoKKXsor3wMKfoG5y1XwkaxC4bStVgIk1URIri1Pzg8i4jDlKo9Ui 3ESej3m4aJv0fdPIldsGRM8mZrQ/uWEGzZ/9i7NWBA6az9rMD9EH/xXxIEdrFrj9RzBt zw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3qpwqk30v6-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 23 May 2023 12:50:05 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 23 May 2023 12:50:03 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 23 May 2023 12:50:03 -0700 Received: from localhost.localdomain (unknown [10.28.36.102]) by maili.marvell.com (Postfix) with ESMTP id 57FB33F70A9; Tue, 23 May 2023 12:50:00 -0700 (PDT) From: Akhil Goyal To: , Akhil Goyal CC: , , , , , , , , Subject: [PATCH 04/13] test/security: add MACsec integrity cases Date: Wed, 24 May 2023 01:19:09 +0530 Message-ID: <20230523194918.1940212-5-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230523194918.1940212-1-gakhil@marvell.com> References: <20220928124516.93050-5-gakhil@marvell.com> <20230523194918.1940212-1-gakhil@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: 22RdsP3Ao5omNPZ-Y7zOl6XpeNXJFhlW X-Proofpoint-GUID: 22RdsP3Ao5omNPZ-Y7zOl6XpeNXJFhlW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-23_12,2023-05-23_02,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Added test vectors and test cases to verify auth_only/verify_only and encap-decap/auth-verify to verify the complete TX-RX path using the loopback mode of ethdev. Signed-off-by: Akhil Goyal --- app/test/test_security_inline_macsec.c | 153 +++ .../test_security_inline_macsec_vectors.h | 995 ++++++++++++++++++ 2 files changed, 1148 insertions(+) diff --git a/app/test/test_security_inline_macsec.c b/app/test/test_security_inline_macsec.c index 22a54dd65b..9047b7adff 100644 --- a/app/test/test_security_inline_macsec.c +++ b/app/test/test_security_inline_macsec.c @@ -937,6 +937,143 @@ test_inline_macsec_decap_all(const void *data __rte_unused) return all_err; } +static int +test_inline_macsec_auth_only_all(const void *data __rte_unused) +{ + const struct mcs_test_vector *cur_td; + struct mcs_test_opts opts = {0}; + int err, all_err = 0; + int i, size; + + opts.val_frames = RTE_SECURITY_MACSEC_VALIDATE_STRICT; + opts.protect_frames = true; + opts.sa_in_use = 1; + opts.nb_td = 1; + opts.sectag_insert_mode = 1; + opts.mtu = RTE_ETHER_MTU; + + size = (sizeof(list_mcs_integrity_vectors) / sizeof((list_mcs_integrity_vectors)[0])); + + for (i = 0; i < size; i++) { + cur_td = &list_mcs_integrity_vectors[i]; + err = test_macsec(&cur_td, MCS_AUTH_ONLY, &opts); + if (err) { + printf("\nAuth Generate case %d failed", cur_td->test_idx); + err = -1; + } else { + printf("\nAuth Generate case %d Passed", cur_td->test_idx); + err = 0; + } + all_err += err; + } + printf("\n%s: Success: %d, Failure: %d\n", __func__, size + all_err, -all_err); + + return all_err; +} + +static int +test_inline_macsec_verify_only_all(const void *data __rte_unused) +{ + const struct mcs_test_vector *cur_td; + struct mcs_test_opts opts = {0}; + int err, all_err = 0; + int i, size; + + opts.val_frames = RTE_SECURITY_MACSEC_VALIDATE_STRICT; + opts.sa_in_use = 1; + opts.nb_td = 1; + opts.sectag_insert_mode = 1; + opts.mtu = RTE_ETHER_MTU; + + size = (sizeof(list_mcs_integrity_vectors) / sizeof((list_mcs_integrity_vectors)[0])); + + for (i = 0; i < size; i++) { + cur_td = &list_mcs_integrity_vectors[i]; + err = test_macsec(&cur_td, MCS_VERIFY_ONLY, &opts); + if (err) { + printf("\nAuth Verify case %d failed", cur_td->test_idx); + err = -1; + } else { + printf("\nAuth Verify case %d Passed", cur_td->test_idx); + err = 0; + } + all_err += err; + } + printf("\n%s: Success: %d, Failure: %d\n", __func__, size + all_err, -all_err); + + return all_err; +} + +static int +test_inline_macsec_encap_decap_all(const void *data __rte_unused) +{ + const struct mcs_test_vector *cur_td; + struct mcs_test_opts opts = {0}; + int err, all_err = 0; + int i, size; + + opts.val_frames = RTE_SECURITY_MACSEC_VALIDATE_STRICT; + opts.encrypt = true; + opts.protect_frames = true; + opts.sa_in_use = 1; + opts.nb_td = 1; + opts.sectag_insert_mode = 1; + opts.mtu = RTE_ETHER_MTU; + + size = (sizeof(list_mcs_cipher_vectors) / sizeof((list_mcs_cipher_vectors)[0])); + + for (i = 0; i < size; i++) { + cur_td = &list_mcs_cipher_vectors[i]; + err = test_macsec(&cur_td, MCS_ENCAP_DECAP, &opts); + if (err) { + printf("\nCipher Auth Encap-decap case %d failed", cur_td->test_idx); + err = -1; + } else { + printf("\nCipher Auth Encap-decap case %d Passed", cur_td->test_idx); + err = 0; + } + all_err += err; + } + printf("\n%s: Success: %d, Failure: %d\n", __func__, size + all_err, -all_err); + + return all_err; +} + + +static int +test_inline_macsec_auth_verify_all(const void *data __rte_unused) +{ + const struct mcs_test_vector *cur_td; + struct mcs_test_opts opts = {0}; + int err, all_err = 0; + int i, size; + + opts.val_frames = RTE_SECURITY_MACSEC_VALIDATE_STRICT; + opts.protect_frames = true; + opts.sa_in_use = 1; + opts.nb_td = 1; + opts.sectag_insert_mode = 1; + opts.mtu = RTE_ETHER_MTU; + + size = (sizeof(list_mcs_integrity_vectors) / sizeof((list_mcs_integrity_vectors)[0])); + + for (i = 0; i < size; i++) { + cur_td = &list_mcs_integrity_vectors[i]; + err = test_macsec(&cur_td, MCS_AUTH_VERIFY, &opts); + if (err) { + printf("\nAuth Generate + Verify case %d failed", cur_td->test_idx); + err = -1; + } else { + printf("\nAuth Generate + Verify case %d Passed", cur_td->test_idx); + err = 0; + } + all_err += err; + } + printf("\n%s: Success: %d, Failure: %d\n", __func__, size + all_err, -all_err); + + return all_err; +} + static int ut_setup_inline_macsec(void) { @@ -1090,6 +1227,22 @@ static struct unit_test_suite inline_macsec_testsuite = { "MACsec decap(De-cipher+verify) known vector", ut_setup_inline_macsec, ut_teardown_inline_macsec, test_inline_macsec_decap_all), + TEST_CASE_NAMED_ST( + "MACsec auth only known vector", + ut_setup_inline_macsec, ut_teardown_inline_macsec, + test_inline_macsec_auth_only_all), + TEST_CASE_NAMED_ST( + "MACsec verify only known vector", + ut_setup_inline_macsec, ut_teardown_inline_macsec, + test_inline_macsec_verify_only_all), + TEST_CASE_NAMED_ST( + "MACsec encap + decap known vector", + ut_setup_inline_macsec, ut_teardown_inline_macsec, + test_inline_macsec_encap_decap_all), + TEST_CASE_NAMED_ST( + "MACsec auth + verify known vector", + ut_setup_inline_macsec, ut_teardown_inline_macsec, + test_inline_macsec_auth_verify_all), TEST_CASES_END() /**< NULL terminate unit test array */ }, diff --git a/app/test/test_security_inline_macsec_vectors.h b/app/test/test_security_inline_macsec_vectors.h index 68bd485419..f6c668c281 100644 --- a/app/test/test_security_inline_macsec_vectors.h +++ b/app/test/test_security_inline_macsec_vectors.h @@ -1083,4 +1083,999 @@ static const struct mcs_test_vector list_mcs_cipher_vectors[] = { }, }; +static const struct mcs_test_vector list_mcs_integrity_vectors[] = { +/* gcm_128_54B_integrity */ +{ + .test_idx = 1, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_128, + .ssci = 0, + .xpn = 0, /* Most significant 32 bits */ + .salt = {0}, + .sa_key = { + .data = { + 0xAD, 0x7A, 0x2B, 0xD0, 0x3E, 0xAC, 0x83, 0x5A, + 0x6F, 0x62, 0x0F, 0xDC, 0xB5, 0x06, 0xB3, 0x45, + }, + .len = 16, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0xD6, 0x09, 0xB1, 0xF0, 0x56, 0x63, + /* MAC SA */ + 0x7A, 0x0D, 0x46, 0xDF, 0x99, 0x8D, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x00, 0x01, + }, + .len = 54, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0xD6, 0x09, 0xB1, 0xF0, 0x56, 0x63, + /* MAC SA */ + 0x7A, 0x0D, 0x46, 0xDF, 0x99, 0x8D, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x22, + /* SL */ + 0x2A, + /* PN */ + 0xB2, 0xC2, 0x84, 0x65, + /* SCI */ + 0x12, 0x15, 0x35, 0x24, 0xC0, 0x89, 0x5E, 0x81, + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x00, 0x01, + /* ICV */ + 0xF0, 0x94, 0x78, 0xA9, 0xB0, 0x90, 0x07, 0xD0, + 0x6F, 0x46, 0xE9, 0xB6, 0xA1, 0xDA, 0x25, 0xDD, + }, + .len = 86, + }, +}, +/* gcm_256_54B_integrity */ +{ + .test_idx = 2, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_256, + .ssci = 0, + .xpn = 0, /* Most significant 32 bits */ + .salt = {0}, + .sa_key = { + .data = { + 0xE3, 0xC0, 0x8A, 0x8F, 0x06, 0xC6, 0xE3, 0xAD, + 0x95, 0xA7, 0x05, 0x57, 0xB2, 0x3F, 0x75, 0x48, + 0x3C, 0xE3, 0x30, 0x21, 0xA9, 0xC7, 0x2B, 0x70, + 0x25, 0x66, 0x62, 0x04, 0xC6, 0x9C, 0x0B, 0x72, + }, + .len = 32, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0xD6, 0x09, 0xB1, 0xF0, 0x56, 0x63, + /* MAC SA */ + 0x7A, 0x0D, 0x46, 0xDF, 0x99, 0x8D, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x00, 0x01, + }, + .len = 54, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0xD6, 0x09, 0xB1, 0xF0, 0x56, 0x63, + /* MAC SA */ + 0x7A, 0x0D, 0x46, 0xDF, 0x99, 0x8D, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x22, + /* SL */ + 0x2A, + /* PN */ + 0xB2, 0xC2, 0x84, 0x65, + /* SCI */ + 0x12, 0x15, 0x35, 0x24, 0xC0, 0x89, 0x5E, 0x81, + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x00, 0x01, + /* ICV */ + 0x2F, 0x0B, 0xC5, 0xAF, 0x40, 0x9E, 0x06, 0xD6, + 0x09, 0xEA, 0x8B, 0x7D, 0x0F, 0xA5, 0xEA, 0x50, + }, + .len = 86, + }, +}, +/* gcm_128_xpn_54B_integrity */ +{ + .test_idx = 3, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_XPN_128, + .ssci = 0x7A30C118, + .xpn = 0xB0DF459C, /* Most significant 32 bits */ + .salt = { + 0xE6, 0x30, 0xE8, 0x1A, 0x48, 0xDE, 0x86, 0xA2, + 0x1C, 0x66, 0xFA, 0x6D, + }, + .sa_key = { + .data = { + 0xAD, 0x7A, 0x2B, 0xD0, 0x3E, 0xAC, 0x83, 0x5A, + 0x6F, 0x62, 0x0F, 0xDC, 0xB5, 0x06, 0xB3, 0x45, + }, + .len = 16, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0xD6, 0x09, 0xB1, 0xF0, 0x56, 0x63, + /* MAC SA */ + 0x7A, 0x0D, 0x46, 0xDF, 0x99, 0x8D, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x00, 0x01, + }, + .len = 54, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0xD6, 0x09, 0xB1, 0xF0, 0x56, 0x63, + /* MAC SA */ + 0x7A, 0x0D, 0x46, 0xDF, 0x99, 0x8D, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x22, + /* SL */ + 0x2A, + /* PN */ + 0xB2, 0xC2, 0x84, 0x65, + /* SCI */ + 0x12, 0x15, 0x35, 0x24, 0xC0, 0x89, 0x5E, 0x81, + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x00, 0x01, + /* ICV */ + 0x17, 0xFE, 0x19, 0x81, 0xEB, 0xDD, 0x4A, 0xFC, + 0x50, 0x62, 0x69, 0x7E, 0x8B, 0xAA, 0x0C, 0x23, + }, + .len = 86, + }, +}, +/* gcm_256_xpn_54B_integrity */ +{ + .test_idx = 4, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_XPN_256, + .ssci = 0x7A30C118, + .xpn = 0xB0DF459C, /* Most significant 32 bits */ + .salt = { + 0xE6, 0x30, 0xE8, 0x1A, 0x48, 0xDE, 0x86, 0xA2, + 0x1C, 0x66, 0xFA, 0x6D, + }, + .sa_key = { + .data = { + 0xE3, 0xC0, 0x8A, 0x8F, 0x06, 0xC6, 0xE3, 0xAD, + 0x95, 0xA7, 0x05, 0x57, 0xB2, 0x3F, 0x75, 0x48, + 0x3C, 0xE3, 0x30, 0x21, 0xA9, 0xC7, 0x2B, 0x70, + 0x25, 0x66, 0x62, 0x04, 0xC6, 0x9C, 0x0B, 0x72, + }, + .len = 32, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0xD6, 0x09, 0xB1, 0xF0, 0x56, 0x63, + /* MAC SA */ + 0x7A, 0x0D, 0x46, 0xDF, 0x99, 0x8D, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x00, 0x01, + }, + .len = 54, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0xD6, 0x09, 0xB1, 0xF0, 0x56, 0x63, + /* MAC SA */ + 0x7A, 0x0D, 0x46, 0xDF, 0x99, 0x8D, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x22, + /* SL */ + 0x2A, + /* PN */ + 0xB2, 0xC2, 0x84, 0x65, + /* SCI */ + 0x12, 0x15, 0x35, 0x24, 0xC0, 0x89, 0x5E, 0x81, + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x00, 0x01, + /* ICV */ + 0x4D, 0xBD, 0x2F, 0x6A, 0x75, 0x4A, 0x6C, 0xF7, + 0x28, 0xCC, 0x12, 0x9B, 0xA6, 0x93, 0x15, 0x77, + }, + .len = 86, + }, +}, +/* gcm_128_60B_integrity */ +{ + .test_idx = 5, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_128, + .ssci = 0, + .xpn = 0, /* Most significant 32 bits */ + .salt = {0}, + .sa_key = { + .data = { + 0x07, 0x1B, 0x11, 0x3B, 0x0C, 0xA7, 0x43, 0xFE, + 0xCC, 0xCF, 0x3D, 0x05, 0x1F, 0x73, 0x73, 0x82, + }, + .len = 16, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0xE2, 0x01, 0x06, 0xD7, 0xCD, 0x0D, + /* MAC SA */ + 0xF0, 0x76, 0x1E, 0x8D, 0xCD, 0x3D, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x00, 0x03, + }, + .len = 60, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0xE2, 0x01, 0x06, 0xD7, 0xCD, 0x0D, + /* MAC SA */ + 0xF0, 0x76, 0x1E, 0x8D, 0xCD, 0x3D, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x40, + /* SL */ + 0x00, + /* PN */ + 0x76, 0xD4, 0x57, 0xED, + /* SCI */ + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x00, 0x03, + /* ICV */ + 0x0C, 0x01, 0x7B, 0xC7, 0x3B, 0x22, 0x7D, 0xFC, + 0xC9, 0xBA, 0xFA, 0x1C, 0x41, 0xAC, 0xC3, 0x53, + }, + .len = 84, + }, +}, +/* gcm_256_60B_integrity */ +{ + .test_idx = 6, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_256, + .ssci = 0, + .xpn = 0, /* Most significant 32 bits */ + .salt = {0}, + .sa_key = { + .data = { + 0x69, 0x1D, 0x3E, 0xE9, 0x09, 0xD7, 0xF5, 0x41, + 0x67, 0xFD, 0x1C, 0xA0, 0xB5, 0xD7, 0x69, 0x08, + 0x1F, 0x2B, 0xDE, 0x1A, 0xEE, 0x65, 0x5F, 0xDB, + 0xAB, 0x80, 0xBD, 0x52, 0x95, 0xAE, 0x6B, 0xE7, + }, + .len = 32, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0xE2, 0x01, 0x06, 0xD7, 0xCD, 0x0D, + /* MAC SA */ + 0xF0, 0x76, 0x1E, 0x8D, 0xCD, 0x3D, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x00, 0x03, + }, + .len = 60, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0xE2, 0x01, 0x06, 0xD7, 0xCD, 0x0D, + /* MAC SA */ + 0xF0, 0x76, 0x1E, 0x8D, 0xCD, 0x3D, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x40, + /* SL */ + 0x00, + /* PN */ + 0x76, 0xD4, 0x57, 0xED, + /* SCI */ + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x00, 0x03, + /* ICV */ + 0x35, 0x21, 0x7C, 0x77, 0x4B, 0xBC, 0x31, 0xB6, + 0x31, 0x66, 0xBC, 0xF9, 0xD4, 0xAB, 0xED, 0x07, + }, + .len = 84, + }, +}, +/* gcm_128_xpn_60B_integrity */ +{ + .test_idx = 7, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_XPN_128, + .ssci = 0x7A30C118, + .xpn = 0xB0DF459C, /* Most significant 32 bits */ + .salt = { + 0xE6, 0x30, 0xE8, 0x1A, 0x48, 0xDE, 0x86, 0xA2, + 0x1C, 0x66, 0xFA, 0x6D, + }, + .sa_key = { + .data = { + 0x07, 0x1B, 0x11, 0x3B, 0x0C, 0xA7, 0x43, 0xFE, + 0xCC, 0xCF, 0x3D, 0x05, 0x1F, 0x73, 0x73, 0x82, + }, + .len = 16, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0xE2, 0x01, 0x06, 0xD7, 0xCD, 0x0D, + /* MAC SA */ + 0xF0, 0x76, 0x1E, 0x8D, 0xCD, 0x3D, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x00, 0x03, + }, + .len = 60, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0xE2, 0x01, 0x06, 0xD7, 0xCD, 0x0D, + /* MAC SA */ + 0xF0, 0x76, 0x1E, 0x8D, 0xCD, 0x3D, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x40, + /* SL */ + 0x00, + /* PN */ + 0x76, 0xD4, 0x57, 0xED, + /* SCI */ + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x00, 0x03, + /* ICV */ + 0xAB, 0xC4, 0x06, 0x85, 0xA3, 0xCF, 0x91, 0x1D, + 0x37, 0x87, 0xE4, 0x9D, 0xB6, 0xA7, 0x26, 0x5E, + }, + .len = 84, + }, +}, +/* gcm_256_xpn_60B_integrity */ +{ + .test_idx = 8, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_XPN_256, + .ssci = 0x7A30C118, + .xpn = 0xB0DF459C, /* Most significant 32 bits */ + .salt = { + 0xE6, 0x30, 0xE8, 0x1A, 0x48, 0xDE, 0x86, 0xA2, + 0x1C, 0x66, 0xFA, 0x6D, + }, + .sa_key = { + .data = { + 0x69, 0x1D, 0x3E, 0xE9, 0x09, 0xD7, 0xF5, 0x41, + 0x67, 0xFD, 0x1C, 0xA0, 0xB5, 0xD7, 0x69, 0x08, + 0x1F, 0x2B, 0xDE, 0x1A, 0xEE, 0x65, 0x5F, 0xDB, + 0xAB, 0x80, 0xBD, 0x52, 0x95, 0xAE, 0x6B, 0xE7, + }, + .len = 32, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0xE2, 0x01, 0x06, 0xD7, 0xCD, 0x0D, + /* MAC SA */ + 0xF0, 0x76, 0x1E, 0x8D, 0xCD, 0x3D, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x00, 0x03, + }, + .len = 60, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0xE2, 0x01, 0x06, 0xD7, 0xCD, 0x0D, + /* MAC SA */ + 0xF0, 0x76, 0x1E, 0x8D, 0xCD, 0x3D, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x40, + /* SL */ + 0x00, + /* PN */ + 0x76, 0xD4, 0x57, 0xED, + /* SCI */ + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x00, 0x03, + /* ICV */ + 0xAC, 0x21, 0x95, 0x7B, 0x83, 0x12, 0xAB, 0x3C, + 0x99, 0xAB, 0x46, 0x84, 0x98, 0x79, 0xC3, 0xF3, + }, + .len = 84, + }, +}, +/* gcm_128_65B_integrity */ +{ + .test_idx = 9, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_128, + .ssci = 0, + .xpn = 0, /* Most significant 32 bits */ + .salt = {0}, + .sa_key = { + .data = { + 0x01, 0x3F, 0xE0, 0x0B, 0x5F, 0x11, 0xBE, 0x7F, + 0x86, 0x6D, 0x0C, 0xBB, 0xC5, 0x5A, 0x7A, 0x90, + }, + .len = 16, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0x84, 0xC5, 0xD5, 0x13, 0xD2, 0xAA, + /* MAC SA */ + 0xF6, 0xE5, 0xBB, 0xD2, 0x72, 0x77, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x00, 0x05, + }, + .len = 65, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0x84, 0xC5, 0xD5, 0x13, 0xD2, 0xAA, + /* MAC SA */ + 0xF6, 0xE5, 0xBB, 0xD2, 0x72, 0x77, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x23, + /* SL */ + 0x00, + /* PN */ + 0x89, 0x32, 0xD6, 0x12, + /* SCI */ + 0x7C, 0xFD, 0xE9, 0xF9, 0xE3, 0x37, 0x24, 0xC6, + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x00, 0x05, + /* ICV */ + 0x21, 0x78, 0x67, 0xE5, 0x0C, 0x2D, 0xAD, 0x74, + 0xC2, 0x8C, 0x3B, 0x50, 0xAB, 0xDF, 0x69, 0x5A, + }, + .len = 97, + }, +}, +/* gcm_256_65B_integrity */ +{ + .test_idx = 10, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_256, + .ssci = 0, + .xpn = 0, /* Most significant 32 bits */ + .salt = {0}, + .sa_key = { + .data = { + 0x83, 0xC0, 0x93, 0xB5, 0x8D, 0xE7, 0xFF, 0xE1, + 0xC0, 0xDA, 0x92, 0x6A, 0xC4, 0x3F, 0xB3, 0x60, + 0x9A, 0xC1, 0xC8, 0x0F, 0xEE, 0x1B, 0x62, 0x44, + 0x97, 0xEF, 0x94, 0x2E, 0x2F, 0x79, 0xA8, 0x23, + }, + .len = 32, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0x84, 0xC5, 0xD5, 0x13, 0xD2, 0xAA, + /* MAC SA */ + 0xF6, 0xE5, 0xBB, 0xD2, 0x72, 0x77, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x00, 0x05, + }, + .len = 65, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0x84, 0xC5, 0xD5, 0x13, 0xD2, 0xAA, + /* MAC SA */ + 0xF6, 0xE5, 0xBB, 0xD2, 0x72, 0x77, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x23, + /* SL */ + 0x00, + /* PN */ + 0x89, 0x32, 0xD6, 0x12, + /* SCI */ + 0x7C, 0xFD, 0xE9, 0xF9, 0xE3, 0x37, 0x24, 0xC6, + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x00, 0x05, + /* ICV */ + 0x6E, 0xE1, 0x60, 0xE8, 0xFA, 0xEC, 0xA4, 0xB3, + 0x6C, 0x86, 0xB2, 0x34, 0x92, 0x0C, 0xA9, 0x75, + }, + .len = 97, + }, +}, +/* gcm_128_xpn_65B_integrity */ +{ + .test_idx = 11, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_XPN_128, + .ssci = 0x7A30C118, + .xpn = 0xB0DF459C, /* Most significant 32 bits */ + .salt = { + 0xE6, 0x30, 0xE8, 0x1A, 0x48, 0xDE, 0x86, 0xA2, + 0x1C, 0x66, 0xFA, 0x6D, + }, + .sa_key = { + .data = { + 0x01, 0x3F, 0xE0, 0x0B, 0x5F, 0x11, 0xBE, 0x7F, + 0x86, 0x6D, 0x0C, 0xBB, 0xC5, 0x5A, 0x7A, 0x90, + }, + .len = 16, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0x84, 0xC5, 0xD5, 0x13, 0xD2, 0xAA, + /* MAC SA */ + 0xF6, 0xE5, 0xBB, 0xD2, 0x72, 0x77, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x00, 0x05, + }, + .len = 65, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0x84, 0xC5, 0xD5, 0x13, 0xD2, 0xAA, + /* MAC SA */ + 0xF6, 0xE5, 0xBB, 0xD2, 0x72, 0x77, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x23, + /* SL */ + 0x00, + /* PN */ + 0x89, 0x32, 0xD6, 0x12, + /* SCI */ + 0x7C, 0xFD, 0xE9, 0xF9, 0xE3, 0x37, 0x24, 0xC6, + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x00, 0x05, + /* ICV */ + 0x67, 0x85, 0x59, 0xB7, 0xE5, 0x2D, 0xB0, 0x06, + 0x82, 0xE3, 0xB8, 0x30, 0x34, 0xCE, 0xBE, 0x59, + }, + .len = 97, + }, +}, +/* gcm_256_xpn_65B_integrity */ +{ + .test_idx = 12, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_XPN_256, + .ssci = 0x7A30C118, + .xpn = 0xB0DF459C, /* Most significant 32 bits */ + .salt = { + 0xE6, 0x30, 0xE8, 0x1A, 0x48, 0xDE, 0x86, 0xA2, + 0x1C, 0x66, 0xFA, 0x6D, + }, + .sa_key = { + .data = { + 0x83, 0xC0, 0x93, 0xB5, 0x8D, 0xE7, 0xFF, 0xE1, + 0xC0, 0xDA, 0x92, 0x6A, 0xC4, 0x3F, 0xB3, 0x60, + 0x9A, 0xC1, 0xC8, 0x0F, 0xEE, 0x1B, 0x62, 0x44, + 0x97, 0xEF, 0x94, 0x2E, 0x2F, 0x79, 0xA8, 0x23, + }, + .len = 32, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0x84, 0xC5, 0xD5, 0x13, 0xD2, 0xAA, + /* MAC SA */ + 0xF6, 0xE5, 0xBB, 0xD2, 0x72, 0x77, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x00, 0x05, + }, + .len = 65, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0x84, 0xC5, 0xD5, 0x13, 0xD2, 0xAA, + /* MAC SA */ + 0xF6, 0xE5, 0xBB, 0xD2, 0x72, 0x77, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x23, + /* SL */ + 0x00, + /* PN */ + 0x89, 0x32, 0xD6, 0x12, + /* SCI */ + 0x7C, 0xFD, 0xE9, 0xF9, 0xE3, 0x37, 0x24, 0xC6, + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x00, 0x05, + /* ICV */ + 0x84, 0xBA, 0xC8, 0xE5, 0x3D, 0x1E, 0xA3, 0x55, + 0xA5, 0xC7, 0xD3, 0x34, 0x84, 0x0A, 0xE9, 0x62, + }, + .len = 97, + }, +}, +/* gcm_128_79B_integrity */ +{ + .test_idx = 13, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_128, + .ssci = 0, + .xpn = 0, /* Most significant 32 bits */ + .salt = {0}, + .sa_key = { + .data = { + 0x88, 0xEE, 0x08, 0x7F, 0xD9, 0x5D, 0xA9, 0xFB, + 0xF6, 0x72, 0x5A, 0xA9, 0xD7, 0x57, 0xB0, 0xCD, + }, + .len = 16, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0x68, 0xF2, 0xE7, 0x76, 0x96, 0xCE, + /* MAC SA */ + 0x7A, 0xE8, 0xE2, 0xCA, 0x4E, 0xC5, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, + 0x4D, 0x00, 0x07, + }, + .len = 79, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0x68, 0xF2, 0xE7, 0x76, 0x96, 0xCE, + /* MAC SA */ + 0x7A, 0xE8, 0xE2, 0xCA, 0x4E, 0xC5, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x41, + /* SL */ + 0x00, + /* PN */ + 0x2E, 0x58, 0x49, 0x5C, + /* SCI */ + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, + 0x4D, 0x00, 0x07, + /* ICV */ + 0x07, 0x92, 0x2B, 0x8E, 0xBC, 0xF1, 0x0B, 0xB2, + 0x29, 0x75, 0x88, 0xCA, 0x4C, 0x61, 0x45, 0x23, + }, + .len = 103, + }, +}, +/* gcm_256_79B_integrity */ +{ + .test_idx = 14, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_256, + .ssci = 0, + .xpn = 0, /* Most significant 32 bits */ + .salt = {0}, + .sa_key = { + .data = { + 0x4C, 0x97, 0x3D, 0xBC, 0x73, 0x64, 0x62, 0x16, + 0x74, 0xF8, 0xB5, 0xB8, 0x9E, 0x5C, 0x15, 0x51, + 0x1F, 0xCE, 0xD9, 0x21, 0x64, 0x90, 0xFB, 0x1C, + 0x1A, 0x2C, 0xAA, 0x0F, 0xFE, 0x04, 0x07, 0xE5, + }, + .len = 32, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0x68, 0xF2, 0xE7, 0x76, 0x96, 0xCE, + /* MAC SA */ + 0x7A, 0xE8, 0xE2, 0xCA, 0x4E, 0xC5, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, + 0x4D, 0x00, 0x07, + }, + .len = 79, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0x68, 0xF2, 0xE7, 0x76, 0x96, 0xCE, + /* MAC SA */ + 0x7A, 0xE8, 0xE2, 0xCA, 0x4E, 0xC5, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x41, + /* SL */ + 0x00, + /* PN */ + 0x2E, 0x58, 0x49, 0x5C, + /* SCI */ + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, + 0x4D, 0x00, 0x07, + /* ICV */ + 0x00, 0xBD, 0xA1, 0xB7, 0xE8, 0x76, 0x08, 0xBC, + 0xBF, 0x47, 0x0F, 0x12, 0x15, 0x7F, 0x4C, 0x07, + }, + .len = 103, + }, +}, +/* gcm_128_xpn_79B_integrity */ +{ + .test_idx = 15, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_XPN_128, + .ssci = 0x7A30C118, + .xpn = 0xB0DF459C, /* Most significant 32 bits */ + .salt = { + 0xE6, 0x30, 0xE8, 0x1A, 0x48, 0xDE, 0x86, 0xA2, + 0x1C, 0x66, 0xFA, 0x6D, + }, + .sa_key = { + .data = { + 0x88, 0xEE, 0x08, 0x7F, 0xD9, 0x5D, 0xA9, 0xFB, + 0xF6, 0x72, 0x5A, 0xA9, 0xD7, 0x57, 0xB0, 0xCD, + }, + .len = 16, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0x68, 0xF2, 0xE7, 0x76, 0x96, 0xCE, + /* MAC SA */ + 0x7A, 0xE8, 0xE2, 0xCA, 0x4E, 0xC5, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, + 0x4D, 0x00, 0x07, + }, + .len = 79, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0x68, 0xF2, 0xE7, 0x76, 0x96, 0xCE, + /* MAC SA */ + 0x7A, 0xE8, 0xE2, 0xCA, 0x4E, 0xC5, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x41, + /* SL */ + 0x00, + /* PN */ + 0x2E, 0x58, 0x49, 0x5C, + /* SCI */ + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, + 0x4D, 0x00, 0x07, + /* ICV */ + 0xD0, 0xDC, 0x89, 0x6D, 0xC8, 0x37, 0x98, 0xA7, + 0x9F, 0x3C, 0x5A, 0x95, 0xBA, 0x3C, 0xDF, 0x9A, + }, + .len = 103, + }, +}, +/* gcm_256_xpn_79B_integrity */ +{ + .test_idx = 16, + .alg = RTE_SECURITY_MACSEC_ALG_GCM_XPN_256, + .ssci = 0x7A30C118, + .xpn = 0xB0DF459C, /* Most significant 32 bits */ + .salt = { + 0xE6, 0x30, 0xE8, 0x1A, 0x48, 0xDE, 0x86, 0xA2, + 0x1C, 0x66, 0xFA, 0x6D, + }, + .sa_key = { + .data = { + 0x4C, 0x97, 0x3D, 0xBC, 0x73, 0x64, 0x62, 0x16, + 0x74, 0xF8, 0xB5, 0xB8, 0x9E, 0x5C, 0x15, 0x51, + 0x1F, 0xCE, 0xD9, 0x21, 0x64, 0x90, 0xFB, 0x1C, + 0x1A, 0x2C, 0xAA, 0x0F, 0xFE, 0x04, 0x07, 0xE5, + }, + .len = 32, + }, + .plain_pkt = { + .data = {/* MAC DA */ + 0x68, 0xF2, 0xE7, 0x76, 0x96, 0xCE, + /* MAC SA */ + 0x7A, 0xE8, 0xE2, 0xCA, 0x4E, 0xC5, + /* User Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, + 0x4D, 0x00, 0x07, + }, + .len = 79, + }, + .secure_pkt = { + .data = {/* MAC DA */ + 0x68, 0xF2, 0xE7, 0x76, 0x96, 0xCE, + /* MAC SA */ + 0x7A, 0xE8, 0xE2, 0xCA, 0x4E, 0xC5, + /* MACsec EtherType */ + 0x88, 0xE5, + /* TCI and AN */ + 0x41, + /* SL */ + 0x00, + /* PN */ + 0x2E, 0x58, 0x49, 0x5C, + /* SCI */ + /* Secure Data */ + 0x08, 0x00, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, + 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, + 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, + 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, + 0x4D, 0x00, 0x07, + /* ICV */ + 0x04, 0x24, 0x9A, 0x20, 0x8A, 0x65, 0xB9, 0x6B, + 0x3F, 0x32, 0x63, 0x00, 0x4C, 0xFD, 0x86, 0x7D, + }, + .len = 103, + }, +}, +}; + #endif -- 2.25.1