Tom Cosgrove
bc519a59d0
Merge pull request #8188 from paul-elliott-arm/fix_pkcs7_use_uninit
...
Prevent potential use of uninitialised data in pkcs7 tests
2023-09-12 17:51:21 +01:00
Paul Elliott
a722d0a415
Update CMake minimum version(s) to match main CMakeLists.txt
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-09-12 16:42:14 +01:00
Waleed Elmelegy
2b143c67a4
Add changelog entry for checking set_padding() before cipher_finish()
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2023-09-12 16:20:35 +01:00
Dave Rodgman
9b1ae3d7c8
Merge pull request #1059 from daverodgman/ct_memcmp_fix
...
Constant time memcmp check for 16-bit int
2023-09-12 16:13:03 +01:00
Tom Cosgrove
9d8a7d62f5
Use the correct variable when tracking padding length
...
Fixes an error introduced in a81373f80
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-09-12 16:01:52 +01:00
Gilles Peskine
1d9e8f1a07
Merge pull request #7797 from gilles-peskine-arm/python-cryptography-on-windows
...
Revert "Install cryptography only on linux platform"
2023-09-12 13:58:10 +00:00
Waleed Elmelegy
57d09b72ef
Return back to modifying input parameters in pkcs12_parse_pbe_params
...
Return back to modifying input parameters in pkcs12_parse_pbe_params
to avoid change in behaviour.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2023-09-12 14:05:10 +01:00
Waleed Elmelegy
a7d206fce6
Check set_padding has been called in mbedtls_cipher_finish
...
Check set_padding has been called in mbedtls_cipher_finish
in modes that require padding.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2023-09-12 13:39:36 +01:00
Dave Rodgman
bd58944252
Avoid implementation defined behaviour
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-12 12:38:53 +01:00
Paul Elliott
45b6e5e69f
Prevent potential use of uninitialised data in pkcs7 tests
...
Move the initialisation of the pkcs7 object to before the first possible
test failure, otherwise failure in those tests could result in an
uninitialised pointer being free'd. Found by coverity.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2023-09-12 11:58:21 +01:00
Dave Rodgman
49d7223036
Fix test under memsan
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-12 11:03:23 +01:00
Dave Rodgman
1a1b03bfb4
Merge pull request #1024 from daverodgman/safer-ct-changelog
...
Changelog for safer constant-time
2023-09-12 10:59:14 +01:00
Dave Rodgman
2b0d53a2a8
Merge pull request #7590 from daverodgman/ct-x86-asm
...
Constant time asm for x86 and x86-64
2023-09-12 09:58:44 +00:00
Dave Rodgman
50b0a35494
Test INT_MAX rather than UINT_MAX
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-12 09:30:44 +01:00
Dave Rodgman
98926d5fb1
Update comment, and replace bit-twiddling with #error
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-12 09:29:33 +01:00
Dave Rodgman
70e022b024
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-12 09:29:13 +01:00
Manuel Pégourié-Gonnard
ba63e0ce34
Use macros for sizes in p256-m driver
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:18 +02:00
Manuel Pégourié-Gonnard
138bdb6b17
Add comment to p256-m driver JSON file
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:18 +02:00
Manuel Pégourié-Gonnard
e9d97976b2
Update list of ignored tests
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:17 +02:00
Manuel Pégourié-Gonnard
96839e7450
Move common things to common function
...
These should be shared between ref and accel, for meaningful coverage
comparison.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:17 +02:00
Manuel Pégourié-Gonnard
0509b5878c
Fix INVALID vs NOT_SUPPORTED issue in test suite
...
This fixes the last remaining failure.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:17 +02:00
Manuel Pégourié-Gonnard
f0251e0824
Improve error codes in p256-m driver
...
Fix 19 out of 20 errors in test_suite_psa_crypto mentioned in the
previous commit. The remaining error will be fix in the next commit.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:16 +02:00
Manuel Pégourié-Gonnard
25b45db3d8
Disable ECP_C in component with p256-m driver
...
Builds, but 20 test cases failing in test_suite_psa_crypto, to be
addressed in future commits.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:16 +02:00
Manuel Pégourié-Gonnard
92a386f24c
Add JSON file for p256-m driver
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:16 +02:00
Manuel Pégourié-Gonnard
18d7142efd
Add export_public_key entry point to p256-m driver
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:15 +02:00
Manuel Pégourié-Gonnard
5424cf2e40
Add import_key entry point to p256-m driver
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:15 +02:00
Manuel Pégourié-Gonnard
bac6d9a703
Add key management utilities to p256-m
...
Those will be needed in order for the driver to implement all the PSA
key management entry points (currently only implements key generation).
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-09-12 09:50:14 +02:00
Ronald Cron
9b9ac4c6ef
Merge pull request #8175 from ronald-cron-arm/fix-query-config-generation-with-cmake
...
Fix query_config.c generation with CMake build system
2023-09-12 06:03:01 +00:00
Ronald Cron
ad2f351c6b
Merge pull request #8171 from ronald-cron-arm/misc-minor-fixes
...
One minor fix
2023-09-12 06:00:48 +00:00
Dave Rodgman
4f26770291
Ensure mbedtls_ct_memcpy behaves correctly with 16-bit int
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 19:10:09 +01:00
Dave Rodgman
140d5c77d0
Add single-bit difference tests
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 19:10:05 +01:00
Dave Rodgman
dc669a1944
Fix type error
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 18:39:57 +01:00
Dave Rodgman
5265c318a0
Fix type-conversion error
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 18:04:13 +01:00
Dave Rodgman
49352832c9
Eliminate duplicate of mbedtls_asn1_find_named_data
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 17:10:43 +01:00
Dave Rodgman
33287ae134
Tidy up mbedtls_asn1_write_len
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 17:10:43 +01:00
Dave Rodgman
cf5f746a8c
Refactor out some common code
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 16:27:34 +01:00
Dave Rodgman
7fda906a68
Merge pull request #8161 from gilles-peskine-arm/config-boolean-options-wrong-section-202309
...
Fix module configuration options in mbedtls_config.h
2023-09-11 15:08:56 +00:00
Dave Rodgman
3bbedf6ba0
code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 16:06:28 +01:00
Dave Rodgman
9f366b07ea
Reduce code size in mbedtls_asn1_write_len
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 16:00:03 +01:00
Dave Rodgman
82fe0828b2
Merge pull request #8180 from daverodgman/sha2-zeroize
...
Ensure all md_<hash>_finish functions perform zeroization
2023-09-11 15:13:27 +01:00
Dave Rodgman
aafd1e0924
Ensure all md_<hash>_finish functions perform zeroization
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-11 12:59:36 +01:00
Paul Elliott
ce1bb3d1da
Merge pull request #8178 from tom-cosgrove-arm/remove-tautological-null-pointer-check-sha3_c
...
Remove always-false null pointer check in sha3.c that Coverity complains about
2023-09-11 10:54:36 +00:00
Tom Cosgrove
876346e451
Remove always-false null pointer check in sha3.c that Coverity complains about
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2023-09-11 09:03:01 +01:00
Gilles Peskine
ecc99611e4
Reinforce warning about a significant comment
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-09 22:54:26 +02:00
Gilles Peskine
1bfc09bca7
Move comment to its intended location
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-09 21:26:05 +02:00
Gilles Peskine
eeed74e697
Fix prepare_release.sh -u
with CMakeLists.txt
...
We want to keep GEN_FILES defaulting off on Windows.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2023-09-09 21:00:30 +02:00
Dave Rodgman
3f8e483eed
Mark y as modified in x86 asm for mbedtls_ct_uint_lt
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-08 17:57:40 +01:00
Dave Rodgman
4a97e73661
Eliminate a redundant not from x86 asm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-08 17:26:18 +01:00
Dave Rodgman
b6b8f6c68d
Make variable name consistent in x86_64 asm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-08 17:19:32 +01:00
Dave Rodgman
5f249852a5
Better register allocation for x86_64 asm
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-09-08 17:18:29 +01:00