Gilles Peskine
f3d1ae1f05
Create common.make with LOCAL_CFLAGS and friends
...
Create a common.make for definitions that are shared between tests/Makefile
and programs/Makefile, to facilitate maintenance. Start populating it with
CFLAGS/LDFLAGS variables. More to follow in subsequent commits.
Keep library/Makefile independent, at least for the time being.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-22 11:48:56 +01:00
Gilles Peskine
f5c5ce7789
Partly unify LOCAL_CFLAGS
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-22 11:48:56 +01:00
Gilles Peskine
4ad5733836
Unify treatment of MBEDTLS_TEST_OBJS
...
Unify the treatment of MBEDTLS_TEST_OBJS between programs/Makefile and
tests/Makefile: include it via LOCAL_LD_FLAGS in both cases. Document why
the definition of MBEDTLS_TEST_OBJS is different.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-22 11:48:56 +01:00
Gilles Peskine
afccc1a6d5
Indent nested conditionals
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-22 11:48:52 +01:00
Manuel Pégourié-Gonnard
69b290589b
Merge pull request #8057 from mpg/cipher-study
...
[G2] Tentative definition of Cipher light
2023-12-22 08:53:30 +00:00
Valerio Setti
49067d7d0e
driver-only-builds: update documentation
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-21 17:07:10 +01:00
Dave Rodgman
5c7e94487e
fix line length
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-21 15:42:22 +00:00
Valerio Setti
a72a797ffd
all.sh: keep PKCS[5/12] enabled in accel_cipher_aead tests
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-21 16:40:40 +01:00
Valerio Setti
6d3a68162c
check_config: remove CIPHER_C requirement for PKCS[5/12]
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-21 16:40:03 +01:00
Valerio Setti
a69e872001
pkcs[5/12]: add CIPHER_C for [en/de]crypting functions
...
This commit also updates corresponding test suites.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-21 16:39:04 +01:00
Dave Rodgman
3bc249959c
Merge branch 'development' into default-compiler-all
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-21 14:35:14 +00:00
Valerio Setti
8c1e6bbcdc
driver-only-builds: fix typos
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-21 15:02:48 +01:00
Tom Cosgrove
c6088eceb4
Merge pull request #8384 from paul-elliott-arm/remove_ssl_null_tls12
...
Remove NULLing of ssl context in TLS1.2 transform population
2023-12-21 13:28:09 +00:00
Gilles Peskine
907cb020ef
Merge pull request #8618 from Ryan-Everett-arm/new-state-transition-documentation
...
Update thread safety state transition documentation
2023-12-21 12:09:58 +00:00
Gilles Peskine
4bf4473ef0
Merge pull request #8633 from Wenxing-hou/clear_clienthello_comment
...
Make clienthello comment clear
2023-12-21 12:09:23 +00:00
Gilles Peskine
0e6fdc4f1d
Merge pull request #8342 from yanesca/threading_test_pc
...
Threading test proof of concept and plan
2023-12-21 12:08:41 +00:00
Ryan Everett
3dd6cde0d8
Mention functional correctness explicitly
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2023-12-20 16:47:57 +00:00
Valerio Setti
66134661cd
driver-only-builds: add Restrictions section
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-20 17:06:13 +01:00
Ryan Everett
f5e135670b
Clarify key generation and memory-management correctness
...
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2023-12-20 15:24:47 +00:00
Valerio Setti
d834896c8b
changelog: enhancing descriptions
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-20 16:00:44 +01:00
Valerio Setti
af53132e44
driver-only-builds: enhancing section on removing CIPHER_C
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-20 15:56:09 +01:00
Manuel Pégourié-Gonnard
35085c5e89
Merge pull request #7930 from tomi-font/7583-non-PSA_pk_sign_ext
...
Implement non-PSA pk_sign_ext()
2023-12-20 14:30:08 +00:00
Valerio Setti
3fab8a4deb
driver-only-builds: fix typos
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-20 14:25:37 +01:00
Tomi Fontanilles
851d8df58d
fix/work around dependency issues when !MBEDTLS_ECP_C
...
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2023-12-20 13:09:27 +02:00
Tomi Fontanilles
e6a664ed65
changelog: fix missing newline at end of file
...
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2023-12-20 13:05:55 +02:00
Tomi Fontanilles
9f41770313
pk_*: remove remaining references to MBEDTLS_PSA_CRYPTO_C
...
For real this time.
Signed-off-by: Tomi Fontanilles <129057597+tomi-font@users.noreply.github.com>
2023-12-20 13:05:55 +02:00
Tomi Fontanilles
5297e43eec
non-psa-pk-implementation: rephrase the changelog entry
...
And remove the comment on the uniformity in the PK module
with regards to PSA_CRYPTO_C not being referenced anymore;
end users are probably not interested in that.
Signed-off-by: Tomi Fontanilles <129057597+tomi-font@users.noreply.github.com>
2023-12-20 12:59:57 +02:00
Tomi Fontanilles
bad170e159
pk: remove last references to MBEDTLS_PSA_CRYPTO_C
...
They are replaced by MBEDTLS_USE_PSA_CRYPTO.
Signed-off-by: Tomi Fontanilles <129057597+tomi-font@users.noreply.github.com>
2023-12-20 12:59:57 +02:00
Tomi Fontanilles
1941af087c
pk_wrap: remove last references to MBEDTLS_PSA_CRYPTO_C
...
Deprecated functions are removed and #ifdefs are updated accordingly.
Signed-off-by: Tomi Fontanilles <129057597+tomi-font@users.noreply.github.com>
2023-12-20 12:59:57 +02:00
Tomi Fontanilles
9c69348c24
pk test suite: rename the parameter named parameter
...
Signed-off-by: Tomi Fontanilles <129057597+tomi-font@users.noreply.github.com>
2023-12-20 12:59:57 +02:00
Tomi Fontanilles
573dc23141
rsa: introduce rsa_internal_rsassa_pss_sign_no_mode_check()
...
And use it in the non-PSA version of mbedtls_pk_sign_ext()
to bypass checks that didn't succeed when used by TLS 1.3.
That is because in the failing scenarios the padding of
the RSA context is not set to PKCS_V21.
See the discussion on PR #7930 for more details.
Signed-off-by: Tomi Fontanilles <129057597+tomi-font@users.noreply.github.com>
2023-12-20 12:59:57 +02:00
Tomi Fontanilles
8174662b64
pk: implement non-PSA mbedtls_pk_sign_ext()
...
This makes the function always available with its
its implementation depending on MBEDTLS_USE_PSA_CRYPTO.
Related dependencies and tests are updated as well.
Fixes #7583 .
Signed-off-by: Tomi Fontanilles <129057597+tomi-font@users.noreply.github.com>
2023-12-20 12:59:57 +02:00
Tomi Fontanilles
80ca493284
gitignore: add clangd index files
...
https://clangd.llvm.org/design/indexing#backgroundindex
Signed-off-by: Tomi Fontanilles <129057597+tomi-font@users.noreply.github.com>
2023-12-20 12:59:57 +02:00
Tomi Fontanilles
a70b3c24f6
rsa: minor comment/guard improvements
...
This brings some improvements to comments/
function prototypes that relate to PKCS#1.
Signed-off-by: Tomi Fontanilles <129057597+tomi-font@users.noreply.github.com>
2023-12-20 12:59:57 +02:00
Valerio Setti
5eb8de12cb
driver-only-build: remove paragraph about RSA/DH deterministic key generation
...
This feature is not supported at all in MbedTLS, driver or not.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-20 11:59:32 +01:00
Manuel Pégourié-Gonnard
9934f834af
Merge pull request #7766 from gilles-peskine-arm/psa-transition-doc-create
...
Legacy-to-PSA transition guide
2023-12-20 10:28:31 +00:00
Manuel Pégourié-Gonnard
299bbacd7d
Merge pull request #8644 from gilles-peskine-arm/domain_parameters_document_size_hack
...
Document the domain_parameters_size==SIZE_MAX hack
2023-12-20 08:27:47 +00:00
Manuel Pégourié-Gonnard
a4b38f24fd
Merge pull request #8579 from valeriosetti/issue7995
...
PK: clean up pkwrite
2023-12-20 08:20:10 +00:00
Dave Rodgman
c393222643
Work around clang 3.8 bug
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 18:52:35 +00:00
Dave Rodgman
a69c782351
Merge pull request #8634 from daverodgman/iar-fixes
...
IAR warning fix & some improvements
2023-12-19 16:26:23 +00:00
Dave Rodgman
fc5b9553b2
Don't use full path for setting CC
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 16:08:19 +00:00
Dave Rodgman
bc8e61d962
Use gcc in test_full_deprecated_warning
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 14:07:15 +00:00
Dave Rodgman
d47186d6e3
Disable automatic setting of clang target flags on old clang
...
Old versions of clang don't support this pragma, so we have to assume
that the user will have set the flags.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 13:11:47 +00:00
Dave Rodgman
d8d6451a6e
Add -O2 to some CFLAGS which were not setting it
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 12:20:21 +00:00
Dave Rodgman
ea03ef9a77
Don't specify gcc unless the test requires it
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 12:19:59 +00:00
Dave Rodgman
dfe5ce81ee
Use clang -O2 in common_block_cipher_no_decrypt
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 11:47:18 +00:00
Dave Rodgman
590519f535
Enable -O2 in depends.py
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-12-19 11:33:55 +00:00
Gilles Peskine
1a9e05bf08
Note that domain parameters are not supported with drivers
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-19 12:23:22 +01:00
Gilles Peskine
5ad9539363
Remove DSA and DH domain parameters from the documentation
...
Mbed TLS doesn't support DSA at all, and doesn't support domain parameters
for FFDH (only predefined groups).
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-12-19 12:22:46 +01:00
Valerio Setti
9da01a7f53
all.sh: rename test_psa_crypto_config_accel_cipher to accel_des
...
Renaming this test component in order to better explain what it
really does.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-12-19 08:05:40 +01:00