}
}
- /* 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) {
return TEST_SUCCESS;
}
-/* ***** 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,
* 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);
* 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);
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,
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,
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");
return 0;
}
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,
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,
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,
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,
ciphertext,
tdata->ciphertext.data,
tdata->validDataLenInBits.len,
- "Snow3G Ciphertext data not as expected");
+ "SNOW 3G Ciphertext data not as expected");
return 0;
}
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,
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,
ciphertext,
tdata->ciphertext.data,
tdata->validDataLenInBits.len,
- "Snow3G Ciphertext data not as expected");
+ "SNOW 3G Ciphertext data not as expected");
return 0;
}
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,
#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,
expected_ciphertext_shifted,
tdata->validDataLenInBits.len,
extra_offset,
- "Snow3G Ciphertext data not as expected");
+ "SNOW 3G Ciphertext data not as expected");
return 0;
}
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,
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,
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");
return 0;
}
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,
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,
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");
return 0;
}
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,
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,*/
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,
tdata->digest.data,
DIGEST_BYTE_LENGTH_SNOW3G_UIA2,
- "Snow3G Generated auth tag not as expected");
+ "SNOW 3G Generated auth tag not as expected");
return 0;
}
static int
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,
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,
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,
- "Snow3G Generated auth tag not as expected");
+ "SNOW 3G Generated auth tag not as expected");
return 0;
}
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_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,
}
};
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 = {
- /** 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_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,