cryptodev: reorganize asymmetric structs
[dpdk.git] / app / test / test_cryptodev_security_ipsec_test_vectors.h
index b6d48ad..85cd6c5 100644 (file)
@@ -1062,4 +1062,94 @@ struct ipsec_test_data pkt_aes_128_gcm_frag = {
        },
 };
 
+struct ipsec_test_data pkt_null_aes_xcbc = {
+       .auth_key = {
+               .data = {
+                       0x61, 0x31, 0x62, 0x32, 0x63, 0x33, 0x64, 0x34,
+                       0x65, 0x35, 0x66, 0x36, 0x67, 0x37, 0x68, 0x38,
+               },
+       },
+       .input_text = {
+               .data = {
+                       /* IP */
+                       0x45, 0x00, 0x00, 0x2f, 0x49, 0x37, 0x00, 0x00,
+                       0x40, 0x11, 0x22, 0x84, 0x0d, 0x00, 0x00, 0x02,
+                       0x02, 0x00, 0x00, 0x02, 0x08, 0x00, 0x08, 0x00,
+                       0x00, 0x1b, 0x6d, 0x99, 0x58, 0x58, 0x58, 0x58,
+                       0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
+                       0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
+               },
+               .len = 47,
+       },
+       .output_text = {
+               .data = {
+                       /* IP */
+                       0x45, 0x00, 0x00, 0x5c, 0x06, 0x00, 0x00, 0x00,
+                       0x40, 0x32, 0x13, 0x6c, 0x0a, 0x00, 0x6f, 0x02,
+                       0x0a, 0x00, 0xde, 0x02,
+
+                       /* ESP */
+                       0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
+
+                       /* IP */
+                       0x45, 0x00, 0x00, 0x2f, 0x49, 0x37, 0x00, 0x00,
+                       0x40, 0x11, 0x22, 0x84, 0x0d, 0x00, 0x00, 0x02,
+                       0x02, 0x00, 0x00, 0x02, 0x08, 0x00, 0x08, 0x00,
+                       0x00, 0x1b, 0x6d, 0x99, 0x58, 0x58, 0x58, 0x58,
+                       0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
+                       0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,
+
+                       /* ESP trailer */
+                       0x01, 0x02, 0x03, 0x03, 0x04,
+
+                       /* ICV */
+                       0xf1, 0x52, 0x64, 0xd1, 0x9b, 0x62, 0x24, 0xdd,
+                       0xcc, 0x14, 0xf5, 0xc1,
+               },
+               .len = 92,
+       },
+       .ipsec_xform = {
+               .spi = 0x100,
+               .options.esn = 0,
+               .options.udp_encap = 0,
+               .options.copy_dscp = 0,
+               .options.copy_flabel = 0,
+               .options.copy_df = 0,
+               .options.dec_ttl = 0,
+               .options.ecn = 0,
+               .options.stats = 0,
+               .options.tunnel_hdr_verify = 0,
+               .options.ip_csum_enable = 0,
+               .options.l4_csum_enable = 0,
+               .direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS,
+               .proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
+               .mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
+               .tunnel.type = RTE_SECURITY_IPSEC_TUNNEL_IPV4,
+               .replay_win_sz = 0,
+       },
+       .aead = false,
+       .xform = {
+               .chain.cipher = {
+                       .next = NULL,
+                       .type = RTE_CRYPTO_SYM_XFORM_CIPHER,
+                       .cipher = {
+                               .op = RTE_CRYPTO_CIPHER_OP_ENCRYPT,
+                               .algo = RTE_CRYPTO_CIPHER_NULL,
+                               .key.length = 0,
+                               .iv.length = 0,
+                       },
+               },
+               .chain.auth = {
+                       .next = NULL,
+                       .type = RTE_CRYPTO_SYM_XFORM_AUTH,
+                       .auth = {
+                               .op = RTE_CRYPTO_AUTH_OP_GENERATE,
+                               .algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC,
+                               .key.length = 16,
+                               .digest_length = 12,
+                       },
+               },
+       },
+};
+
 #endif /* TEST_CRYPTODEV_SECURITY_IPSEC_TEST_VECTORS_H_ */