28ff92cc3a
Add an explicit mbedtls_mpi_core_montmul_working_limbs() function
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2022-12-15 16:56:36 +00:00
30f3b4d601
Add mbedtls_mpi_core_check_zero_ct() and tests
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2022-12-15 16:56:36 +00:00
e9ffb6c8e9
Fix mbedtls_platform_zeroize() call in mbedtls_mpi_mod_modulus_free()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2022-12-15 16:56:36 +00:00
756a34aadc
Use lower case for p and r
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-15 14:53:43 +00:00
acdefdd51a
Unify RNG initialization that must be unified
...
mpi_core_random_basic and mpi_random_values must generate the same random
sequences in order to get the expected test coverage (where we know we'll
hit certain numbers of retries). Facilitate this by defining the RNG seed
only once.
Fix the seed to explicitly list all 16 words of the key. This isn't strictly
required (missing initializer fields get the value zero), but it's clearer.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2022-12-15 15:15:47 +01:00
0f644f48e9
Add output initialization requirement
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-15 14:13:32 +00:00
6b7ce968d2
Clarify some comments
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2022-12-15 15:04:33 +01:00
95b754dfac
Fix documentation
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com >
2022-12-15 15:04:20 +01:00
80a334ada3
Add generated tests for mod_raw_mul
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com >
2022-12-15 15:04:20 +01:00
979d34ca7d
Add mod_raw_mul function
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com >
2022-12-15 15:04:20 +01:00
031114d6ec
Hide check_test_cases warnings on the CI
...
We aren't paying attention to the warnings. So hide them and save log size.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com >
2022-12-15 14:46:31 +01:00
214ae64349
Replace \p with \c for non-parameter code typeset
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-15 13:36:07 +00:00
1d89ebf548
Clarify all functions operate modulo N
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-15 13:35:41 +00:00
a306886b3a
Add modulus to parameter ordering
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-15 13:35:41 +00:00
2e70b9afef
Reword bignum sizes section
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-15 13:35:41 +00:00
2bd263da1e
Fix grammar and spelling
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-15 13:35:40 +00:00
945a165a3c
Clarify output requirements
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-15 13:22:27 +00:00
eac8be76d6
Remove unnecessary type comment
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-15 13:22:17 +00:00
f5b4706974
TLS 1.3: Fix some test dependencies
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com >
2022-12-15 13:46:23 +01:00
e1eb75dc99
Specify modulus constraints
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-15 12:27:56 +00:00
9fa4897839
Merge pull request #6772 from wernerlewis/bignum_refactor_sub
...
Bignum: Refactor mpi_core_sub tests to use arch_split
2022-12-15 12:32:44 +01:00
081369111e
Merge pull request #6594 from gilles-peskine-arm/generate_test_code-function_comments
...
Allow comments in test function prototypes
2022-12-15 12:32:11 +01:00
116a5166d1
Merge pull request #6699 from gilles-peskine-arm/lcov-script
...
lcov script
2022-12-15 12:29:23 +01:00
7f4d15e84d
Update mbedtls_mpi_mod_sub() tests to incorporate mod_add test feedback
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2022-12-15 10:55:15 +00:00
50faa55e4d
Merge pull request #6732 from wernerlewis/bignum_6019_mod_add
...
Bignum: Implement mbedtls_mpi_mod_add()
2022-12-15 11:39:24 +01:00
59626b6179
Point to docker images used in the CI
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2022-12-15 10:08:26 +01:00
01f6e61781
Merge pull request #986 from Mbed-TLS/merge-back-3.3.0-3
...
Merge back 3.3.0 3
2022-12-14 19:18:05 +00:00
ebef3562c3
Revert "Add generated files"
...
This reverts commit c18d932705
.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2022-12-14 19:14:00 +00:00
8c89224991
Merge pull request #985 from Mbed-TLS/mbedtls-3.3.0rc2-pr
...
Mbedtls 3.3.0rc2 pr
v3.3.0
mbedtls-3.3.0
2022-12-14 19:06:39 +00:00
e90ed7d249
Bump versions for libmbedcrypto and libmbedtls
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2022-12-14 17:04:00 +00:00
552e10752b
ChangeLog fix
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2022-12-14 17:01:51 +00:00
c98624af3c
Merge pull request #6680 from valeriosetti/issue6599
...
Allow isolation of EC J-PAKE password when used in TLS
2022-12-14 11:04:33 +01:00
46e8fd8263
test: sha: test SHA224 and SHA256 separately
...
This is meant to adapt to the new library design in which
SHA224 and SHA256 can be built independently from each other.
Signed-off-by: Valerio Setti <vsetti@baylibre.com >
2022-12-14 10:58:02 +01:00
8c3534e70d
Merge pull request #6548 from davidhorstmann-arm/document-deprecation-process
...
Reword documentation on function deprecation
2022-12-14 10:56:58 +01:00
a3f99591f6
sha: make SHA-224 independent from SHA-256
...
Using proper configuration options (i.e. MBEDTLS_SHA224_C and
MBEDTLS_SHA256_C) it is now possible to build SHA224 and SHA256
independently from each other.
Signed-off-by: Valerio Setti <vsetti@baylibre.com >
2022-12-14 10:56:54 +01:00
4064a82802
Merge pull request #5600 from yuhaoth/pr/refactor-cookie-members-of-handshake
...
Refactor cookie members of handshake
2022-12-14 10:55:34 +01:00
898e7a3afe
test: sha: test SHA384 and SHA512 separately
...
This is meant to adapt to the new library design in which
SHA384 and SHA512 can be built independently from each other.
Signed-off-by: Valerio Setti <vsetti@baylibre.com >
2022-12-14 10:50:54 +01:00
ca906e9dd7
Remove B + A tests
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-14 09:44:05 +00:00
79341a4e7e
Reallocate X_raw to enforce no overflow
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-14 09:44:05 +00:00
eed01aabd3
Clarify wording in documentation
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-14 09:44:00 +00:00
25690a98f0
Rename oret to expected_ret
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-14 09:36:48 +00:00
ebf322ddf6
Merge pull request #6629 from concatime/cmake-config-dir
...
Install CMake files in MbedTLS dir
2022-12-14 10:30:52 +01:00
43363f5962
sha: make SHA-384 independent from SHA-512
...
Using proper configuration options (i.e. MBEDTLS_SHA384_C and
MBEDTLS_SHA512_C) it is now possible to build SHA384 and SHA512
independently from each other.
Signed-off-by: Valerio Setti <vsetti@baylibre.com >
2022-12-14 08:53:23 +01:00
70f8157ec5
Merge pull request #980 from Mbed-TLS/mbedtls-3.3.0rc1-pr
...
Mbedtls 3.3.0rc1 pr - Correct PKCS 7 memory leak fix
2022-12-13 19:25:58 +00:00
d75c5c4405
test: pake: fail in case the opaque key is destroyed unexpectedly
...
Signed-off-by: Valerio Setti <vsetti@baylibre.com >
2022-12-13 11:51:32 +01:00
2b70a3f831
Merge pull request #6558 from lpy4105/6416-psa_macros_name_typo
...
check_names: extend typo check to PSA macro/enum names
2022-12-13 09:56:27 +01:00
48232ed2c1
Merge pull request #6743 from minosgalanakis/bignum/implement_modular_negation
...
Bignum: Implement fixed width modular negation
2022-12-13 09:54:38 +01:00
f7641544ea
Correct the fix for the PKCS 7 memory leak
...
This corrects an issue in the origina fix in
4f01121f6e
.
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2022-12-12 21:59:03 +01:00
1362c5ab16
Test for both PKCS 7 bugs found by OSS-Fuzz
...
Previously the same test was repeated twice.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com >
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com >
2022-12-12 21:59:02 +01:00
91a2aabb86
Refactor mpi_core_sub tests to use arch_split
...
Tests are refactored to generate separate cases for 32-bit and 64-bit
limbs using arch_split. Duplicate arguments and branching in the test
function is removed.
Signed-off-by: Werner Lewis <werner.lewis@arm.com >
2022-12-12 17:18:43 +00:00