}
}
- /* 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,
/**< 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 */
/**< 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 */
* 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
* 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.
*/
* 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.
*/
/**< 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.
/**< 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).
*
* 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.
*/
* 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.
*/
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.
*