Commit graph

26844 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
Dave Rodgman
42391b4378 Perf improvement in memcpy_if
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-11 08:47:38 +01:00
Dave Rodgman
246210e3c4 Test CT asm under valgrind
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-11 08:47:38 +01:00
Dave Rodgman
822c9c7d4e Fix unified asm syntax issue
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-11 08:47:38 +01:00
Dave Rodgman
ef2527901e Add aarch32 const-time asm
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-11 08:47:38 +01:00
Dave Rodgman
c9ed5dee69 Add aarch64 const-time asm
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-11 08:47:38 +01:00
Valerio Setti
36344cecbd ssl-opt: remove redundant requirement for RSA_C
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 09:37:14 +02:00
Tom Cosgrove
5e678fd4d2
Merge pull request #8050 from gilles-peskine-arm/all.sh-remove-crypto_full_no_cipher
Remove redundant test component component_test_crypto_full_no_cipher
2023-08-11 07:28:10 +00:00
Valerio Setti
e0be95e81d analyze_outcomes: skip tests that depend on BIGNUM_C
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 06:35:23 +02:00
Valerio Setti
4f577f3e51 ssl-opt: add RSA_C requirement when RSA encryption is used in certificate
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 06:35:23 +02:00
Valerio Setti
711f853b48 ssl_tls13: fix guard for FFDH function
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 06:33:52 +02:00
Valerio Setti
18535c352d test: enable TLS, key exchances and ssl-opt teting in ecc_no_bignum()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-11 06:33:52 +02:00
Jerry Yu
240bb11171 Add gnu check for aseni assembly code
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-11 10:45:35 +08:00
Manuel Pégourié-Gonnard
26b7c93d9d
Merge pull request #7992 from valeriosetti/issue7755
driver-only ECC: BN.x509 testing
2023-08-10 19:41:09 +00:00
Manuel Pégourié-Gonnard
54da1a69a2
Merge pull request #7578 from daverodgman/safer-ct5
Improve constant-time interface
2023-08-10 16:57:39 +00:00
Tom Cosgrove
e7700a7d0a
Merge pull request #7936 from AgathiyanB/assert-false-macro
Add TEST_FAIL macro for tests
2023-08-10 15:01:34 +00:00
Gilles Peskine
33291ba35f
Merge pull request #5538 from gilles-peskine-arm/psa-thread_safety-doc
PSA thread safety requirements
2023-08-10 16:21:55 +02:00
Gilles Peskine
e6cb45e68e mbedtls_mpi_exp_mod: remove spurious copy of the output variable
Clear some confusion between `X` as the output variable and "X" as a name
given to the accumulator. Previous iterations of the code used the variable
`X` as the accumulator, but now that the accumulator is `W[x_index]`, some
of the comments didn't make sense.

Remove the copy of the initial value of `X` into `W[x_index]`, which was
meaningless: the initial value of an output variable should not, and did
not, matter. `W[x_index]` is later overridden unconditionally to take the
value `RR`.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-10 15:59:28 +02:00
Valerio Setti
efe848f430 pk: fix some comments
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 15:48:18 +02:00
Dave Rodgman
48fb8a3448 Fix some renames that were missed
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 14:01:51 +01:00
Valerio Setti
3580f448eb test: solve test disparities for x509[parse/write] suites
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 14:50:43 +02:00
Valerio Setti
c6aeb0dc1d check_config: remove unnecessary BIGNUM_C requirements
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 14:50:03 +02:00
Valerio Setti
29c1b4d04a test: enable X509 testing in ecc_no_bignum component
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 14:50:03 +02:00
Dave Rodgman
b364a22adf
Fix mbedtls_ct_size_if_else_0 docs
Co-authored-by: Tom Cosgrove <tom.cosgrove@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 12:25:25 +01:00
Dave Rodgman
38b227c16b Improve docs
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 12:18:27 +01:00
Dave Rodgman
ac69b45486 Document and test mbedtls_ct_size_if_else_0
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 12:18:13 +01:00
Dave Rodgman
065f912465 Fix comment typo
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 12:11:58 +01:00
Dave Rodgman
98ddc01a7c Rename ...if0 to ...else_0
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 12:11:31 +01:00
Dave Rodgman
b7825ceb3e Rename uint->bool operators to reflect input types
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-08-10 11:58:18 +01:00
Gilles Peskine
b2bc1712a5 Reduce the size of the small primes table used by primality testing
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-10 12:16:02 +02:00
Gilles Peskine
f5a29a5b83 Remove redundant test component
component_test_crypto_full_no_cipher doesn't bring any extra value given the
existence of component_test_full_no_cipher.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-08-10 12:07:49 +02:00
Manuel Pégourié-Gonnard
6beec7ca5e
Merge pull request #7989 from valeriosetti/issue7754
driver-only ECC: BN.PK testing
2023-08-10 09:43:56 +00:00
Manuel Pégourié-Gonnard
d170419eab
Merge pull request #7999 from valeriosetti/issue7759
Driver-only ECC: TLS: rm uses of mbedtls_debug_print_mpi
2023-08-10 08:34:57 +00:00
Manuel Pégourié-Gonnard
91c8372c01
Merge pull request #6999 from ivq/ecp_doc
Doc: Add note on special use of A in ecp group structure
2023-08-10 08:24:05 +00:00
Dave Rodgman
e5fbd93eaf
Merge pull request #8049 from daverodgman/bignum_codesize_misc
Bignum codesize misc
2023-08-10 10:58:13 +01:00
Jerry Yu
8189f32945 improve aesni check for x86_64
`MBEDTLS_AESNI_C` does not depends on `MBEDTLS_HAVE_ASM`
when intrinsic is available.

And compiler relative checks only work on x86_64, it should
be only checked on x86_64.

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-10 15:17:45 +08:00
Valerio Setti
e1d7c9dabd pkwrite: fix internal buffer size in pk_write_ec_pubkey()
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 07:40:18 +02:00
Jerry Yu
13696bb07b improve check config option for i386
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-10 13:36:32 +08:00
Valerio Setti
0f6d565d26 pk: return PK_USE_PSA_EC_DATA to pk.h
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 07:05:47 +02:00
Valerio Setti
2e0275d2a1 test: use unset-all option in config.py to optimize test code
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 07:05:47 +02:00
Valerio Setti
a8c655edb0 test: remove redundant code setting MBEDTLS_PSA_CRYPTO_CONFIG
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 07:05:47 +02:00
Valerio Setti
7c494e7211 pk: move PK_HAVE_ECC_KEYS to build_info.h
This is usefuls to use PK_HAVE_ECC_KEYS in check_config.h instead
of redefining it twice in different ways.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 07:05:47 +02:00
Jerry Yu
ba42b076f9 Remove asm check for aarch64 aesce
we implement it with aesce intrinsic. No asm needed.

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2023-08-10 12:53:26 +08:00
Valerio Setti
a7c9e09dd0 pkwrite: add new internal symbol to properly size DER buffer
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Valerio Setti
97b28f81d8 pkparse: remove unnecessary header
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Valerio Setti
fe7d96cff7 test: minor optimizations to ecc_no_bignum components
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Valerio Setti
c5d85e5ead test: remove BIGNUM dependencies from pk[parse/write] suites
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Valerio Setti
9b3dbcc2e3 analyze_outcomes: skip tests that unavoidably depend on bignum
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00
Manuel Pégourié-Gonnard
660bbf2470 test: disable BIGNUM support on the test ecc_no_bignum component
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-08-10 06:43:23 +02:00