Commit graph

26238 commits

Author SHA1 Message Date
Chien Wong
a4c477becd
Add changelog entry
Signed-off-by: Chien Wong <m@xv97.com>
2023-08-11 18:19:15 +08:00
Chien Wong
2e3858f5eb
Undo a change
Signed-off-by: Chien Wong <m@xv97.com>
2023-08-11 18:16:06 +08:00
Chien Wong
e2caf4161b
Fix a few unchecked value issue
Signed-off-by: Chien Wong <m@xv97.com>
2023-08-01 22:41:17 +08: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
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
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
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
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
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
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
Janos Follath
e0fa7ec4db
Merge pull request #7988 from gabor-mezei-arm/7598_add_32bit_test_component
Add 32bit test component for ecp with new bignum interface
2023-07-27 13:00:04 +00:00
Manuel Pégourié-Gonnard
0fda0d2e5c Fix overly specific description in public doc
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-07-27 12:22:52 +02:00
Gilles Peskine
7ef14bf8a2
Merge pull request #7835 from gilles-peskine-arm/ssl_premaster_secret-empty-3.4
Fix empty union when TLS is disabled
2023-07-27 08:28:21 +00:00
Gilles Peskine
51ed3139d1
Merge pull request #7909 from mpg/dh-generate-psa-tests
Enable DH in generate_psa_tests.py
2023-07-26 17:46:09 +00:00
Gabor Mezei
e256cc1552
Add 32bit test component for ecp with new bignum interface
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-07-26 17:35:44 +02:00
Janos Follath
b52f9cf5eb
Merge pull request #7758 from xkqian/bignum_clone_ecp_curves
[Bignum] Bignum clone ecp curves
2023-07-26 13:33:56 +01:00
Gilles Peskine
bb07377458
Merge pull request #7935 from AgathiyanB/add-enum-casts
Add type casts for integer and enum types
2023-07-26 11:27:27 +02:00
Manuel Pégourié-Gonnard
1c739ec277
Merge pull request #7900 from mpg/doc-driver-only
ECPf wrap-up
2023-07-26 10:25:54 +02:00
Manuel Pégourié-Gonnard
182eb1514e Fix KeyType.can_do() for DH+FFDH
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-07-26 09:34:30 +02:00
Manuel Pégourié-Gonnard
c154a043bb Fix dependencies for DH (and RSA) key pairs
- RSA was missing the MBEDTLS_ prefix.
- DH needs the same temporary fix (prefix + suffix) for now.
- hack_dependencies_not_implemented() needs to ignore MBEDTLS_PSA_WANT
dependencies.

While at it, make the code currently used for ECC more generic, so that
it's ready to be used for RSA and DH in the near future.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-07-26 09:34:30 +02:00
Manuel Pégourié-Gonnard
636d85724a Shorten DH_FAMILY just like ECC_FAMILY
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-07-26 09:32:42 +02:00
Manuel Pégourié-Gonnard
afe4b79114 Enable DH in generate_psa_tests.py
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-07-26 09:32:42 +02:00
Paul Elliott
f1c032adba
Merge pull request #7902 from valeriosetti/issue7772
Define PSA_WANT_xxx_KEY_PAIR_yyy step 2/RSA
2023-07-25 17:13:43 +01:00
Agathiyan Bragadeesh
93a859341b Remove remaining redundant casts
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
2023-07-25 12:28:59 +01:00
Agathiyan Bragadeesh
d298b76421 Remove redundant casts
Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
2023-07-25 11:33:00 +01:00
Valerio Setti
19fec5487d test: remove GENPRIME dependency when RSA_KEY_PAIR_GENERATE
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-25 12:31:50 +02:00
Valerio Setti
fe478909f0 psa_crypto_rsa: fix guards for importing the key
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-25 12:27:19 +02:00
Valerio Setti
46520ea52d tls12: check buffer size before memcpy-ing data into it
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-25 11:41:28 +02:00
Valerio Setti
c9ae862225 tls: use TLS 1.3 guards in ssl_tls13 modules
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-25 11:23:50 +02:00
Valerio Setti
ea59c43499 tls: fix a comment a rename a variable/symbol
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-25 11:14:03 +02:00
Valerio Setti
d0371b0a08 debug: keep ECDH_C guard for debug printf accessing ecdh_context's items
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-25 10:57:01 +02:00
Valerio Setti
60d3b91eba tls: use TLS 1.2 macros in ssl_tls12_server.c
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-07-25 10:43:53 +02:00
Tom Cosgrove
17526a0d16
Merge pull request #7906 from yanrayw/add-pake_guards_psa_crypto
PSA: add guards for PAKE getter functions
2023-07-24 15:59:28 +01:00
Gilles Peskine
5647d06be8
Merge pull request #7518 from gilles-peskine-arm/psa_inject_entropy-file-stability
Fix and test MBEDTLS_PSA_INJECT_ENTROPY
2023-07-21 17:37:15 +02:00
Ronald Cron
87f62850f3
Merge pull request #7893 from ronald-cron-arm/misc-from-psa-crypto
Miscellaneous fixes resulting from the work on PSA-Crypto
2023-07-21 10:54:41 +02:00
Xiaokang Qian
c495845e7a Align ECP_MPI_INIT with mbedtls_mpi struct order in ecp_new.c
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
2023-07-21 08:22:13 +00:00