9bb7e6f4ce
Rename MBEDTLS_OPTIMIZE_ALWAYS
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-16 09:41:21 +01:00
48fd2ab5d5
Improve readability of unrolled AESCE code
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-16 09:36:50 +01:00
f45a5a0ddd
Merge pull request #7700 from silabs-Kusumit/PBKDF2_output_bytes
...
PBKDF2: Output bytes
2023-06-16 10:08:02 +02:00
2dd15b3ab5
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-15 20:27:53 +01:00
660cd378e1
Use MBEDTLS_OPTIMIZE_ALWAYS for gcm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-15 18:53:35 +01:00
9149c32192
Use MBEDTLS_OPTIMIZE_ALWAYS for ccm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-15 18:50:21 +01:00
f88a68cf51
Use MBEDTLS_OPTIMIZE_ALWAYS in aesce
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-15 18:46:41 +01:00
6cfd9b54ae
use MBEDTLS_OPTIMIZE_ALWAYS in AES-XTS
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-15 18:46:23 +01:00
a0b166e11e
Use mbedtls_xor_no_simd from cmac and cbc
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-15 18:44:16 +01:00
03bb526c24
Add a non-NEON variant of mbedtls_xor
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-15 18:43:24 +01:00
b055f75c3d
Introduce MBEDTLS_OPTIMIZE_ALWAYS
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-15 18:42:59 +01:00
7fdfd70b19
Introduce MBEDTLS_COMPILER_IS_GCC
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-15 18:42:25 +01:00
637c049349
Move mbedtls_ecp_modulus_type out of the public headers
...
This is an internal detail of the ECC arithmetic implementation, only
exposed for the sake of the unit tests
Mbed TLS 3.4.0 was released with the type mbedtls_ecp_modulus_type defined
in a public header, but without Doxygen documentation, and without any
public function or data structure using it. So removing it is not an API
break.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-06-15 19:07:41 +02:00
246e51fd0b
Add cleanup for intermediate buffer
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-06-15 22:15:43 +05:30
a2e48f751b
Split out mbedtls_ecp_mod_p448_raw()
...
Switch testing over to using the generic raw functions.
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2023-06-15 17:16:38 +01:00
b4df176610
Merge pull request #7637 from paul-elliott-arm/fixed_ecp_mod_p448
...
[Bignum] Fixed width for ecp mod p448
2023-06-15 17:12:02 +01:00
1c4451d089
Unroll aesce_decrypt_block
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-15 16:28:00 +01:00
96fdfb8e62
Unroll aesce_encrypt_block
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-15 16:26:20 +01:00
a05e9c1ec8
Fix selection of default FFDH group
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-06-15 17:07:16 +02:00
8c0a95374f
Adapt remaining guards to FFDH
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-06-15 17:07:10 +02:00
2e7d57270e
Merge pull request #7624 from daverodgman/aes-perf
...
AES perf improvements
2023-06-15 12:10:06 +01:00
6edf8b8c7b
Merge pull request #7451 from yanrayw/7376_aes_128bit_only
...
Introduce config option of 128-bit key only in AES calculation
2023-06-15 10:35:32 +01:00
d07761c19c
add return statement
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-06-15 12:11:15 +05:30
28a97acb3c
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-14 20:15:15 +01:00
bed9ac7b2d
Optimise final 2 rounds
...
Final two rounds logic could be significantly simplified.
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2023-06-14 19:20:33 +01:00
d05e7f1ab3
Do not use NEON for AES-CBC on aarch64
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-14 18:58:48 +01:00
906c63cf35
Revert "improve cbc encrypt perf"
...
This reverts commit f1e396c427
.
Performance is slightly better with this reverted, especially
for AES-CBC 192.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-14 17:55:41 +01:00
b8f7305b02
Replace sizeof(mbedtls_mpi_uint) with ciL define
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2023-06-14 17:52:42 +01:00
9e930e2887
Rename MBEDTLS_CIPHER_BLKSIZE_MAX internally
...
Replace all occurrences of MBEDTLS_CIPHER_BLKSIZE_MAX by the new name with
the same semantics MBEDTLS_CMAC_MAX_BLOCK_SIZE, except when defining or
testing the old name.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2023-06-14 18:00:37 +02:00
15ddda9ff8
Remove PSA_TO_MD_ERR from ssl_tls.c
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2023-06-14 07:37:46 -04:00
257ea00199
Use output block as U_accumulator
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-06-14 15:55:11 +05:30
3646dc78bc
Fix coding style issue
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2023-06-14 08:51:08 +01:00
436f2ad37c
Three round solution
...
Attempt to fix failing test by dealing with overflow with three rounds,
instead of previous subtract modulus solution. Also optimise out shifts
by using memcpy / memmove instead. Remove final sub to return canonical
result, as this is not required here.
Signed-off-by: Paul Elliott <paul.elliott@arm.com >
2023-06-13 17:39:44 +01:00
7d42c0d0e5
Code cleanup #2
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-06-13 12:30:40 +02:00
a6033ac431
Add missing guards in tls 1.3
...
Error translation is only used with these
defines on.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2023-06-13 05:46:47 -04:00
1e4a030b00
Fix wrong array size calculation in error translation code
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2023-06-13 05:46:47 -04:00
b22b9778c7
Move the ARRAY_LENGTH definition to common.h
...
Reuse it in the library and tests.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2023-06-13 05:46:47 -04:00
1c7a99856f
Add missing ifdefs
...
Make sure that the error translating functions
are only defined when they're used.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2023-06-13 05:46:47 -04:00
0064484a70
Optimize error translation code size
...
Introducing an intermediate function
saves code size that's otherwise taken by excessive,
repeated arguments in each place that
was translating errors.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com >
2023-06-13 05:46:46 -04:00
c216d94560
Merge remote-tracking branch 'origin/development' into safer-ct5
2023-06-13 10:36:37 +01:00
75a5a9c205
Code cleanup
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-06-13 09:57:23 +02:00
f27727b22e
Docs update
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-12 18:33:20 +01:00
1ab0b48ac3
Code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-12 18:22:18 +01:00
58c80f4d92
Make mbedtls_ct_zero non-static
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-12 18:19:46 +01:00
14f65a47c8
Merge pull request #7714 from daverodgman/sha3-update
...
SHA-3 update
2023-06-12 15:13:30 +02:00
5c394ff203
Use a single fast-path in mbedtls_xor, gains around 1% in benchmarks
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-09 20:10:36 +01:00
159dc099fd
Code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-09 19:46:07 +01:00
360e04f379
Fix AES-XTS perf regression
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-09 17:23:15 +01:00
b57b048ea7
Fix error: comparison of integers of different signs: 'SOCKET' and 'int'
...
Signed-off-by: Sergey <sergio_nsk@yahoo.de >
2023-06-09 09:18:46 -07:00
06c31fcd9f
x509_parse_time() perf
...
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com >
2023-06-09 17:02:35 +01:00