.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
.tunnel.type = RTE_SECURITY_IPSEC_TUNNEL_IPV4,
.replay_win_sz = 0,
+ .esn.low = 1,
},
.aead = true,
},
};
+struct ipsec_test_data pkt_aes_128_gcm_frag = {
+ .key = {
+ .data = {
+ 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef,
+ 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef,
+ },
+ },
+ .input_text = {
+ .data = {
+ 0x45, 0x00, 0x00, 0x6e, 0x00, 0x01, 0x00, 0x17,
+ 0x40, 0x06, 0xed, 0x48, 0xc6, 0x12, 0x00, 0x00,
+ 0xc6, 0x12, 0x01, 0x05, 0x00, 0x14, 0x00, 0x50,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x50, 0x00, 0x00, 0x00, 0x55, 0x05, 0x00, 0x00,
+ 0x00, 0x01, 0x02, 0x03, 0xf2, 0xf6, 0xe9, 0x21,
+ 0xf9, 0xf2, 0xf6, 0xe9, 0x21, 0xf9, 0xf2, 0xf6,
+ 0xe9, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ },
+ .len = 110,
+ },
+ .output_text = {
+ .data = {
+ 0x45, 0x00, 0x00, 0xa4, 0x00, 0x01, 0x00, 0x00,
+ 0x40, 0x32, 0xf6, 0x0c, 0xc0, 0xa8, 0x01, 0x70,
+ 0xc0, 0xa8, 0x01, 0x5a, 0x00, 0x00, 0x00, 0x34,
+ 0x00, 0x00, 0x00, 0x01, 0x45, 0xad, 0xfe, 0x23,
+ 0x78, 0x56, 0x12, 0x00, 0x49, 0x26, 0xac, 0x4e,
+ 0x8d, 0xf3, 0x74, 0x26, 0x18, 0x3f, 0x65, 0x94,
+ 0x73, 0x2e, 0xe4, 0xcf, 0x84, 0x6d, 0x03, 0x8a,
+ 0x4c, 0xdd, 0x2d, 0xef, 0xcd, 0x9f, 0x84, 0x76,
+ 0x93, 0xe1, 0xee, 0x21, 0x92, 0x8b, 0xf7, 0x7a,
+ 0xb1, 0x6a, 0x7f, 0xd6, 0x10, 0x66, 0xdd, 0xa1,
+ 0x8b, 0x17, 0x56, 0x99, 0x9a, 0x40, 0xd0, 0x6b,
+ 0x2d, 0xe0, 0x55, 0x40, 0x2f, 0xb8, 0x38, 0xe3,
+ 0x08, 0x46, 0xe2, 0x69, 0xc9, 0xa1, 0x85, 0x9d,
+ 0x7b, 0xec, 0x33, 0x2a, 0x2d, 0x1d, 0x1f, 0x1a,
+ 0x9e, 0xf0, 0x1e, 0xc3, 0x33, 0x64, 0x35, 0x82,
+ 0xbb, 0xb5, 0x7a, 0x91, 0x2e, 0x8d, 0xd5, 0x5b,
+ 0x3a, 0xbe, 0x95, 0x94, 0xba, 0x40, 0x73, 0x4e,
+ 0xa4, 0x15, 0xe4, 0x4a, 0xf9, 0x14, 0x2c, 0x4f,
+ 0x63, 0x2e, 0x23, 0x6e, 0xeb, 0x06, 0xe7, 0x52,
+ 0xe1, 0xc7, 0x91, 0x7f, 0x19, 0xc0, 0x4a, 0xd2,
+ 0xd5, 0x3e, 0x84, 0xa8,
+ },
+ .len = 164,
+ },
+ .salt = {
+ .data = {
+ 0xde, 0xad, 0xbe, 0xef,
+ },
+ .len = 4,
+ },
+
+ .iv = {
+ .data = {
+ 0x45, 0xad, 0xfe, 0x23, 0x78, 0x56, 0x12, 0x00,
+ },
+ },
+
+ .ipsec_xform = {
+ .spi = 52,
+ .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 = true,
+
+ .xform = {
+ .aead = {
+ .next = NULL,
+ .type = RTE_CRYPTO_SYM_XFORM_AEAD,
+ .aead = {
+ .op = RTE_CRYPTO_AEAD_OP_ENCRYPT,
+ .algo = RTE_CRYPTO_AEAD_AES_GCM,
+ .key.length = 16,
+ .iv.length = 12,
+ .iv.offset = IV_OFFSET,
+ .digest_length = 16,
+ .aad_length = 12,
+ },
+ },
+ },
+};
+
+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_ */