From: David Coyle <david.coyle@intel.com>
To: akhil.goyal@nxp.com, declan.doherty@intel.com,
pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com,
roy.fan.zhang@intel.com, konstantin.ananyev@intel.com
Cc: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com,
brendan.ryan@intel.com, hemant.agrawal@nxp.com,
anoobj@marvell.com, ruifeng.wang@arm.com, lironh@marvell.com,
rnagadheeraj@marvell.com, jsrikanth@marvell.com, G.Singh@nxp.com,
jianjay.zhou@huawei.com, ravi1.kumar@amd.com,
bruce.richardson@intel.com, olivier.matz@6wind.com,
honnappa.nagarahalli@arm.com, stephen@networkplumber.org,
alexr@mellanox.com, jerinj@marvell.com,
David Coyle <david.coyle@intel.com>,
Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
Subject: [dpdk-dev] [PATCH v2 5/6] test/crypto: add DOCSIS security test cases
Date: Tue, 23 Jun 2020 11:14:22 +0100 [thread overview]
Message-ID: <20200623101423.9215-6-david.coyle@intel.com> (raw)
In-Reply-To: <20200623101423.9215-1-david.coyle@intel.com>
Add uplink and downlink DOCSIS unit test cases and vectors, to test
the combined DOCSIS Crypto-CRC support that has been added to the
rte_security and rte_cryptodev libraries.
Signed-off-by: David Coyle <david.coyle@intel.com>
Signed-off-by: Mairtin o Loingsigh <mairtin.oloingsigh@intel.com>
---
app/test/test_cryptodev.c | 552 ++++++
...t_cryptodev_security_docsis_test_vectors.h | 1544 +++++++++++++++++
2 files changed, 2096 insertions(+)
create mode 100644 app/test/test_cryptodev_security_docsis_test_vectors.h
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 8f631468b..59b12f596 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -11,6 +11,7 @@
#include <rte_memcpy.h>
#include <rte_pause.h>
#include <rte_bus_vdev.h>
+#include <rte_ether.h>
#include <rte_crypto.h>
#include <rte_cryptodev.h>
@@ -42,6 +43,7 @@
#ifdef RTE_LIBRTE_SECURITY
#include "test_cryptodev_security_pdcp_test_vectors.h"
#include "test_cryptodev_security_pdcp_test_func.h"
+#include "test_cryptodev_security_docsis_test_vectors.h"
#endif
#define VDEV_ARGS_SIZE 100
@@ -59,6 +61,9 @@ struct crypto_testsuite_params {
struct rte_mempool *mbuf_pool;
struct rte_mempool *large_mbuf_pool;
struct rte_mempool *op_mpool;
+#ifdef RTE_LIBRTE_SECURITY
+ struct rte_mempool *security_op_mpool;
+#endif
struct rte_mempool *session_mpool;
struct rte_mempool *session_priv_mpool;
struct rte_cryptodev_config conf;
@@ -72,6 +77,9 @@ struct crypto_unittest_params {
struct rte_crypto_sym_xform cipher_xform;
struct rte_crypto_sym_xform auth_xform;
struct rte_crypto_sym_xform aead_xform;
+#ifdef RTE_LIBRTE_SECURITY
+ struct rte_security_docsis_xform docsis_xform;
+#endif
union {
struct rte_cryptodev_sym_session *sess;
@@ -308,6 +316,19 @@ testsuite_setup(void)
return TEST_FAILED;
}
+#ifdef RTE_LIBRTE_SECURITY
+ ts_params->security_op_mpool = rte_crypto_op_pool_create(
+ "MBUF_SECURITY_OP_POOL",
+ RTE_CRYPTO_OP_TYPE_SECURITY,
+ NUM_MBUFS, MBUF_CACHE_SIZE,
+ MAXIMUM_IV_LENGTH,
+ rte_socket_id());
+ if (ts_params->security_op_mpool == NULL) {
+ RTE_LOG(ERR, USER1, "Can't create SECURITY_OP_POOL\n");
+ return TEST_FAILED;
+ }
+#endif
+
/* Create an AESNI MB device if required */
if (gbl_driver_id == rte_cryptodev_driver_id_get(
RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD))) {
@@ -7067,6 +7088,34 @@ test_authenticated_encryption(const struct aead_test_data *tdata)
}
#ifdef RTE_LIBRTE_SECURITY
+static int
+security_proto_supported(enum rte_security_session_protocol proto)
+{
+ struct crypto_testsuite_params *ts_params = &testsuite_params;
+
+ const struct rte_security_capability *capabilities;
+ const struct rte_security_capability *capability;
+ uint16_t i = 0;
+
+ struct rte_security_ctx *ctx = (struct rte_security_ctx *)
+ rte_cryptodev_get_sec_ctx(
+ ts_params->valid_devs[0]);
+
+
+ capabilities = rte_security_capabilities_get(ctx);
+
+ if (capabilities == NULL)
+ return -ENOTSUP;
+
+ while ((capability = &capabilities[i++])->action !=
+ RTE_SECURITY_ACTION_TYPE_NONE) {
+ if (capability->protocol == proto)
+ return 0;
+ }
+
+ return -ENOTSUP;
+}
+
/* Basic algorithm run function for async inplace mode.
* Creates a session from input parameters and runs one operation
* on input_vec. Checks the output of the crypto operation against
@@ -7670,6 +7719,9 @@ test_PDCP_PROTO_all(void)
if (!(feat_flags & RTE_CRYPTODEV_FF_SECURITY))
return -ENOTSUP;
+ if (security_proto_supported(RTE_SECURITY_PROTOCOL_PDCP) < 0)
+ return -ENOTSUP;
+
status = test_PDCP_PROTO_cplane_encap_all();
status += test_PDCP_PROTO_cplane_decap_all();
status += test_PDCP_PROTO_uplane_encap_all();
@@ -7684,6 +7736,504 @@ test_PDCP_PROTO_all(void)
else
return TEST_SUCCESS;
}
+
+static int
+test_docsis_proto_uplink(int i, struct docsis_test_data *d_td)
+{
+ struct rte_security_op *sec_op;
+ struct rte_security_docsis_op *doc_op;
+ struct crypto_testsuite_params *ts_params = &testsuite_params;
+ struct crypto_unittest_params *ut_params = &unittest_params;
+ uint8_t *plaintext, *ciphertext;
+ uint8_t *iv_ptr;
+ int cipher_len = 0;
+ int crc_len = 0, crc_data_len;
+ int ret = TEST_SUCCESS;
+
+ struct rte_security_ctx *ctx = (struct rte_security_ctx *)
+ rte_cryptodev_get_sec_ctx(
+ ts_params->valid_devs[0]);
+
+ /* Verify the capabilities */
+ struct rte_security_capability_idx sec_cap_idx;
+ const struct rte_security_capability *sec_cap;
+ const struct rte_cryptodev_capabilities *crypto_cap;
+ const struct rte_cryptodev_symmetric_capability *sym_cap;
+ int j = 0;
+
+ sec_cap_idx.action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL;
+ sec_cap_idx.protocol = RTE_SECURITY_PROTOCOL_DOCSIS;
+ sec_cap_idx.docsis.direction = RTE_SECURITY_DOCSIS_UPLINK;
+ sec_cap_idx.docsis.crc_size = RTE_ETHER_CRC_LEN;
+
+ sec_cap = rte_security_capability_get(ctx, &sec_cap_idx);
+ if (sec_cap == NULL)
+ return -ENOTSUP;
+
+ while ((crypto_cap = &sec_cap->crypto_capabilities[j++])->op !=
+ RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+ if (crypto_cap->op == RTE_CRYPTO_OP_TYPE_SYMMETRIC &&
+ crypto_cap->sym.xform_type ==
+ RTE_CRYPTO_SYM_XFORM_CIPHER &&
+ crypto_cap->sym.cipher.algo ==
+ RTE_CRYPTO_CIPHER_AES_DOCSISBPI) {
+ sym_cap = &crypto_cap->sym;
+ if (rte_cryptodev_sym_capability_check_cipher(sym_cap,
+ d_td->key.len,
+ d_td->iv.len) == 0)
+ break;
+ }
+ }
+
+ if (crypto_cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED)
+ return -ENOTSUP;
+
+ /* Setup source mbuf payload */
+ ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
+ memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0,
+ rte_pktmbuf_tailroom(ut_params->ibuf));
+
+ ciphertext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
+ d_td->ciphertext.len);
+
+ memcpy(ciphertext, d_td->ciphertext.data, d_td->ciphertext.len);
+
+ /* Set session action type */
+ ut_params->type = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL;
+
+ /* Setup cipher session parameters */
+ ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+ ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_DOCSISBPI;
+ ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_DECRYPT;
+ ut_params->cipher_xform.cipher.key.data = d_td->key.data;
+ ut_params->cipher_xform.cipher.key.length = d_td->key.len;
+ ut_params->cipher_xform.cipher.iv.length = d_td->iv.len;
+ ut_params->cipher_xform.cipher.iv.offset = sizeof(struct rte_crypto_op)
+ + sizeof(struct rte_security_op);
+ ut_params->cipher_xform.next = NULL;
+
+ /* Setup DOCSIS session parameters */
+ ut_params->docsis_xform.direction = RTE_SECURITY_DOCSIS_UPLINK;
+ ut_params->docsis_xform.crc_size = RTE_ETHER_CRC_LEN;
+
+ struct rte_security_session_conf sess_conf = {
+ .action_type = ut_params->type,
+ .protocol = RTE_SECURITY_PROTOCOL_DOCSIS,
+ .docsis = ut_params->docsis_xform,
+ .crypto_xform = &ut_params->cipher_xform,
+ };
+
+ /* Create security session */
+ ut_params->sec_session = rte_security_session_create(ctx, &sess_conf,
+ ts_params->session_priv_mpool);
+
+ if (!ut_params->sec_session) {
+ printf("TestCase %s(%d) line %d: %s\n",
+ __func__, i, __LINE__, "failed to allocate session");
+ ret = TEST_FAILED;
+ goto on_err;
+ }
+
+ /* Generate crypto op data structure */
+ ut_params->op = rte_crypto_op_alloc(ts_params->security_op_mpool,
+ RTE_CRYPTO_OP_TYPE_SECURITY);
+ if (!ut_params->op) {
+ printf("TestCase %s(%d) line %d: %s\n",
+ __func__, i, __LINE__,
+ "failed to allocate security crypto operation");
+ ret = TEST_FAILED;
+ goto on_err;
+ }
+
+ /* Populate DOCSIS security operation */
+ sec_op = (struct rte_security_op *)&ut_params->op->security;
+ sec_op->type = RTE_SECURITY_OP_TYPE_DOCSIS;
+ doc_op = &sec_op->docsis;
+
+ /* Setup CRC operation parameters */
+ crc_len = d_td->ciphertext.no_crc == false ?
+ (d_td->ciphertext.len -
+ d_td->ciphertext.crc_offset -
+ RTE_ETHER_CRC_LEN) :
+ 0;
+ crc_len = crc_len > 0 ? crc_len : 0;
+ crc_data_len = crc_len == 0 ? 0 : RTE_ETHER_CRC_LEN;
+ doc_op->crc.length = crc_len;
+ doc_op->crc.offset = d_td->ciphertext.crc_offset;
+
+ /* Setup cipher operation parameters */
+ cipher_len = d_td->ciphertext.no_cipher == false ?
+ (d_td->ciphertext.len -
+ d_td->ciphertext.cipher_offset) :
+ 0;
+ cipher_len = cipher_len > 0 ? cipher_len : 0;
+ doc_op->crypto_sym.cipher.data.length = cipher_len;
+ doc_op->crypto_sym.cipher.data.offset = d_td->ciphertext.cipher_offset;
+
+ /* Setup cipher IV */
+ iv_ptr = (uint8_t *)ut_params->op + sizeof(struct rte_crypto_op) +
+ sizeof(struct rte_security_op);
+ rte_memcpy(iv_ptr, d_td->iv.data, d_td->iv.len);
+
+ /* Attach session to operation */
+ rte_security_attach_session(ut_params->op, ut_params->sec_session);
+
+ /* Set crypto operation mbufs */
+ sec_op->docsis.crypto_sym.m_src = ut_params->ibuf;
+ sec_op->docsis.crypto_sym.m_dst = NULL;
+
+ /* Process crypto operation */
+ if (process_crypto_request(ts_params->valid_devs[0], ut_params->op) ==
+ NULL) {
+ printf("TestCase %s(%d) line %d: %s\n",
+ __func__, i, __LINE__,
+ "failed to process security crypto op");
+ ret = TEST_FAILED;
+ goto on_err;
+ }
+
+ if (ut_params->op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
+ printf("TestCase %s(%d) line %d: %s\n",
+ __func__, i, __LINE__, "crypto op processing failed");
+ ret = TEST_FAILED;
+ goto on_err;
+ }
+
+ /* Validate plaintext */
+ plaintext = ciphertext;
+
+ if (memcmp(plaintext, d_td->plaintext.data,
+ d_td->plaintext.len - crc_data_len)) {
+ printf("TestCase %s(%d) line %d: %s\n",
+ __func__, i, __LINE__, "plaintext not as expected\n");
+ rte_hexdump(stdout, "expected", d_td->plaintext.data,
+ d_td->plaintext.len);
+ rte_hexdump(stdout, "actual", plaintext, d_td->plaintext.len);
+ ret = TEST_FAILED;
+ goto on_err;
+ }
+
+on_err:
+ rte_crypto_op_free(ut_params->op);
+ ut_params->op = NULL;
+
+ if (ut_params->sec_session)
+ rte_security_session_destroy(ctx, ut_params->sec_session);
+ ut_params->sec_session = NULL;
+
+ rte_pktmbuf_free(ut_params->ibuf);
+ ut_params->ibuf = NULL;
+
+ return ret;
+}
+
+static int
+test_docsis_proto_downlink(int i, struct docsis_test_data *d_td)
+{
+ struct rte_security_op *sec_op;
+ struct rte_security_docsis_op *doc_op;
+ struct crypto_testsuite_params *ts_params = &testsuite_params;
+ struct crypto_unittest_params *ut_params = &unittest_params;
+ uint8_t *plaintext, *ciphertext;
+ uint8_t *iv_ptr;
+ int cipher_len = 0;
+ int crc_len = 0;
+ int ret = TEST_SUCCESS;
+
+ struct rte_security_ctx *ctx = (struct rte_security_ctx *)
+ rte_cryptodev_get_sec_ctx(
+ ts_params->valid_devs[0]);
+
+ /* Verify the capabilities */
+ struct rte_security_capability_idx sec_cap_idx;
+ const struct rte_security_capability *sec_cap;
+ const struct rte_cryptodev_capabilities *crypto_cap;
+ const struct rte_cryptodev_symmetric_capability *sym_cap;
+ int j = 0;
+
+ sec_cap_idx.action = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL;
+ sec_cap_idx.protocol = RTE_SECURITY_PROTOCOL_DOCSIS;
+ sec_cap_idx.docsis.direction = RTE_SECURITY_DOCSIS_DOWNLINK;
+ sec_cap_idx.docsis.crc_size = RTE_ETHER_CRC_LEN;
+
+ sec_cap = rte_security_capability_get(ctx, &sec_cap_idx);
+ if (sec_cap == NULL)
+ return -ENOTSUP;
+
+ while ((crypto_cap = &sec_cap->crypto_capabilities[j++])->op !=
+ RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+ if (crypto_cap->op == RTE_CRYPTO_OP_TYPE_SYMMETRIC &&
+ crypto_cap->sym.xform_type ==
+ RTE_CRYPTO_SYM_XFORM_CIPHER &&
+ crypto_cap->sym.cipher.algo ==
+ RTE_CRYPTO_CIPHER_AES_DOCSISBPI) {
+ sym_cap = &crypto_cap->sym;
+ if (rte_cryptodev_sym_capability_check_cipher(sym_cap,
+ d_td->key.len,
+ d_td->iv.len) == 0)
+ break;
+ }
+ }
+
+ if (crypto_cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED)
+ return -ENOTSUP;
+
+ /* Setup source mbuf payload */
+ ut_params->ibuf = rte_pktmbuf_alloc(ts_params->mbuf_pool);
+ memset(rte_pktmbuf_mtod(ut_params->ibuf, uint8_t *), 0,
+ rte_pktmbuf_tailroom(ut_params->ibuf));
+
+ plaintext = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
+ d_td->plaintext.len);
+
+ memcpy(plaintext, d_td->plaintext.data, d_td->plaintext.len);
+
+ /* Set session action type */
+ ut_params->type = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL;
+
+ /* Setup cipher session parameters */
+ ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+ ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_DOCSISBPI;
+ ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+ ut_params->cipher_xform.cipher.key.data = d_td->key.data;
+ ut_params->cipher_xform.cipher.key.length = d_td->key.len;
+ ut_params->cipher_xform.cipher.iv.length = d_td->iv.len;
+ ut_params->cipher_xform.cipher.iv.offset = sizeof(struct rte_crypto_op)
+ + sizeof(struct rte_security_op);
+ ut_params->cipher_xform.next = NULL;
+
+ /* Setup DOCSIS session parameters */
+ ut_params->docsis_xform.direction = RTE_SECURITY_DOCSIS_DOWNLINK;
+ ut_params->docsis_xform.crc_size = RTE_ETHER_CRC_LEN;
+
+ struct rte_security_session_conf sess_conf = {
+ .action_type = ut_params->type,
+ .protocol = RTE_SECURITY_PROTOCOL_DOCSIS,
+ .docsis = ut_params->docsis_xform,
+ .crypto_xform = &ut_params->cipher_xform,
+ };
+
+ /* Create security session */
+ ut_params->sec_session = rte_security_session_create(ctx, &sess_conf,
+ ts_params->session_priv_mpool);
+
+ if (!ut_params->sec_session) {
+ printf("TestCase %s(%d) line %d: %s\n",
+ __func__, i, __LINE__, "failed to allocate session");
+ ret = TEST_FAILED;
+ goto on_err;
+ }
+
+ /* Generate crypto op data structure */
+ ut_params->op = rte_crypto_op_alloc(ts_params->security_op_mpool,
+ RTE_CRYPTO_OP_TYPE_SECURITY);
+ if (!ut_params->op) {
+ printf("TestCase %s(%d) line %d: %s\n",
+ __func__, i, __LINE__,
+ "failed to allocate security crypto operation");
+ ret = TEST_FAILED;
+ goto on_err;
+ }
+
+ /* Populate DOCSIS security operation */
+ sec_op = (struct rte_security_op *)&ut_params->op->security;
+ sec_op->type = RTE_SECURITY_OP_TYPE_DOCSIS;
+ doc_op = &sec_op->docsis;
+
+ /* Setup CRC operation parameters */
+ crc_len = d_td->plaintext.no_crc == false ?
+ (d_td->plaintext.len -
+ d_td->plaintext.crc_offset -
+ RTE_ETHER_CRC_LEN) :
+ 0;
+ crc_len = crc_len > 0 ? crc_len : 0;
+ doc_op->crc.length = crc_len;
+ doc_op->crc.offset = d_td->plaintext.crc_offset;
+
+ /* Setup cipher operation parameters */
+ cipher_len = d_td->plaintext.no_cipher == false ?
+ (d_td->plaintext.len -
+ d_td->plaintext.cipher_offset) :
+ 0;
+ cipher_len = cipher_len > 0 ? cipher_len : 0;
+ doc_op->crypto_sym.cipher.data.length = cipher_len;
+ doc_op->crypto_sym.cipher.data.offset = d_td->plaintext.cipher_offset;
+
+ /* Setup cipher IV */
+ iv_ptr = (uint8_t *)ut_params->op + sizeof(struct rte_crypto_op) +
+ sizeof(struct rte_security_op);
+ rte_memcpy(iv_ptr, d_td->iv.data, d_td->iv.len);
+
+ /* Attach session to operation */
+ rte_security_attach_session(ut_params->op, ut_params->sec_session);
+
+ /* Set crypto operation mbufs */
+ sec_op->docsis.crypto_sym.m_src = ut_params->ibuf;
+ sec_op->docsis.crypto_sym.m_dst = NULL;
+
+ /* Process crypto operation */
+ if (process_crypto_request(ts_params->valid_devs[0], ut_params->op) ==
+ NULL) {
+ printf("TestCase %s(%d) line %d: %s\n",
+ __func__, i, __LINE__,
+ "failed to process security crypto op");
+ ret = TEST_FAILED;
+ goto on_err;
+ }
+
+ if (ut_params->op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
+ printf("TestCase %s(%d) line %d: %s\n",
+ __func__, i, __LINE__, "crypto op processing failed");
+ ret = TEST_FAILED;
+ goto on_err;
+ }
+
+ /* Validate ciphertext */
+ ciphertext = plaintext;
+
+ if (memcmp(ciphertext, d_td->ciphertext.data, d_td->ciphertext.len)) {
+ printf("TestCase %s(%d) line %d: %s\n",
+ __func__, i, __LINE__, "ciphertext not as expected\n");
+ rte_hexdump(stdout, "expected", d_td->ciphertext.data,
+ d_td->ciphertext.len);
+ rte_hexdump(stdout, "actual", ciphertext, d_td->ciphertext.len);
+ ret = TEST_FAILED;
+ goto on_err;
+ }
+
+on_err:
+ rte_crypto_op_free(ut_params->op);
+ ut_params->op = NULL;
+
+ if (ut_params->sec_session)
+ rte_security_session_destroy(ctx, ut_params->sec_session);
+ ut_params->sec_session = NULL;
+
+ rte_pktmbuf_free(ut_params->ibuf);
+ ut_params->ibuf = NULL;
+
+ return ret;
+}
+
+#define TEST_DOCSIS_COUNT(func) do { \
+ int ret = func; \
+ if (ret == TEST_SUCCESS) { \
+ printf("\t%2d)", n++); \
+ printf("+++++ PASSED:" #func"\n"); \
+ p++; \
+ } else if (ret == -ENOTSUP) { \
+ printf("\t%2d)", n++); \
+ printf("~~~~~ UNSUPP:" #func"\n"); \
+ u++; \
+ } else { \
+ printf("\t%2d)", n++); \
+ printf("----- FAILED:" #func"\n"); \
+ f++; \
+ } \
+} while (0)
+
+static int
+test_DOCSIS_PROTO_uplink_all(void)
+{
+ int p = 0, u = 0, f = 0, n = 0;
+
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(1, &docsis_test_case_1));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(2, &docsis_test_case_2));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(3, &docsis_test_case_3));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(4, &docsis_test_case_4));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(5, &docsis_test_case_5));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(6, &docsis_test_case_6));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(7, &docsis_test_case_7));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(8, &docsis_test_case_8));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(9, &docsis_test_case_9));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(10, &docsis_test_case_10));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(11, &docsis_test_case_11));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(12, &docsis_test_case_12));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(13, &docsis_test_case_13));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(14, &docsis_test_case_14));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(15, &docsis_test_case_15));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(16, &docsis_test_case_16));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(17, &docsis_test_case_17));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(18, &docsis_test_case_18));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(19, &docsis_test_case_19));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(20, &docsis_test_case_20));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(21, &docsis_test_case_21));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(22, &docsis_test_case_22));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(23, &docsis_test_case_23));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(24, &docsis_test_case_24));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(25, &docsis_test_case_25));
+ TEST_DOCSIS_COUNT(test_docsis_proto_uplink(26, &docsis_test_case_26));
+
+ if (f)
+ printf("## %s: %d passed out of %d (%d unsupported)\n",
+ __func__, p, n, u);
+
+ return f;
+};
+
+static int
+test_DOCSIS_PROTO_downlink_all(void)
+{
+ int p = 0, u = 0, f = 0, n = 0;
+
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(1, &docsis_test_case_1));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(2, &docsis_test_case_2));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(3, &docsis_test_case_3));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(4, &docsis_test_case_4));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(5, &docsis_test_case_5));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(6, &docsis_test_case_6));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(7, &docsis_test_case_7));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(8, &docsis_test_case_8));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(9, &docsis_test_case_9));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(10, &docsis_test_case_10));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(11, &docsis_test_case_11));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(12, &docsis_test_case_12));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(13, &docsis_test_case_13));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(14, &docsis_test_case_14));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(15, &docsis_test_case_15));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(16, &docsis_test_case_16));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(17, &docsis_test_case_17));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(18, &docsis_test_case_18));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(19, &docsis_test_case_19));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(20, &docsis_test_case_20));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(21, &docsis_test_case_21));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(22, &docsis_test_case_22));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(23, &docsis_test_case_23));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(24, &docsis_test_case_24));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(25, &docsis_test_case_25));
+ TEST_DOCSIS_COUNT(test_docsis_proto_downlink(26, &docsis_test_case_26));
+
+ if (f)
+ printf("## %s: %d passed out of %d (%d unsupported)\n",
+ __func__, p, n, u);
+
+ return f;
+};
+
+static int
+test_DOCSIS_PROTO_all(void)
+{
+ struct crypto_testsuite_params *ts_params = &testsuite_params;
+ struct rte_cryptodev_info dev_info;
+ int status;
+
+ rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
+ uint64_t feat_flags = dev_info.feature_flags;
+
+ if (!(feat_flags & RTE_CRYPTODEV_FF_SECURITY))
+ return -ENOTSUP;
+
+ if (security_proto_supported(RTE_SECURITY_PROTOCOL_DOCSIS) < 0)
+ return -ENOTSUP;
+
+ status = test_DOCSIS_PROTO_uplink_all();
+ status += test_DOCSIS_PROTO_downlink_all();
+
+ if (status)
+ return TEST_FAILED;
+ else
+ return TEST_SUCCESS;
+}
#endif
static int
@@ -12342,6 +12892,8 @@ static struct unit_test_suite cryptodev_testsuite = {
#ifdef RTE_LIBRTE_SECURITY
TEST_CASE_ST(ut_setup, ut_teardown,
test_PDCP_PROTO_all),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_DOCSIS_PROTO_all),
#endif
TEST_CASES_END() /**< NULL terminate unit test array */
}
diff --git a/app/test/test_cryptodev_security_docsis_test_vectors.h b/app/test/test_cryptodev_security_docsis_test_vectors.h
new file mode 100644
index 000000000..2ed57bd56
--- /dev/null
+++ b/app/test/test_cryptodev_security_docsis_test_vectors.h
@@ -0,0 +1,1544 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2020 Intel Corporation
+ */
+
+#ifndef TEST_CRYPTODEV_SECURITY_DOCSIS_TEST_VECTORS_H_
+#define TEST_CRYPTODEV_SECURITY_DOCSIS_TEST_VECTORS_H_
+
+/*
+ * DOCSIS test data and cases
+ * - encrypt direction: CRC-Crypto
+ * - decrypt direction: Crypto-CRC
+ */
+
+struct docsis_test_data {
+ struct {
+ uint8_t data[32];
+ unsigned int len;
+ } key;
+
+ struct {
+ uint8_t data[16] __rte_aligned(16);
+ unsigned int len;
+ } iv;
+
+ struct {
+ uint8_t data[1024];
+ unsigned int len;
+ unsigned int cipher_offset;
+ unsigned int crc_offset;
+ bool no_cipher;
+ bool no_crc;
+ } plaintext;
+
+ struct {
+ uint8_t data[1024];
+ unsigned int len;
+ unsigned int cipher_offset;
+ unsigned int crc_offset;
+ bool no_cipher;
+ bool no_crc;
+ } ciphertext;
+};
+
+struct docsis_test_data docsis_test_case_1 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x7A, 0xF0,
+ /* CRC */
+ 0x61, 0xF8, 0x63, 0x42
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_2 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 25,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x7A, 0xF0, 0xDF,
+ /* CRC */
+ 0xFE, 0x12, 0x99, 0xE5
+ },
+ .len = 25,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_3 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 34,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0xD6, 0xE2, 0x70, 0x5C,
+ 0xE6, 0x4D, 0xCC, 0x8C, 0x47, 0xB7, 0x09, 0xD6,
+ /* CRC */
+ 0x54, 0x85, 0xF8, 0x32
+ },
+ .len = 34,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_4 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 35,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x92, 0x6A, 0xC2, 0xDC,
+ 0xEE, 0x3B, 0x31, 0xEC, 0x03, 0xDE, 0x95, 0x33,
+ 0x5E,
+ /* CRC */
+ 0xFE, 0x47, 0x3E, 0x22
+ },
+ .len = 35,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_5 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 82,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x77, 0x74, 0x56, 0x05,
+ 0xD1, 0x14, 0xA2, 0x8D, 0x2C, 0x9A, 0x11, 0xFC,
+ 0x7D, 0xB0, 0xE7, 0x18, 0xCE, 0x75, 0x7C, 0x89,
+ 0x14, 0x56, 0xE2, 0xF2, 0xB7, 0x47, 0x08, 0x27,
+ 0xF7, 0x08, 0x7A, 0x13, 0x90, 0x81, 0x75, 0xB0,
+ 0xC7, 0x91, 0x04, 0x83, 0xAD, 0x11, 0x46, 0x46,
+ 0xF8, 0x54, 0x87, 0xA0, 0x42, 0xF3, 0x71, 0xA9,
+ 0x8A, 0xCD, 0x59, 0x77, 0x67, 0x11, 0x1A, 0x87,
+ /* CRC */
+ 0xAB, 0xED, 0x2C, 0x26
+ },
+ .len = 82,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_6 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x77, 0x74, 0x56, 0x05,
+ 0xD1, 0x14, 0xA2, 0x8D, 0x2C, 0x9A, 0x11, 0xFC,
+ 0x7D, 0xB0, 0xE7, 0x18, 0xCE, 0x75, 0x7C, 0x89,
+ 0x14, 0x56, 0xE2, 0xF2, 0xB7, 0x47, 0x08, 0x27,
+ 0xF7, 0x08, 0x7A, 0x13, 0x90, 0x81, 0x75, 0xB0,
+ 0xC7, 0x91, 0x04, 0x83, 0xAD, 0x11, 0x46, 0x46,
+ 0xF8, 0x54, 0x87, 0xA0, 0xA4, 0x0C, 0xC2, 0xF0,
+ 0x81, 0x49, 0xA8, 0xA6, 0x6C, 0x48, 0xEB, 0x1F,
+ 0x4B,
+ /* CRC */
+ 0x2F, 0xD4, 0x48, 0x18
+ },
+ .len = 83,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_7 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0x3B, 0x9F, 0x72, 0x4C, 0xB5, 0x72,
+ 0x3E, 0x56, 0x54, 0x49, 0x13, 0x53, 0xC4, 0xAA,
+ 0xCD, 0xEA, 0x6A, 0x88, 0x99, 0x07, 0x86, 0xF4,
+ 0xCF, 0x03, 0x4E, 0xDF, 0x65, 0x61, 0x47, 0x5B,
+ 0x2F, 0x81, 0x09, 0x12, 0x9A, 0xC2, 0x24, 0x8C,
+ 0x09,
+ /* CRC */
+ 0x11, 0xB4, 0x06, 0x33
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_8 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = true
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x7A, 0xF0,
+ /* CRC */
+ 0x8A, 0x0F, 0x74, 0xE8
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = true
+ }
+};
+
+struct docsis_test_data docsis_test_case_9 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = true
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0x3B, 0x9F, 0x72, 0x4C, 0xB5, 0x72,
+ 0x3E, 0x56, 0x54, 0x49, 0x13, 0x53, 0xC4, 0xAA,
+ 0xCD, 0xEA, 0x6A, 0x88, 0x99, 0x07, 0x86, 0xF4,
+ 0xCF, 0x03, 0x4E, 0xDF, 0x65, 0x61, 0x47, 0x5B,
+ 0x2F, 0x81, 0x09, 0x12, 0x9A, 0xC2, 0x24, 0x8C,
+ 0x09,
+ /* CRC */
+ 0x5D, 0x2B, 0x12, 0xF4
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = true
+ }
+};
+
+struct docsis_test_data docsis_test_case_10 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0x14, 0x08, 0xE8, 0x55
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_11 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xB3, 0x60, 0xEB, 0x38
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_12 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = true
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = true
+ }
+};
+
+struct docsis_test_data docsis_test_case_13 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 16
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = true
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = true
+ }
+};
+
+struct docsis_test_data docsis_test_case_14 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x6A, 0x86,
+ /* CRC */
+ 0x9B, 0xB3, 0x1A, 0x26
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_15 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 25,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x6A, 0x86, 0x25,
+ /* CRC */
+ 0xB5, 0x6B, 0xFD, 0xCB
+ },
+ .len = 25,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_16 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 34,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0xF6, 0xA1, 0x2E, 0x0A,
+ 0xBB, 0x27, 0x82, 0x4F, 0x99, 0x0A, 0xE2, 0x3F,
+ /* CRC */
+ 0xEB, 0xB7, 0x89, 0xB0
+ },
+ .len = 34,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_17 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 35,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0xE1, 0x30, 0x38, 0xC8,
+ 0xC4, 0x59, 0x8D, 0x43, 0x9A, 0xBE, 0xBE, 0x73,
+ 0xC3,
+ /*CRC */
+ 0x8C, 0xE1, 0x89, 0x8B
+ },
+ .len = 35,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_18 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 82,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0xE9, 0x12, 0x3B, 0x12,
+ 0x36, 0x56, 0x95, 0xA6, 0x97, 0xF1, 0x74, 0x68,
+ 0xBA, 0x58, 0x77, 0xEA, 0x43, 0x11, 0x85, 0xD4,
+ 0x7A, 0xF8, 0x1C, 0x11, 0x50, 0xD1, 0xF1, 0xBD,
+ 0x15, 0x4D, 0x99, 0xB5, 0x39, 0x74, 0x84, 0xDF,
+ 0xD4, 0x8B, 0xDC, 0xB7, 0x58, 0x1B, 0x22, 0xAB,
+ 0xF3, 0x29, 0xC6, 0xCB, 0x26, 0x07, 0x36, 0x6B,
+ 0x8C, 0xAC, 0x6E, 0x99, 0x37, 0x94, 0xDF, 0x31,
+ /* CRC */
+ 0xA1, 0x7D, 0x70, 0xBB
+ },
+ .len = 82,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_19 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0xE9, 0x12, 0x3B, 0x12,
+ 0x36, 0x56, 0x95, 0xA6, 0x97, 0xF1, 0x74, 0x68,
+ 0xBA, 0x58, 0x77, 0xEA, 0x43, 0x11, 0x85, 0xD4,
+ 0x7A, 0xF8, 0x1C, 0x11, 0x50, 0xD1, 0xF1, 0xBD,
+ 0x15, 0x4D, 0x99, 0xB5, 0x39, 0x74, 0x84, 0xDF,
+ 0xD4, 0x8B, 0xDC, 0xB7, 0x58, 0x1B, 0x22, 0xAB,
+ 0xF3, 0x29, 0xC6, 0xCB, 0x13, 0xED, 0x08, 0xF5,
+ 0x1B, 0x4B, 0xD8, 0x79, 0x93, 0x26, 0x69, 0x03,
+ 0x23,
+ /* CRC */
+ 0xC8, 0x8E, 0x02, 0x3A
+ },
+ .len = 83,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_20 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0x54, 0xB4, 0x55, 0x68, 0x06, 0xBF,
+ 0x00, 0x8B, 0x5F, 0x2C, 0x10, 0x4A, 0xBF, 0x5A,
+ 0xF2, 0x20, 0xD9, 0x77, 0x7F, 0x2D, 0x2B, 0x11,
+ 0xAC, 0xAF, 0x21, 0x36, 0xD2, 0xD4, 0x80, 0xF2,
+ 0x4F, 0x14, 0xA0, 0x3A, 0x66, 0xE5, 0xC5, 0xE2,
+ 0x15,
+ /* CRC */
+ 0x0C, 0x89, 0x76, 0x26
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_21 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = true
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x6A, 0x86,
+ /* CRC */
+ 0x70, 0x44, 0x0D, 0x8C
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = true
+ }
+};
+
+struct docsis_test_data docsis_test_case_22 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = true
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0x54, 0xB4, 0x55, 0x68, 0x06, 0xBF,
+ 0x00, 0x8B, 0x5F, 0x2C, 0x10, 0x4A, 0xBF, 0x5A,
+ 0xF2, 0x20, 0xD9, 0x77, 0x7F, 0x2D, 0x2B, 0x11,
+ 0xAC, 0xAF, 0x21, 0x36, 0xD2, 0xD4, 0x80, 0xF2,
+ 0x4F, 0x14, 0xA0, 0x3A, 0x66, 0xE5, 0xC5, 0xE2,
+ 0x15,
+ /* CRC */
+ 0x40, 0x16, 0x62, 0xE1
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = false,
+ .no_crc = true
+ }
+};
+
+struct docsis_test_data docsis_test_case_23 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0x14, 0x08, 0xE8, 0x55
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_24 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = false
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xB3, 0x60, 0xEB, 0x38
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = false
+ }
+};
+
+struct docsis_test_data docsis_test_case_25 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = true
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 24,
+ .cipher_offset = 18,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = true
+ }
+};
+
+struct docsis_test_data docsis_test_case_26 = {
+ .key = {
+ .data = {
+ 0x00, 0x00, 0x00, 0x00, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
+ 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD,
+ 0xEE, 0xFF, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55
+ },
+ .len = 32
+ },
+ .iv = {
+ .data = {
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
+ },
+ .len = 16
+ },
+ .plaintext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = true
+ },
+ .ciphertext = {
+ .data = {
+ /* DOCSIS header */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ /* Ethernet frame */
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x06, 0x05,
+ 0x04, 0x03, 0x02, 0x01, 0x08, 0x00, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+ 0xAA,
+ /* CRC */
+ 0xFF, 0xFF, 0xFF, 0xFF
+ },
+ .len = 83,
+ .cipher_offset = 40,
+ .crc_offset = 6,
+ .no_cipher = true,
+ .no_crc = true
+ }
+};
+
+#endif /* TEST_CRYPTODEV_SECURITY_DOCSIS_TEST_VECTORS_H_ */
--
2.17.1
next prev parent reply other threads:[~2020-06-23 10:37 UTC|newest]
Thread overview: 92+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-10 14:27 [dpdk-dev] [PATCH v3 0/4] add AESNI-MB rawdev for multi-function processing David Coyle
2020-04-10 14:27 ` [dpdk-dev] [PATCH v3 1/4] raw/common: add multi-function interface David Coyle
2020-04-10 14:27 ` [dpdk-dev] [PATCH v3 2/4] raw/aesni_mb_mfn: add aesni_mb_mfn raw device PMD David Coyle
2020-04-10 14:27 ` [dpdk-dev] [PATCH v3 3/4] test/rawdev: add aesni_mb_mfn raw device tests David Coyle
2020-04-10 14:27 ` [dpdk-dev] [PATCH v3 4/4] doc: update docs for aesni_mb_mfn raw device PMD David Coyle
2020-04-10 22:55 ` [dpdk-dev] [PATCH v3 0/4] add AESNI-MB rawdev for multi-function processing Thomas Monjalon
2020-04-14 10:21 ` Ferruh Yigit
2020-04-14 10:32 ` Thomas Monjalon
2020-04-14 13:04 ` Trahe, Fiona
2020-04-14 13:24 ` Thomas Monjalon
2020-04-14 14:02 ` Trahe, Fiona
2020-04-14 14:44 ` Thomas Monjalon
2020-04-15 22:19 ` Doherty, Declan
2020-04-15 22:33 ` Thomas Monjalon
2020-04-21 16:46 ` Doherty, Declan
2020-04-21 17:23 ` Coyle, David
2020-04-22 10:51 ` Akhil Goyal
2020-04-22 13:17 ` Coyle, David
2020-04-22 13:44 ` Akhil Goyal
2020-04-22 14:21 ` Coyle, David
2020-05-01 13:18 ` Zhang, Roy Fan
2020-05-12 17:32 ` Coyle, David
2020-04-22 14:01 ` Kevin Traynor
2020-04-22 14:41 ` Coyle, David
2020-04-21 17:25 ` Thomas Monjalon
2020-04-21 18:37 ` Coyle, David
2020-04-21 21:51 ` Thomas Monjalon
2020-06-04 15:13 ` [dpdk-dev] [PATCH 0/3] add support for DOCSIS protocol to security library David Coyle
2020-06-04 15:13 ` [dpdk-dev] [PATCH 1/3] security: add support for DOCSIS protocol David Coyle
2020-06-04 15:13 ` [dpdk-dev] [PATCH 2/3] cryptodev: add security operation to crypto operation David Coyle
2020-06-09 13:23 ` Ananyev, Konstantin
2020-06-09 13:50 ` Coyle, David
2020-06-10 10:40 ` Ananyev, Konstantin
2020-06-10 12:02 ` Coyle, David
2020-06-11 12:21 ` Ananyev, Konstantin
2020-06-11 14:01 ` Coyle, David
2020-06-23 18:38 ` Akhil Goyal
2020-06-24 14:11 ` Coyle, David
2020-06-04 15:13 ` [dpdk-dev] [PATCH 3/3] crypto/aesni_mb: add support for DOCSIS protocol David Coyle
2020-06-23 10:14 ` [dpdk-dev] [PATCH v2 0/6] " David Coyle
2020-06-23 10:14 ` [dpdk-dev] [PATCH v2 1/6] cryptodev: add security operation to crypto operation David Coyle
2020-06-23 10:14 ` [dpdk-dev] [PATCH v2 2/6] security: add support for DOCSIS protocol David Coyle
2020-06-23 17:29 ` De Lara Guarch, Pablo
2020-06-26 15:15 ` Coyle, David
2020-06-23 18:06 ` Akhil Goyal
2020-06-24 14:25 ` Coyle, David
2020-06-23 10:14 ` [dpdk-dev] [PATCH v2 3/6] crypto/aesni_mb: " David Coyle
2020-06-23 17:57 ` De Lara Guarch, Pablo
2020-06-26 15:13 ` Coyle, David
2020-06-23 10:14 ` [dpdk-dev] [PATCH v2 4/6] crypto/qat: " David Coyle
2020-06-23 10:14 ` David Coyle [this message]
2020-06-23 18:04 ` [dpdk-dev] [PATCH v2 5/6] test/crypto: add DOCSIS security test cases De Lara Guarch, Pablo
2020-06-26 15:14 ` Coyle, David
2020-06-23 10:14 ` [dpdk-dev] [PATCH v2 6/6] test/security: add DOCSIS capability check tests David Coyle
2020-06-23 14:51 ` [dpdk-dev] [PATCH v2 0/6] add support for DOCSIS protocol David Marchand
2020-06-23 15:18 ` Coyle, David
2020-06-23 15:38 ` David Marchand
2020-06-23 15:56 ` Coyle, David
2020-06-23 16:22 ` David Marchand
2020-06-23 16:27 ` Coyle, David
2020-06-30 16:30 ` [dpdk-dev] [PATCH v3 0/8] " David Coyle
2020-06-30 16:30 ` [dpdk-dev] [PATCH v3 1/8] security: " David Coyle
2020-07-01 21:41 ` Akhil Goyal
2020-06-30 16:30 ` [dpdk-dev] [PATCH v3 2/8] cryptodev: add a note regarding DOCSIS protocol support David Coyle
2020-07-01 21:42 ` Akhil Goyal
2020-06-30 16:30 ` [dpdk-dev] [PATCH v3 3/8] crypto/aesni_mb: add support for DOCSIS protocol David Coyle
2020-07-01 17:04 ` Coyle, David
2020-06-30 16:30 ` [dpdk-dev] [PATCH v3 4/8] crypto/qat: " David Coyle
2020-07-01 17:04 ` Coyle, David
2020-06-30 16:30 ` [dpdk-dev] [PATCH v3 5/8] test/crypto: add DOCSIS security test cases David Coyle
2020-07-01 21:43 ` Akhil Goyal
2020-06-30 16:30 ` [dpdk-dev] [PATCH v3 6/8] test/security: add DOCSIS capability check tests David Coyle
2020-06-30 16:30 ` [dpdk-dev] [PATCH v3 7/8] app/crypto-perf: add support for DOCSIS protocol David Coyle
2020-07-01 21:44 ` Akhil Goyal
2020-06-30 16:30 ` [dpdk-dev] [PATCH v3 8/8] doc: add doc updates for DOCSIS security protocol David Coyle
2020-06-30 18:33 ` Akhil Goyal
2020-07-01 17:03 ` Coyle, David
2020-07-03 12:39 ` [dpdk-dev] [PATCH v4 0/7] add support for DOCSIS protocol David Coyle
2020-07-03 12:39 ` [dpdk-dev] [PATCH v4 1/7] security: " David Coyle
2020-07-03 17:50 ` De Lara Guarch, Pablo
2020-07-03 12:39 ` [dpdk-dev] [PATCH v4 2/7] cryptodev: add a note regarding DOCSIS protocol support David Coyle
2020-07-03 17:56 ` De Lara Guarch, Pablo
2020-07-03 12:39 ` [dpdk-dev] [PATCH v4 3/7] crypto/aesni_mb: add support for DOCSIS protocol David Coyle
2020-07-03 17:56 ` De Lara Guarch, Pablo
2020-07-04 19:55 ` Akhil Goyal
2020-07-03 12:39 ` [dpdk-dev] [PATCH v4 4/7] crypto/qat: " David Coyle
2020-07-03 12:39 ` [dpdk-dev] [PATCH v4 5/7] test/crypto: add DOCSIS security test cases David Coyle
2020-07-03 17:56 ` De Lara Guarch, Pablo
2020-07-03 12:39 ` [dpdk-dev] [PATCH v4 6/7] test/security: add DOCSIS capability check tests David Coyle
2020-07-03 12:39 ` [dpdk-dev] [PATCH v4 7/7] app/crypto-perf: add support for DOCSIS protocol David Coyle
2020-07-03 17:57 ` De Lara Guarch, Pablo
2020-07-04 19:54 ` [dpdk-dev] [PATCH v4 0/7] " Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200623101423.9215-6-david.coyle@intel.com \
--to=david.coyle@intel.com \
--cc=G.Singh@nxp.com \
--cc=akhil.goyal@nxp.com \
--cc=alexr@mellanox.com \
--cc=anoobj@marvell.com \
--cc=brendan.ryan@intel.com \
--cc=bruce.richardson@intel.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=fiona.trahe@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=jerinj@marvell.com \
--cc=jianjay.zhou@huawei.com \
--cc=jsrikanth@marvell.com \
--cc=konstantin.ananyev@intel.com \
--cc=lironh@marvell.com \
--cc=mairtin.oloingsigh@intel.com \
--cc=olivier.matz@6wind.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=ravi1.kumar@amd.com \
--cc=rnagadheeraj@marvell.com \
--cc=roy.fan.zhang@intel.com \
--cc=ruifeng.wang@arm.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.