Lines Matching refs:cipher

669 	cipher_xform = &xform->cipher;  in ccp_configure_session_cipher()
673 sess->cipher.dir = CCP_CIPHER_DIR_ENCRYPT; in ccp_configure_session_cipher()
675 sess->cipher.dir = CCP_CIPHER_DIR_DECRYPT; in ccp_configure_session_cipher()
678 sess->cipher.key_length = cipher_xform->key.length; in ccp_configure_session_cipher()
679 rte_memcpy(sess->cipher.key, cipher_xform->key.data, in ccp_configure_session_cipher()
688 sess->cipher.algo = CCP_CIPHER_ALGO_AES_CTR; in ccp_configure_session_cipher()
689 sess->cipher.um.aes_mode = CCP_AES_MODE_CTR; in ccp_configure_session_cipher()
690 sess->cipher.engine = CCP_ENGINE_AES; in ccp_configure_session_cipher()
693 sess->cipher.algo = CCP_CIPHER_ALGO_AES_CBC; in ccp_configure_session_cipher()
694 sess->cipher.um.aes_mode = CCP_AES_MODE_ECB; in ccp_configure_session_cipher()
695 sess->cipher.engine = CCP_ENGINE_AES; in ccp_configure_session_cipher()
698 sess->cipher.algo = CCP_CIPHER_ALGO_AES_CBC; in ccp_configure_session_cipher()
699 sess->cipher.um.aes_mode = CCP_AES_MODE_CBC; in ccp_configure_session_cipher()
700 sess->cipher.engine = CCP_ENGINE_AES; in ccp_configure_session_cipher()
703 sess->cipher.algo = CCP_CIPHER_ALGO_3DES_CBC; in ccp_configure_session_cipher()
704 sess->cipher.um.des_mode = CCP_DES_MODE_CBC; in ccp_configure_session_cipher()
705 sess->cipher.engine = CCP_ENGINE_3DES; in ccp_configure_session_cipher()
713 switch (sess->cipher.engine) { in ccp_configure_session_cipher()
715 if (sess->cipher.key_length == 16) in ccp_configure_session_cipher()
716 sess->cipher.ut.aes_type = CCP_AES_TYPE_128; in ccp_configure_session_cipher()
717 else if (sess->cipher.key_length == 24) in ccp_configure_session_cipher()
718 sess->cipher.ut.aes_type = CCP_AES_TYPE_192; in ccp_configure_session_cipher()
719 else if (sess->cipher.key_length == 32) in ccp_configure_session_cipher()
720 sess->cipher.ut.aes_type = CCP_AES_TYPE_256; in ccp_configure_session_cipher()
725 for (i = 0; i < sess->cipher.key_length ; i++) in ccp_configure_session_cipher()
726 sess->cipher.key_ccp[sess->cipher.key_length - i - 1] = in ccp_configure_session_cipher()
727 sess->cipher.key[i]; in ccp_configure_session_cipher()
730 if (sess->cipher.key_length == 16) in ccp_configure_session_cipher()
731 sess->cipher.ut.des_type = CCP_DES_TYPE_128; in ccp_configure_session_cipher()
732 else if (sess->cipher.key_length == 24) in ccp_configure_session_cipher()
733 sess->cipher.ut.des_type = CCP_DES_TYPE_192; in ccp_configure_session_cipher()
738 for (j = 0, x = 0; j < sess->cipher.key_length/8; j++, x += 8) in ccp_configure_session_cipher()
740 sess->cipher.key_ccp[(8 + x) - i - 1] = in ccp_configure_session_cipher()
741 sess->cipher.key[i + x]; in ccp_configure_session_cipher()
747 sess->cipher.nonce_phys = rte_mem_virt2phy(sess->cipher.nonce); in ccp_configure_session_cipher()
748 sess->cipher.key_phys = rte_mem_virt2phy(sess->cipher.key_ccp); in ccp_configure_session_cipher()
1113 sess->cipher.key_length = aead_xform->key.length; in ccp_configure_session_aead()
1114 rte_memcpy(sess->cipher.key, aead_xform->key.data, in ccp_configure_session_aead()
1118 sess->cipher.dir = CCP_CIPHER_DIR_ENCRYPT; in ccp_configure_session_aead()
1121 sess->cipher.dir = CCP_CIPHER_DIR_DECRYPT; in ccp_configure_session_aead()
1134 sess->cipher.algo = CCP_CIPHER_ALGO_AES_GCM; in ccp_configure_session_aead()
1135 sess->cipher.um.aes_mode = CCP_AES_MODE_GCTR; in ccp_configure_session_aead()
1136 sess->cipher.engine = CCP_ENGINE_AES; in ccp_configure_session_aead()
1137 if (sess->cipher.key_length == 16) in ccp_configure_session_aead()
1138 sess->cipher.ut.aes_type = CCP_AES_TYPE_128; in ccp_configure_session_aead()
1139 else if (sess->cipher.key_length == 24) in ccp_configure_session_aead()
1140 sess->cipher.ut.aes_type = CCP_AES_TYPE_192; in ccp_configure_session_aead()
1141 else if (sess->cipher.key_length == 32) in ccp_configure_session_aead()
1142 sess->cipher.ut.aes_type = CCP_AES_TYPE_256; in ccp_configure_session_aead()
1147 for (i = 0; i < sess->cipher.key_length; i++) in ccp_configure_session_aead()
1148 sess->cipher.key_ccp[sess->cipher.key_length - i - 1] = in ccp_configure_session_aead()
1149 sess->cipher.key[i]; in ccp_configure_session_aead()
1162 sess->cipher.nonce_phys = rte_mem_virt2phy(sess->cipher.nonce); in ccp_configure_session_aead()
1163 sess->cipher.key_phys = rte_mem_virt2phy(sess->cipher.key_ccp); in ccp_configure_session_aead()
1235 switch (session->cipher.algo) { in ccp_cipher_slot()
1254 session->cipher.algo); in ccp_cipher_slot()
2197 if (session->cipher.um.aes_mode != CCP_AES_MODE_ECB) { in ccp_perform_aes()
2198 if (session->cipher.um.aes_mode == CCP_AES_MODE_CTR) { in ccp_perform_aes()
2199 rte_memcpy(session->cipher.nonce + AES_BLOCK_SIZE, in ccp_perform_aes()
2201 pst.src_addr = (phys_addr_t)session->cipher.nonce_phys; in ccp_perform_aes()
2225 op->sym->cipher.data.offset); in ccp_perform_aes()
2228 op->sym->cipher.data.offset); in ccp_perform_aes()
2231 key_addr = session->cipher.key_phys; in ccp_perform_aes()
2238 CCP_AES_ENCRYPT(&function) = session->cipher.dir; in ccp_perform_aes()
2239 CCP_AES_MODE(&function) = session->cipher.um.aes_mode; in ccp_perform_aes()
2240 CCP_AES_TYPE(&function) = session->cipher.ut.aes_type; in ccp_perform_aes()
2243 CCP_CMD_LEN(desc) = op->sym->cipher.data.length; in ccp_perform_aes()
2257 if (session->cipher.um.aes_mode != CCP_AES_MODE_ECB) in ccp_perform_aes()
2284 switch (session->cipher.um.des_mode) { in ccp_perform_3des()
2307 op->sym->cipher.data.offset); in ccp_perform_3des()
2311 op->sym->cipher.data.offset); in ccp_perform_3des()
2315 key_addr = rte_mem_virt2phy(session->cipher.key_ccp); in ccp_perform_3des()
2331 CCP_DES_ENCRYPT(&function) = session->cipher.dir; in ccp_perform_3des()
2332 CCP_DES_MODE(&function) = session->cipher.um.des_mode; in ccp_perform_3des()
2333 CCP_DES_TYPE(&function) = session->cipher.ut.des_type; in ccp_perform_3des()
2336 CCP_CMD_LEN(desc) = op->sym->cipher.data.length; in ccp_perform_3des()
2350 if (session->cipher.um.des_mode) in ccp_perform_3des()
2386 key_addr = session->cipher.key_phys; in ccp_perform_aes_gcm()
2407 rte_memcpy(session->cipher.nonce + AES_BLOCK_SIZE, iv, in ccp_perform_aes_gcm()
2409 pst.src_addr = session->cipher.nonce_phys; in ccp_perform_aes_gcm()
2421 CCP_AES_TYPE(&function) = session->cipher.ut.aes_type; in ccp_perform_aes_gcm()
2452 CCP_AES_ENCRYPT(&function) = session->cipher.dir; in ccp_perform_aes_gcm()
2454 CCP_AES_TYPE(&function) = session->cipher.ut.aes_type; in ccp_perform_aes_gcm()
2493 pst.src_addr = session->cipher.nonce_phys; in ccp_perform_aes_gcm()
2505 CCP_AES_TYPE(&function) = session->cipher.ut.aes_type; in ccp_perform_aes_gcm()
2553 switch (session->cipher.algo) { in ccp_crypto_cipher()
2572 session->cipher.algo); in ccp_crypto_cipher()
2663 if (session->cipher.algo != CCP_CIPHER_ALGO_AES_GCM) { in ccp_crypto_aead()