Dave Rodgman
d175d52433
Fix doxygen error
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 14:03:08 +01: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
Dave Rodgman
fd78c34e23
Move constant_flow.h into the main library
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:48:33 +01:00
Dave Rodgman
1714a9b0eb
Revert to old design for mbedtls_ct_memmove_left
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:48:33 +01:00
Dave Rodgman
04a334af55
Make const-time test not depend on internal knowledge of mbedtls_ct_condition_t
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:48:33 +01:00
Dave Rodgman
ad9e5b9abe
Improve docs for mbedtls_ct_memcmp
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
9ee0e1f6fe
Remove GCC redundant-decls workaround for mbedtls_ct_memcmp
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
0172de8b3d
Fix docs grammar
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
741d423ef8
Clarify docs for mbedtls_ct_memcpy_if
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
93cec45af3
Improve docs for mbedtls_ct_compiler_opaque
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
32d726033b
Improve comments in mbedtls_mpi_lt_mpi_ct
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:43:23 +01:00
Dave Rodgman
07f853713d
Clarify comments in mbedtls_ct_memcpy_if
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:27:49 +01:00
Dave Rodgman
fb1b851797
Improve docs for mbedtls_mpi_core_cond_assign
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-31 12:27:05 +01: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
Dave Rodgman
2b174abd86
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 18:29:41 +01:00
Dave Rodgman
2d28c46055
Fix asm Memsan workaround
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 18:24:22 +01:00
Dave Rodgman
983448ea62
fix check for no-longer-used macro
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 17:30:52 +01: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
Dave Rodgman
d684d7342b
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 16:39:38 +01:00
Dave Rodgman
08691679b5
Enable testing of asm under Memsan
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 16:39:38 +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
Dave Rodgman
fa5a4bbb02
Improve mbedtls_ct_memmove_left w.r.t. const-flow tests
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 16:13:52 +01: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
Dave Rodgman
8de3482507
Fix false-positive non-const-time errors in test
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-07-28 15:10:00 +01: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
Valerio Setti
c1319f4a26
debug: improve debug_print_psa_ec() as not to depend on bignum
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-28 13:44:51 +02:00
Valerio Setti
797e396fd9
debug: use proper guard for PK_DEBUG_MPI items
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-28 13:44:26 +02: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
Yanray Wang
ee07afa205
code_size_compare: add option '--show-all'
...
When '--show-all' is enabled, all the objects will be displayed in
comparison result no matter if there is code size change or not.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-07-28 16:43:56 +08: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
Yanray Wang
b167320e27
code_size_compare: use '.md' suffix if '--markdown' enabled
...
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-07-28 16:24:17 +08:00
Yanray Wang
dcf360dd72
code_size_compare: track removed object as well
...
It makes sense to display code size changes if a file has been
removed in our library. With this commit we track old objects as
well. If a file is not present in the new Git revision,
we display -old_size in the new_size column. The size change is
marked as `Removed` to indicate the file has been removed.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
2023-07-28 16:05:37 +08:00
Kusumit Ghoderao
c22affd9ec
Fix dependencies for pbkdf2 cmac
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-07-28 13:31:58 +05:30
Kusumit Ghoderao
f3e696dc1b
Add ifdef for hmac and cmac set password
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-07-28 13:30:50 +05:30