#define ROC_SE_FC_MINOR_OP_DECRYPT 0x1
#define ROC_SE_FC_MINOR_OP_HMAC_FIRST 0x10
-#define ROC_SE_MAJOR_OP_HASH 0x34
-#define ROC_SE_MAJOR_OP_HMAC 0x35
-#define ROC_SE_MAJOR_OP_ZUC_SNOW3G 0x37
-#define ROC_SE_MAJOR_OP_KASUMI 0x38
-#define ROC_SE_MAJOR_OP_MISC 0x01
+#define ROC_SE_MAJOR_OP_HASH 0x34
+#define ROC_SE_MAJOR_OP_HMAC 0x35
+#define ROC_SE_MAJOR_OP_PDCP 0x37
+#define ROC_SE_MAJOR_OP_KASUMI 0x38
+
+#define ROC_SE_MAJOR_OP_MISC 0x01
+#define ROC_SE_MISC_MINOR_OP_PASSTHROUGH 0x03
+#define ROC_SE_MISC_MINOR_OP_DUMMY 0x04
+#define ROC_SE_MISC_MINOR_OP_HW_SUPPORT 0x08
#define ROC_SE_MAX_AAD_SIZE 64
#define ROC_SE_MAX_MAC_LEN 64
ROC_SE_AES_256_BIT = 0x3
} roc_se_aes_type;
+typedef enum {
+ ROC_SE_PDCP_MAC_LEN_32_BIT = 0x1,
+ ROC_SE_PDCP_MAC_LEN_64_BIT = 0x2,
+ ROC_SE_PDCP_MAC_LEN_128_BIT = 0x3
+} roc_se_pdcp_mac_len_type;
+
struct roc_se_sglist_comp {
union {
uint64_t len;
struct roc_se_hmac_context hmac;
};
-struct roc_se_zuc_snow3g_ctx {
+struct roc_se_otk_zuc_ctx {
+ union {
+ uint64_t u64;
+ struct {
+ uint64_t rsvd_56 : 57;
+ uint64_t mac_len : 2;
+ uint64_t key_len : 2;
+ uint64_t lfsr_state : 1;
+ uint64_t alg_type : 2;
+ } s;
+ } w0;
+ uint8_t ci_key[32];
+ uint8_t encr_auth_iv[24];
+ uint8_t zuc_const[32];
+};
+
+struct roc_se_onk_zuc_ctx {
uint8_t encr_auth_iv[16];
uint8_t ci_key[16];
uint8_t zuc_const[32];
};
+struct roc_se_zuc_snow3g_ctx {
+ union {
+ struct roc_se_onk_zuc_ctx onk_ctx;
+ struct roc_se_otk_zuc_ctx otk_ctx;
+ } zuc;
+};
+
struct roc_se_kasumi_ctx {
uint8_t reg_A[8];
uint8_t ci_key[16];
void *auth_iv_buf;
struct roc_se_buf_ptr meta_buf;
struct roc_se_buf_ptr ctx_buf;
- uint64_t rsvd2;
+ uint32_t rsvd2;
+ uint8_t rsvd3;
+ uint8_t iv_ovr;
+ uint8_t cipher_iv_len;
+ uint8_t auth_iv_len;
/* 1st cache line */
struct roc_se_buf_ptr aad_buf __plt_cache_aligned;
roc_se_cipher_type type, const uint8_t *key,
uint16_t key_len, uint8_t *salt);
+void __roc_api roc_se_ctx_swap(struct roc_se_ctx *se_ctx);
#endif /* __ROC_SE_H__ */