Dave Rodgman
6f80ac4979
Merge pull request #7864 from waleed-elmelegy-arm/enforce-min-RSA-key-size
...
Enforce minimum key size when generating RSA key size
2023-08-03 12:57:52 +00:00
Dave Rodgman
1d4d944e19
Merge pull request #7933 from tom-cosgrove-arm/add-mbedtls_zeroize_and_free
...
Provide and use internal function mbedtls_zeroize_and_free()
2023-08-03 12:56:21 +00:00
Waleed Elmelegy
d4e7fe09b3
Change tests to work on different MBEDTLS_RSA_GEN_KEY_MIN_BITS configs
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2023-08-02 16:59:59 +00:00
Gilles Peskine
ce64156f6d
Merge pull request #8021 from daverodgman/master-update
...
Sync development with accidental merge directly onto master
2023-08-02 13:30:35 +00:00
Gilles Peskine
267bee9be8
Merge pull request #7903 from valeriosetti/issue7773
...
Define PSA_WANT_xxx_KEY_PAIR_yyy step 2/DH
2023-08-02 10:16:44 +00:00
Dave Rodgman
7f17bd09cc
Merge remote-tracking branch 'origin/master' into master-update
2023-08-02 10:57:07 +01:00
Valerio Setti
52e0fb4421
crypto_config_profile_medium: add comment for new KEY_PAIR symbols
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-02 09:55:21 +02:00
Bence Szépkúti
9661f8ab0d
Merge pull request #7968 from gowthamsk-arm/use_earliest_latest_compilers
...
Use earliest latest compilers
2023-08-02 05:58:02 +00:00
Bence Szépkúti
895074e3f9
Merge pull request #8002 from valeriosetti/issue7904
...
PSA maximum size macro definitions should take support into account
2023-08-02 05:57:28 +00:00
Gilles Peskine
d55e451b3e
Merge pull request #7997 from yanesca/fix_new_bignum_tests
...
Fix new bignum tests
2023-08-01 12:09:39 +00:00
Tom Cosgrove
52f7e18042
Use mbedtls_zeroize_and_free() in psa_remove_key_data_from_memory()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-08-01 09:08:48 +01:00
Manuel Pégourié-Gonnard
cbc495eb0f
Merge pull request #8011 from valeriosetti/improve-outcome-analysis
...
Improve `outcome-analysis.sh` script
2023-08-01 08:06:44 +00:00
Janos Follath
5b7c38f673
Sort full config exceptions in config.py
...
The EXCLUDE_FROM_FULL list in config.py should be, and used to be, but
no longer is, in alphabetical order, and with a comma on the last
element.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-08-01 08:51:12 +01:00
Janos Follath
e416f03c8f
Improve wording of MBEDTLS_ECP_WITH_MPI_UINT doc
...
Use the standard "experimental" word in the description and make the
wording more similar to other experimental warnings.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-08-01 08:44:40 +01:00
Manuel Pégourié-Gonnard
de8f56e936
Merge pull request #7884 from valeriosetti/issue7612
...
TLS: Clean up (EC)DH dependencies
2023-08-01 07:13:36 +00:00
Gowtham Suresh Kumar
9da40b8927
Update default variable values for compilers
...
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-31 23:11:18 +01:00
Janos Follath
3ed980d60f
Fix full config in config.py
...
By default, the full configuration enables all options. But we
specifically don't want to enable MBEDTLS_ECP_WITH_MPI_UINT except where
it's done explicitly, because it disables the old ecp. So it needs to be
added to the exceptions in config.py (EXCLUDE_FROM_FULL).
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-07-31 16:27:04 +01:00
Valerio Setti
ab02d391cb
test: use only rev-parse for getting the current branch
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-31 16:47:07 +02:00
Valerio Setti
ccb0344969
test: add GIT alternative commands for older GIT versions
...
The Docker container used for the CI has Git version 2.7.4 which
does not support the "git branch --show-current" command since this
was added in version 2.22.
Therefore this commit adds an alternative version for old Git versions.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-31 15:07:49 +02:00
Tom Cosgrove
dc2d7cce02
Merge pull request #7777 from xkqian/bignum_cleanup_ecp_curves
...
[Bignum] Bignum cleanup ecp curves
2023-07-31 12:23:35 +00:00
Janos Follath
2f04582d37
Move MBEDTLS_ECP_WITH_MPI_UINT to mbedtls_config.h
...
There is a precedent for having bigger and less mature options in
mbedtls_config.h (MBEDTLS_USE_PSA_CRYPTO) for an extended period.
Having this option in mbedtls_config.h is simpler and more robust.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-07-31 10:57:16 +01:00
Valerio Setti
43c5bf4f88
crypto_sizes: use PSA_WANT_ALG for MAX signatures and key agreement sizes
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-31 11:35:48 +02:00
Valerio Setti
f5051efa81
test: properly size output buffer in key_agreement_fail()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-31 11:35:48 +02:00
Valerio Setti
8b27decc6a
Revert "crypto_sizes: check also if DH is enabled for PSA_SIGNATURE_MAX_SIZE"
...
This reverts commit 478c236938
.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-31 11:35:42 +02:00
Janos Follath
f3135af159
Use config.py in all new bignum tests
...
This previous test is correct, as it is using make. Switch to using
config.py for robustness and consistency.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-07-31 10:07:57 +01:00
Janos Follath
82823b2fe8
Fix new bignum tests
...
These tests weren't working, because they use CMake and can't pass
options with CFLAGS directly. This could be mitigated by adding a CMake
option, but using config.py is less invasive and it is what we normally
use for setting build options anyway.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2023-07-31 10:01:47 +01:00
Xiaokang Qian
59159abcce
Fix fast quasi-reduction modulo value of p192K1 in comments
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-07-31 06:46:28 +00:00
Xiaokang Qian
d0657b0015
ecp_mod_p448 has been moved to ecp_mod_p_generic_raw, remove here
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-07-31 06:46:28 +00:00
Xiaokang Qian
796500e751
Fix the type cast(size_t to unsigned short) warning
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-07-31 06:46:28 +00:00
Xiaokang Qian
b903f4ecb6
Free P and N of the group cause they are dynamic allocated
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-07-31 06:46:28 +00:00
Xiaokang Qian
02a3e0318f
Declare mbedtls_ecp_fix_negative() always static to fix check_name failures
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-07-31 06:46:28 +00:00
Xiaokang Qian
a8d30ac7e5
Use new ECP_LIGHT symbol in ecp_curves.c
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-07-31 06:46:28 +00:00
Xiaokang Qian
be4d6b62ab
Fix use of sizeof without brackets in ecp_curves.c
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-07-31 06:46:28 +00:00
Xiaokang Qian
e25597dad7
Make ecp_mode_xxx functions depend on the new macro
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-07-31 06:46:28 +00:00
Xiaokang Qian
748a362fd0
Revert ecp_curves.c to commit 449bd83
to save code size
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-07-31 06:46:28 +00:00
Gowtham Suresh Kumar
6f1977bf20
Use variables for selecting compilers
...
The latest and earliest clang/GCC compilers are now used through
variables instead of symlinks and also the all.sh script is updated
to support options for overriding the default values.
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-28 17:04:47 +01:00
Gowtham Suresh Kumar
1e829a403f
Use compgen to gather components in all.sh
...
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-28 16:41:21 +01:00
Gowtham Suresh Kumar
8d45ec8b97
Remove test_clang_opt check
...
The component functions in all.sh will be listed using
compgen instead of sed so this check is not needed.
Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
2023-07-28 16:36:25 +01:00
Valerio Setti
1eacae865e
test: check exported length against proper MAX_SIZE
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-28 17:29:48 +02:00
Valerio Setti
9cd8011978
tls: fix definition of symbol KEY_EXCHANGE_SOME_XXDH_PSA_ANY
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-28 16:46:55 +02:00
Valerio Setti
478c236938
crypto_sizes: check also if DH is enabled for PSA_SIGNATURE_MAX_SIZE
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-28 16:05:53 +02:00
Manuel Pégourié-Gonnard
43cef57e51
Merge pull request #7811 from mpg/md-info
...
Optimize strings in MD
2023-07-28 08:34:09 +00:00
Dave Rodgman
cec82e41e0
Merge pull request #8003 from daverodgman/code_style_since
...
Make code_style.py --since more precise
2023-07-28 10:56:58 +01:00
Valerio Setti
c012a2de7c
crypto_sizes: change initial MAX_SIZE value to 1
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-28 09:34:44 +02:00
Valerio Setti
644e01d767
crypto_sizes: fix typo
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-28 09:31:51 +02:00
Dave Rodgman
fccc5f8b9d
whitespace fix
...
Signed-off-by: Dave Rodgman <dave.rodgman@gmail.com>
2023-07-27 20:00:41 +01:00
Dave Rodgman
82d174a6a8
pylint tidy-up
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-27 18:51:06 +01:00
Dave Rodgman
eaf2761ae1
Make code_style.py -s default to -s=development
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-27 17:43:55 +01:00
Dave Rodgman
05b60f40ac
Make code_style.py -s more precise
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-27 17:43:48 +01:00
Valerio Setti
a83d9bf0db
crypto_sizes: size PSA max symbols according to actual support
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-27 18:15:20 +02:00