SNOW 3G algorithm has all uppercase letters in its name
and a space between SNOW and 3G, but some references of it
had some lowercase letters or no space.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
- /* Create 2 Snow3G devices if required */
+ /* Create 2 SNOW 3G devices if required */
if (gbl_cryptodev_type == RTE_CRYPTODEV_SNOW3G_PMD) {
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_SNOW3G_PMD);
if (nb_devs < 2) {
if (gbl_cryptodev_type == RTE_CRYPTODEV_SNOW3G_PMD) {
nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_SNOW3G_PMD);
if (nb_devs < 2) {
-/* ***** Snow3G Tests ***** */
+/* ***** SNOW 3G Tests ***** */
static int
create_snow3g_kasumi_hash_session(uint8_t dev_id,
const uint8_t *key, const uint8_t key_len,
static int
create_snow3g_kasumi_hash_session(uint8_t dev_id,
const uint8_t *key, const uint8_t key_len,
* The cryptodev API calls out -
* - the array must be big enough to hold the AAD, plus any
* space to round this up to the nearest multiple of the
* The cryptodev API calls out -
* - the array must be big enough to hold the AAD, plus any
* space to round this up to the nearest multiple of the
- * block size (8 bytes for KASUMI and 16 bytes for SNOW3G).
+ * block size (8 bytes for KASUMI and 16 bytes for SNOW 3G).
*/
if (algo == RTE_CRYPTO_AUTH_KASUMI_F9)
aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 8);
*/
if (algo == RTE_CRYPTO_AUTH_KASUMI_F9)
aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 8);
* The cryptodev API calls out -
* - the array must be big enough to hold the AAD, plus any
* space to round this up to the nearest multiple of the
* The cryptodev API calls out -
* - the array must be big enough to hold the AAD, plus any
* space to round this up to the nearest multiple of the
- * block size (8 bytes for KASUMI and 16 bytes for SNOW3G).
+ * block size (8 bytes for KASUMI and 16 bytes for SNOW 3G).
*/
if (auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9)
aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 8);
*/
if (auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9)
aad_buffer_len = ALIGN_POW2_ROUNDUP(aad_len, 8);
unsigned plaintext_len;
uint8_t *plaintext;
unsigned plaintext_len;
uint8_t *plaintext;
- /* Create SNOW3G session */
+ /* Create SNOW 3G session */
retval = create_snow3g_kasumi_hash_session(ts_params->valid_devs[0],
tdata->key.data, tdata->key.len,
tdata->aad.len, tdata->digest.len,
retval = create_snow3g_kasumi_hash_session(ts_params->valid_devs[0],
tdata->key.data, tdata->key.len,
tdata->aad.len, tdata->digest.len,
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- /* Create SNOW3G operation */
+ /* Create SNOW 3G operation */
retval = create_snow3g_kasumi_hash_operation(NULL, tdata->digest.len,
tdata->aad.data, tdata->aad.len,
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
retval = create_snow3g_kasumi_hash_operation(NULL, tdata->digest.len,
tdata->aad.data, tdata->aad.len,
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
ut_params->digest,
tdata->digest.data,
DIGEST_BYTE_LENGTH_SNOW3G_UIA2,
ut_params->digest,
tdata->digest.data,
DIGEST_BYTE_LENGTH_SNOW3G_UIA2,
- "Snow3G Generated auth tag not as expected");
+ "SNOW 3G Generated auth tag not as expected");
unsigned plaintext_len;
uint8_t *plaintext;
unsigned plaintext_len;
uint8_t *plaintext;
- /* Create SNOW3G session */
+ /* Create SNOW 3G session */
retval = create_snow3g_kasumi_hash_session(ts_params->valid_devs[0],
tdata->key.data, tdata->key.len,
tdata->aad.len, tdata->digest.len,
retval = create_snow3g_kasumi_hash_session(ts_params->valid_devs[0],
tdata->key.data, tdata->key.len,
tdata->aad.len, tdata->digest.len,
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
- /* Create SNOW3G operation */
+ /* Create SNOW 3G operation */
retval = create_snow3g_kasumi_hash_operation(tdata->digest.data,
tdata->digest.len,
tdata->aad.data, tdata->aad.len,
retval = create_snow3g_kasumi_hash_operation(tdata->digest.data,
tdata->digest.len,
tdata->aad.data, tdata->aad.len,
unsigned plaintext_pad_len;
unsigned plaintext_len;
unsigned plaintext_pad_len;
unsigned plaintext_len;
- /* Create SNOW3G session */
+ /* Create SNOW 3G session */
retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
- /* Create SNOW3G operation */
+ /* Create SNOW 3G operation */
retval = create_snow3g_kasumi_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
tdata->validCipherOffsetLenInBits.len,
retval = create_snow3g_kasumi_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
tdata->validCipherOffsetLenInBits.len,
ciphertext,
tdata->ciphertext.data,
tdata->validDataLenInBits.len,
ciphertext,
tdata->ciphertext.data,
tdata->validDataLenInBits.len,
- "Snow3G Ciphertext data not as expected");
+ "SNOW 3G Ciphertext data not as expected");
unsigned plaintext_pad_len;
unsigned plaintext_len;
unsigned plaintext_pad_len;
unsigned plaintext_len;
- /* Create SNOW3G session */
+ /* Create SNOW 3G session */
retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
- /* Create SNOW3G operation */
+ /* Create SNOW 3G operation */
retval = create_snow3g_kasumi_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
retval = create_snow3g_kasumi_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
ciphertext,
tdata->ciphertext.data,
tdata->validDataLenInBits.len,
ciphertext,
tdata->ciphertext.data,
tdata->validDataLenInBits.len,
- "Snow3G Ciphertext data not as expected");
+ "SNOW 3G Ciphertext data not as expected");
uint8_t extra_offset = 4;
uint8_t *expected_ciphertext_shifted;
uint8_t extra_offset = 4;
uint8_t *expected_ciphertext_shifted;
- /* Create SNOW3G session */
+ /* Create SNOW 3G session */
retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
#ifdef RTE_APP_TEST_DEBUG
rte_hexdump(stdout, "plaintext:", plaintext, tdata->plaintext.len);
#endif
#ifdef RTE_APP_TEST_DEBUG
rte_hexdump(stdout, "plaintext:", plaintext, tdata->plaintext.len);
#endif
- /* Create SNOW3G operation */
+ /* Create SNOW 3G operation */
retval = create_snow3g_kasumi_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
retval = create_snow3g_kasumi_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
expected_ciphertext_shifted,
tdata->validDataLenInBits.len,
extra_offset,
expected_ciphertext_shifted,
tdata->validDataLenInBits.len,
extra_offset,
- "Snow3G Ciphertext data not as expected");
+ "SNOW 3G Ciphertext data not as expected");
unsigned ciphertext_pad_len;
unsigned ciphertext_len;
unsigned ciphertext_pad_len;
unsigned ciphertext_len;
- /* Create SNOW3G session */
+ /* Create SNOW 3G session */
retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_DECRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_DECRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
- /* Create SNOW3G operation */
+ /* Create SNOW 3G operation */
retval = create_snow3g_kasumi_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
tdata->validCipherOffsetLenInBits.len,
retval = create_snow3g_kasumi_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
tdata->validCipherOffsetLenInBits.len,
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext,
tdata->plaintext.data,
tdata->validDataLenInBits.len,
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext,
tdata->plaintext.data,
tdata->validDataLenInBits.len,
- "Snow3G Plaintext data not as expected");
+ "SNOW 3G Plaintext data not as expected");
unsigned ciphertext_pad_len;
unsigned ciphertext_len;
unsigned ciphertext_pad_len;
unsigned ciphertext_len;
- /* Create SNOW3G session */
+ /* Create SNOW 3G session */
retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_DECRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
retval = create_snow3g_kasumi_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_DECRYPT,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
TEST_HEXDUMP(stdout, "ciphertext:", ciphertext, ciphertext_len);
- /* Create SNOW3G operation */
+ /* Create SNOW 3G operation */
retval = create_snow3g_kasumi_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
retval = create_snow3g_kasumi_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext,
tdata->plaintext.data,
tdata->validDataLenInBits.len,
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext,
tdata->plaintext.data,
tdata->validDataLenInBits.len,
- "Snow3G Plaintext data not as expected");
+ "SNOW 3G Plaintext data not as expected");
unsigned plaintext_pad_len;
unsigned plaintext_len;
unsigned plaintext_pad_len;
unsigned plaintext_len;
- /* Create SNOW3G session */
+ /* Create SNOW 3G session */
retval = create_snow3g_kasumi_cipher_auth_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_AUTH_OP_GENERATE,
retval = create_snow3g_kasumi_cipher_auth_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_AUTH_OP_GENERATE,
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
- /* Create SNOW3G operation */
+ /* Create SNOW 3G operation */
retval = create_snow3g_kasumi_cipher_hash_operation(tdata->digest.data,
tdata->digest.len, tdata->aad.data,
tdata->aad.len, /*tdata->plaintext.len,*/
retval = create_snow3g_kasumi_cipher_hash_operation(tdata->digest.data,
tdata->digest.len, tdata->aad.data,
tdata->aad.len, /*tdata->plaintext.len,*/
ciphertext,
tdata->ciphertext.data,
tdata->validDataLenInBits.len,
ciphertext,
tdata->ciphertext.data,
tdata->validDataLenInBits.len,
- "Snow3G Ciphertext data not as expected");
+ "SNOW 3G Ciphertext data not as expected");
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
+ plaintext_pad_len + tdata->aad.len + tdata->iv.len;
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
+ plaintext_pad_len + tdata->aad.len + tdata->iv.len;
ut_params->digest,
tdata->digest.data,
DIGEST_BYTE_LENGTH_SNOW3G_UIA2,
ut_params->digest,
tdata->digest.data,
DIGEST_BYTE_LENGTH_SNOW3G_UIA2,
- "Snow3G Generated auth tag not as expected");
+ "SNOW 3G Generated auth tag not as expected");
unsigned plaintext_pad_len;
unsigned plaintext_len;
unsigned plaintext_pad_len;
unsigned plaintext_len;
- /* Create SNOW3G session */
+ /* Create SNOW 3G session */
retval = create_snow3g_kasumi_auth_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_AUTH_OP_GENERATE,
retval = create_snow3g_kasumi_auth_cipher_session(ts_params->valid_devs[0],
RTE_CRYPTO_CIPHER_OP_ENCRYPT,
RTE_CRYPTO_AUTH_OP_GENERATE,
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
TEST_HEXDUMP(stdout, "plaintext:", plaintext, plaintext_len);
- /* Create SNOW3G operation */
+ /* Create SNOW 3G operation */
retval = create_snow3g_kasumi_auth_cipher_operation(
tdata->digest.len,
tdata->iv.data, tdata->iv.len,
retval = create_snow3g_kasumi_auth_cipher_operation(
tdata->digest.len,
tdata->iv.data, tdata->iv.len,
ciphertext,
tdata->ciphertext.data,
tdata->validDataLenInBits.len,
ciphertext,
tdata->ciphertext.data,
tdata->validDataLenInBits.len,
- "Snow3G Ciphertext data not as expected");
+ "SNOW 3G Ciphertext data not as expected");
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
ut_params->digest,
tdata->digest.data,
DIGEST_BYTE_LENGTH_SNOW3G_UIA2,
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
ut_params->digest,
tdata->digest.data,
DIGEST_BYTE_LENGTH_SNOW3G_UIA2,
- "Snow3G Generated auth tag not as expected");
+ "SNOW 3G Generated auth tag not as expected");
TEST_CASE_ST(ut_setup, ut_teardown,
test_AES_GMAC_authentication_verify_test_case_3),
TEST_CASE_ST(ut_setup, ut_teardown,
test_AES_GMAC_authentication_verify_test_case_3),
- /** Snow3G encrypt only (UEA2) */
+ /** SNOW 3G encrypt only (UEA2) */
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_encryption_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_encryption_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_decryption_test_case_1_oop),
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_decryption_test_case_1_oop),
- /** Snow3G decrypt only (UEA2) */
+ /** SNOW 3G decrypt only (UEA2) */
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_decryption_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_decryption_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
}
};
static struct unit_test_suite cryptodev_sw_snow3g_testsuite = {
}
};
static struct unit_test_suite cryptodev_sw_snow3g_testsuite = {
- .suite_name = "Crypto Device SW Snow3G Unit Test Suite",
+ .suite_name = "Crypto Device SW SNOW 3G Unit Test Suite",
.setup = testsuite_setup,
.teardown = testsuite_teardown,
.unit_test_cases = {
.setup = testsuite_setup,
.teardown = testsuite_teardown,
.unit_test_cases = {
- /** Snow3G encrypt only (UEA2) */
+ /** SNOW 3G encrypt only (UEA2) */
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_encryption_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_encryption_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_encryption_test_case_1_offset_oop),
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_encryption_test_case_1_offset_oop),
- /** Snow3G decrypt only (UEA2) */
+ /** SNOW 3G decrypt only (UEA2) */
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_decryption_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
TEST_CASE_ST(ut_setup, ut_teardown,
test_snow3g_decryption_test_case_1),
TEST_CASE_ST(ut_setup, ut_teardown,
};
static struct unit_test_suite cryptodev_snow3g_testsuite = {
};
static struct unit_test_suite cryptodev_snow3g_testsuite = {
- .suite_name = "Crypto Device Snow3G Unit Test Suite",
+ .suite_name = "Crypto Device SNOW3G Unit Test Suite",
.setup = testsuite_setup,
.teardown = testsuite_teardown,
.unit_test_cases = {
.setup = testsuite_setup,
.teardown = testsuite_teardown,
.unit_test_cases = {
-----------
* Chained mbufs are not supported.
-----------
* Chained mbufs are not supported.
-* Hash only is not supported except Snow3G UIA2 and KASUMI F9.
-* Cipher only is not supported except Snow3G UEA2 and KASUMI F8.
+* Hash only is not supported except SNOW 3G UIA2 and KASUMI F9.
+* Cipher only is not supported except SNOW 3G UEA2 and KASUMI F8.
* Only supports the session-oriented API implementation (session-less APIs are not supported).
* Not performance tuned.
* Only supports the session-oriented API implementation (session-less APIs are not supported).
* Not performance tuned.
-* Snow3g(UEA2) and KASUMI(F8) supported only if cipher length, cipher offset fields are byte-aligned.
-* Snow3g(UIA2) and KASUMI(F9) supported only if hash length, hash offset fields are byte-aligned.
+* SNOW 3G (UEA2) and KASUMI (F8) supported only if cipher length, cipher offset fields are byte-aligned.
+* SNOW 3G (UIA2) and KASUMI (F9) supported only if hash length, hash offset fields are byte-aligned.
* No BSD support as BSD QAT kernel driver not available.
* No BSD support as BSD QAT kernel driver not available.
-----------
* Chained mbufs are not supported.
-----------
* Chained mbufs are not supported.
-* Snow3g(UIA2) supported only if hash offset field is byte-aligned.
-* In-place bit-level operations for Snow3g(UEA2) are not supported
+* SNOW 3G (UIA2) supported only if hash offset field is byte-aligned.
+* In-place bit-level operations for SNOW 3G (UEA2) are not supported
(if length and/or offset of data to be ciphered is not byte-aligned).
Installation
(if length and/or offset of data to be ciphered is not byte-aligned).
Installation
struct icp_qat_fw_auth_cd_ctrl_hdr *hash_cd_ctrl = ptr;
enum icp_qat_hw_cipher_convert key_convert;
uint32_t total_key_size;
struct icp_qat_fw_auth_cd_ctrl_hdr *hash_cd_ctrl = ptr;
enum icp_qat_hw_cipher_convert key_convert;
uint32_t total_key_size;
- uint16_t proto = ICP_QAT_FW_LA_NO_PROTO; /* no CCM/GCM/Snow3G */
+ uint16_t proto = ICP_QAT_FW_LA_NO_PROTO; /* no CCM/GCM/SNOW 3G */
uint16_t cipher_offset, cd_size;
uint32_t wordIndex = 0;
uint32_t *temp_key = NULL;
uint16_t cipher_offset, cd_size;
uint32_t wordIndex = 0;
uint32_t *temp_key = NULL;
(struct icp_qat_fw_la_auth_req_params *)
((char *)&req_tmpl->serv_specif_rqpars +
sizeof(struct icp_qat_fw_la_cipher_req_params));
(struct icp_qat_fw_la_auth_req_params *)
((char *)&req_tmpl->serv_specif_rqpars +
sizeof(struct icp_qat_fw_la_cipher_req_params));
- uint16_t proto = ICP_QAT_FW_LA_NO_PROTO; /* no CCM/GCM/Snow3G */
+ uint16_t proto = ICP_QAT_FW_LA_NO_PROTO; /* no CCM/GCM/SNOW 3G */
uint16_t state1_size = 0, state2_size = 0;
uint16_t hash_offset, cd_size;
uint32_t *aad_len = NULL;
uint16_t state1_size = 0, state2_size = 0;
uint16_t hash_offset, cd_size;
uint32_t *aad_len = NULL;
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
case RTE_CRYPTO_CIPHER_SNOW3G_UEA2:
if (qat_alg_validate_snow3g_key(cipher_xform->key.length,
&session->qat_cipher_alg) != 0) {
case RTE_CRYPTO_CIPHER_SNOW3G_UEA2:
if (qat_alg_validate_snow3g_key(cipher_xform->key.length,
&session->qat_cipher_alg) != 0) {
- PMD_DRV_LOG(ERR, "Invalid SNOW3G cipher key size");
+ PMD_DRV_LOG(ERR, "Invalid SNOW 3G cipher key size");
goto error_out;
}
session->qat_mode = ICP_QAT_HW_CIPHER_ECB_MODE;
goto error_out;
}
session->qat_mode = ICP_QAT_HW_CIPHER_ECB_MODE;
if (unlikely((cipher_param->cipher_length % BYTE_LENGTH != 0) ||
(cipher_param->cipher_offset
% BYTE_LENGTH != 0))) {
if (unlikely((cipher_param->cipher_length % BYTE_LENGTH != 0) ||
(cipher_param->cipher_offset
% BYTE_LENGTH != 0))) {
- PMD_DRV_LOG(ERR, " For Snow3g/Kasumi, QAT PMD only "
+ PMD_DRV_LOG(ERR, " For SNOW 3G/Kasumi, QAT PMD only "
"supports byte aligned values");
op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
return -EINVAL;
"supports byte aligned values");
op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
return -EINVAL;
if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_SNOW_3G_UIA2) {
if (unlikely((auth_param->auth_off % BYTE_LENGTH != 0) ||
(auth_param->auth_len % BYTE_LENGTH != 0))) {
if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_SNOW_3G_UIA2) {
if (unlikely((auth_param->auth_off % BYTE_LENGTH != 0) ||
(auth_param->auth_len % BYTE_LENGTH != 0))) {
- PMD_DRV_LOG(ERR, " For Snow3g, QAT PMD only "
+ PMD_DRV_LOG(ERR, " For SNOW 3G, QAT PMD only "
"supports byte aligned values");
op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
return -EINVAL;
"supports byte aligned values");
op->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
return -EINVAL;
if (name == NULL)
return -EINVAL;
if (name == NULL)
return -EINVAL;
- RTE_LOG(INFO, PMD, "Closing SNOW3G crypto device %s"
+ RTE_LOG(INFO, PMD, "Closing SNOW 3G crypto device %s"
" on numa socket %u\n",
name, rte_socket_id());
" on numa socket %u\n",
name, rte_socket_id());
#include "rte_snow3g_pmd_private.h"
static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = {
#include "rte_snow3g_pmd_private.h"
static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = {
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,
{.sym = {
.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,
snow3g_pmd_qp_release(dev, qp_id);
/* Allocate the queue pair data structure. */
snow3g_pmd_qp_release(dev, qp_id);
/* Allocate the queue pair data structure. */
- qp = rte_zmalloc_socket("SNOW3G PMD Queue Pair", sizeof(*qp),
+ qp = rte_zmalloc_socket("SNOW 3G PMD Queue Pair", sizeof(*qp),
RTE_CACHE_LINE_SIZE, socket_id);
if (qp == NULL)
return (-ENOMEM);
RTE_CACHE_LINE_SIZE, socket_id);
if (qp == NULL)
return (-ENOMEM);
rte_pktmbuf_pkt_len(m) - cparams->digest_length);
op->sym->auth.digest.length = cparams->digest_length;
rte_pktmbuf_pkt_len(m) - cparams->digest_length);
op->sym->auth.digest.length = cparams->digest_length;
- /* For SNOW3G/KASUMI algorithms, offset/length must be in bits */
+ /* For SNOW 3G/KASUMI algorithms, offset/length must be in bits */
if (cparams->auth_algo == RTE_CRYPTO_AUTH_SNOW3G_UIA2 ||
cparams->auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9) {
op->sym->auth.data.offset = ipdata_offset << 3;
if (cparams->auth_algo == RTE_CRYPTO_AUTH_SNOW3G_UIA2 ||
cparams->auth_algo == RTE_CRYPTO_AUTH_KASUMI_F9) {
op->sym->auth.data.offset = ipdata_offset << 3;
op->sym->cipher.iv.phys_addr = cparams->iv.phys_addr;
op->sym->cipher.iv.length = cparams->iv.length;
op->sym->cipher.iv.phys_addr = cparams->iv.phys_addr;
op->sym->cipher.iv.length = cparams->iv.length;
- /* For SNOW3G algorithms, offset/length must be in bits */
+ /* For SNOW 3G algorithms, offset/length must be in bits */
if (cparams->cipher_algo == RTE_CRYPTO_CIPHER_SNOW3G_UEA2 ||
cparams->cipher_algo == RTE_CRYPTO_CIPHER_KASUMI_F8) {
op->sym->cipher.data.offset = ipdata_offset << 3;
if (cparams->cipher_algo == RTE_CRYPTO_CIPHER_SNOW3G_UEA2 ||
cparams->cipher_algo == RTE_CRYPTO_CIPHER_KASUMI_F8) {
op->sym->cipher.data.offset = ipdata_offset << 3;
/**< Kasumi algorithm in F8 mode */
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
/**< Kasumi algorithm in F8 mode */
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
- /**< SNOW3G algorithm in UEA2 mode */
+ /**< SNOW 3G algorithm in UEA2 mode */
RTE_CRYPTO_CIPHER_ZUC_EEA3,
/**< ZUC algorithm in EEA3 mode */
RTE_CRYPTO_CIPHER_ZUC_EEA3,
/**< ZUC algorithm in EEA3 mode */
/**< HMAC using 512 bit SHA algorithm. */
RTE_CRYPTO_AUTH_SNOW3G_UIA2,
/**< HMAC using 512 bit SHA algorithm. */
RTE_CRYPTO_AUTH_SNOW3G_UIA2,
- /**< SNOW3G algorithm in UIA2 mode. */
+ /**< SNOW 3G algorithm in UIA2 mode. */
RTE_CRYPTO_AUTH_ZUC_EIA3,
/**< ZUC algorithm in EIA3 mode */
RTE_CRYPTO_AUTH_ZUC_EIA3,
/**< ZUC algorithm in EIA3 mode */
* This field must be specified when the hash algorithm is one of the
* following:
*
* This field must be specified when the hash algorithm is one of the
* following:
*
- * - For SNOW3G (@ref RTE_CRYPTO_AUTH_SNOW3G_UIA2), this is the
+ * - For SNOW 3G (@ref RTE_CRYPTO_AUTH_SNOW3G_UIA2), this is the
* length of the IV (which should be 16).
*
* - For GCM (@ref RTE_CRYPTO_AUTH_AES_GCM). In this case, this is
* length of the IV (which should be 16).
*
* - For GCM (@ref RTE_CRYPTO_AUTH_AES_GCM). In this case, this is
* this location.
*
* @note
* this location.
*
* @note
- * For Snow3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2
+ * For SNOW 3G @ RTE_CRYPTO_CIPHER_SNOW3G_UEA2
* and KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8,
* this field should be in bits.
*/
* and KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8,
* this field should be in bits.
*/
* field should be set to 0.
*
* @note
* field should be set to 0.
*
* @note
- * For Snow3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2
+ * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UEA2
* and KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8,
* this field should be in bits.
*/
* and KASUMI @ RTE_CRYPTO_CIPHER_KASUMI_F8,
* this field should be in bits.
*/
/**< Initialisation Vector or Counter.
*
* - For block ciphers in CBC or F8 mode, or for Kasumi
/**< Initialisation Vector or Counter.
*
* - For block ciphers in CBC or F8 mode, or for Kasumi
- * in F8 mode, or for SNOW3G in UEA2 mode, this is the
+ * in F8 mode, or for SNOW 3G in UEA2 mode, this is the
* Initialisation Vector (IV) value.
*
* - For block ciphers in CTR mode, this is the counter.
* Initialisation Vector (IV) value.
*
* - For block ciphers in CTR mode, this is the counter.
/**< Length of valid IV data.
*
* - For block ciphers in CBC or F8 mode, or for Kasumi
/**< Length of valid IV data.
*
* - For block ciphers in CBC or F8 mode, or for Kasumi
- * in F8 mode, or for SNOW3G in UEA2 mode, this is the
+ * in F8 mode, or for SNOW 3G in UEA2 mode, this is the
* length of the IV (which must be the same as the
* block length of the cipher).
*
* length of the IV (which must be the same as the
* block length of the cipher).
*
- * For Snow3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2
+ * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2
* and KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9,
* this field should be in bits.
*/
* and KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9,
* this field should be in bits.
*/
* Auth.aad.length is used instead.
*
* @note
* Auth.aad.length is used instead.
*
* @note
- * For Snow3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2
+ * For SNOW 3G @ RTE_CRYPTO_AUTH_SNOW3G_UIA2
* and KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9,
* this field should be in bits.
*/
* and KASUMI @ RTE_CRYPTO_AUTH_KASUMI_F9,
* this field should be in bits.
*/
uint8_t *data;
/**< Pointer to Additional Authenticated Data (AAD)
* needed for authenticated cipher mechanisms (CCM and
uint8_t *data;
/**< Pointer to Additional Authenticated Data (AAD)
* needed for authenticated cipher mechanisms (CCM and
- * GCM), and to the IV for SNOW3G authentication
+ * GCM), and to the IV for SNOW 3G authentication
* (@ref RTE_CRYPTO_AUTH_SNOW3G_UIA2). For other
* authentication mechanisms this pointer is ignored.
*
* (@ref RTE_CRYPTO_AUTH_SNOW3G_UIA2). For other
* authentication mechanisms this pointer is ignored.
*