1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Merge pull request #8680 from mpg/ciphers-wrapup

Driver-only ciphers wrapup
This commit is contained in:
Manuel Pégourié-Gonnard
2024-01-10 12:04:50 +00:00
committed by GitHub
8 changed files with 120 additions and 57 deletions

View File

@ -1540,7 +1540,7 @@ component_test_crypto_full_md_light_only () {
make test
}
component_test_full_no_cipher () {
component_test_full_no_cipher_no_psa_crypto () {
msg "build: full no CIPHER no PSA_CRYPTO_C"
scripts/config.py full
scripts/config.py unset MBEDTLS_CIPHER_C
@ -1565,8 +1565,8 @@ component_test_full_no_cipher () {
}
# This is a common configurator and test function that is used in:
# - component_test_full_no_cipher_with_crypto
# - component_test_full_no_cipher_with_crypto_config
# - component_test_full_no_cipher_with_psa_crypto
# - component_test_full_no_cipher_with_psa_crypto_config
# It accepts 2 input parameters:
# - $1: boolean value which basically reflects status of MBEDTLS_PSA_CRYPTO_CONFIG
# - $2: a text string which describes the test component
@ -1614,11 +1614,11 @@ common_test_full_no_cipher_with_psa_crypto () {
make test
}
component_test_full_no_cipher_with_crypto() {
component_test_full_no_cipher_with_psa_crypto() {
common_test_full_no_cipher_with_psa_crypto 0 "full no CIPHER no CRYPTO_CONFIG"
}
component_test_full_no_cipher_with_crypto_config() {
component_test_full_no_cipher_with_psa_crypto_config() {
common_test_full_no_cipher_with_psa_crypto 1 "full no CIPHER"
}
@ -3741,9 +3741,9 @@ component_test_psa_crypto_config_accel_aead () {
}
# This is a common configuration function used in:
# - component_test_psa_crypto_config_accel_cipher_aead
# - component_test_psa_crypto_config_reference_cipher_aead
common_psa_crypto_config_accel_cipher_aead() {
# - component_test_psa_crypto_config_accel_cipher_aead_cmac
# - component_test_psa_crypto_config_reference_cipher_aead_cmac
common_psa_crypto_config_accel_cipher_aead_cmac() {
# Start from the full config
helper_libtestdriver1_adjust_config "full"
@ -3751,12 +3751,12 @@ common_psa_crypto_config_accel_cipher_aead() {
}
# The 2 following test components, i.e.
# - component_test_psa_crypto_config_accel_cipher_aead
# - component_test_psa_crypto_config_reference_cipher_aead
# - component_test_psa_crypto_config_accel_cipher_aead_cmac
# - component_test_psa_crypto_config_reference_cipher_aead_cmac
# are meant to be used together in analyze_outcomes.py script in order to test
# driver's coverage for ciphers and AEADs.
component_test_psa_crypto_config_accel_cipher_aead () {
msg "build: full config with accelerated cipher and AEAD"
component_test_psa_crypto_config_accel_cipher_aead_cmac () {
msg "build: full config with accelerated cipher inc. AEAD and CMAC"
loc_accel_list="ALG_ECB_NO_PADDING ALG_CBC_NO_PADDING ALG_CBC_PKCS7 ALG_CTR ALG_CFB \
ALG_OFB ALG_XTS ALG_STREAM_CIPHER ALG_CCM_STAR_NO_TAG \
@ -3766,7 +3766,7 @@ component_test_psa_crypto_config_accel_cipher_aead () {
# Configure
# ---------
common_psa_crypto_config_accel_cipher_aead
common_psa_crypto_config_accel_cipher_aead_cmac
# Disable the things that are being accelerated
scripts/config.py unset MBEDTLS_CIPHER_MODE_CBC
@ -3810,29 +3810,29 @@ component_test_psa_crypto_config_accel_cipher_aead () {
# Run the tests
# -------------
msg "test: full config with accelerated cipher and AEAD"
msg "test: full config with accelerated cipher inc. AEAD and CMAC"
make test
msg "ssl-opt: full config with accelerated cipher and AEAD"
msg "ssl-opt: full config with accelerated cipher inc. AEAD and CMAC"
tests/ssl-opt.sh
msg "compat.sh: full config with accelerated cipher and AEAD"
msg "compat.sh: full config with accelerated cipher inc. AEAD and CMAC"
tests/compat.sh -V NO -p mbedTLS
}
component_test_psa_crypto_config_reference_cipher_aead () {
msg "build: full config with non-accelerated cipher and AEAD"
common_psa_crypto_config_accel_cipher_aead
component_test_psa_crypto_config_reference_cipher_aead_cmac () {
msg "build: full config with non-accelerated cipher inc. AEAD and CMAC"
common_psa_crypto_config_accel_cipher_aead_cmac
make
msg "test: full config with non-accelerated cipher and AEAD"
msg "test: full config with non-accelerated cipher inc. AEAD and CMAC"
make test
msg "ssl-opt: full config with non-accelerated cipher and AEAD"
msg "ssl-opt: full config with non-accelerated cipher inc. AEAD and CMAC"
tests/ssl-opt.sh
msg "compat.sh: full config with non-accelerated cipher and AEAD"
msg "compat.sh: full config with non-accelerated cipher inc. AEAD and CMAC"
tests/compat.sh -V NO -p mbedTLS
}

View File

@ -240,16 +240,16 @@ KNOWN_TASKS = {
}
}
},
'analyze_driver_vs_reference_cipher_aead': {
'analyze_driver_vs_reference_cipher_aead_cmac': {
'test_function': do_analyze_driver_vs_reference,
'args': {
'component_ref': 'test_psa_crypto_config_reference_cipher_aead',
'component_driver': 'test_psa_crypto_config_accel_cipher_aead',
'component_ref': 'test_psa_crypto_config_reference_cipher_aead_cmac',
'component_driver': 'test_psa_crypto_config_accel_cipher_aead_cmac',
# Modules replaced by drivers.
'ignored_suites': [
# low-level (block/stream) cipher modules
'aes', 'aria', 'camellia', 'des', 'chacha20',
# AEAD modes
# AEAD modes and CMAC
'ccm', 'chachapoly', 'cmac', 'gcm',
# The Cipher abstraction layer
'cipher',