Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge development 2.x into 3.0 (Apr 19) #4366

Conversation

gilles-peskine-arm
Copy link
Contributor

Update development_2.x in development_3.0. Includes #4318 which fixes an issue whereby #4174 + #4344 breaks the CI.

TRodziewicz and others added 30 commits March 4, 2021 18:19
Fix function mbedtls_ecp_mul_shortcuts() to skip multiplication when m
is 0 and simply assignt 0 to R. Additionally fix ecjpake_zkp_read() to
return MBEDTLS_ERR_ECP_INVALID_KEY when the above condintion is met.

Fix Mbed-TLS#1792

Signed-off-by: TRodziewicz <[email protected]>
Long URLs are allowed only if they are alone on their lines.

Signed-off-by: Mateusz Starzyk <[email protected]>
Refer to URL regexes by 'self' argument.

Signed-off-by: Mateusz Starzyk <[email protected]>
Fix typo.
Remove line break in string's code formatting, to enable
searching the code for particular string.

Signed-off-by: Mateusz Starzyk <[email protected]>
Signed-off-by: Ronald Cron <[email protected]>
Move the handling of the sign out of the base-specific loops. This
both simplifies the code, and corrects an edge case: the code in the
non-hexadecimal case depended on mbedtls_mpi_mul_int() preserving the
sign bit when multiplying a "negative zero" MPI by an integer, which
used to be the case but stopped with PR Mbed-TLS#2512.

Fix Mbed-TLS#4295. Thanks to Guido Vranken for analyzing the cause of the bug.
Credit to OSS-Fuzz.

Signed-off-by: Gilles Peskine <[email protected]>
Write a simple unit test for mbedtls_ecp_muladd().

Add just one pair of test cases. Mbed-TLS#2 fails since PR Mbed-TLS#3512. Thanks to
Philippe Antoine (catenacyber) for the test case, found by ecfuzzer.

Signed-off-by: Gilles Peskine <[email protected]>
This header file will contain declarations of functions that are not
part of the public ABI/API, and must not be called from other modules,
but can be called from unit tests.

Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
We're subtracting multiples of 2^bits, not 2^(bits+32).

Signed-off-by: Gilles Peskine <[email protected]>
Fix the subtraction in fix_negative, which was incorrectly not looking
for a carry. This caused the result to be wrong when the least
significant limb of N was 0. Fix Mbed-TLS#4296.

The bug was introduced by d10e8fa
"Optimize fix_negative". Thanks to Philippe Antoine (catenacyber) for
reporting the bug which was found by his EC differential fuzzer.
Credit to OSS-Fuzz.

Signed-off-by: Gilles Peskine <[email protected]>
Export "internally" mbedtls_cipher_info_from_psa to be
able to use it in psa_crypto_cipher.c.

Signed-off-by: Ronald Cron <[email protected]>
As we want to do Mbed TLS aead operations as a
driver does, aead operations should not access
the key slot as key slots are not available to
drivers.

First step in this PR: move key resolution from
aead operation setup to psa_aead_encrypt/decrypt
APIs.

Signed-off-by: Ronald Cron <[email protected]>
As we want to do Mbed TLS aead operations as a
driver does, aead operations should not access
the key slot as key slots are not available to
drivers.

Second step in this PR: do not unlock the key slot
as part of operation abort.

Signed-off-by: Ronald Cron <[email protected]>
Signed-off-by: TRodziewicz <[email protected]>
gilles-peskine-arm and others added 18 commits April 9, 2021 16:46
…202104

Fix ECP arithmetic bug and read of zero-padded negative number
Don't try to make the reader guess what a “negative zero” might mean.

Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: TRodziewicz <[email protected]>
Signed-off-by: TRodziewicz <[email protected]>
…changelog-development

Changelog entry for mbedtls_mpi_read_string("-0")
Add PSA crypto driver delegation for AEAD single shot PSA APIs - 1
…unc_from_hashing

Remove deprecated things from hashing modules
…ngelog_entry

Allow changelog entries to have URLs exceeding 80 char limit.
This reverts commit 0961e3d.

This was merged by mistake in development instead of development_3.0.

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
This reverts commit 9a86843.

This was merged by mistake in development instead of development_3.0.

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
This reverts commit 48f6d0d.

This was merged by mistake in development instead of development_3.0.

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
This reverts commit c75d9f5.

This was merged by mistake in development instead of development_3.0.

Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
Fix ECDSA failing when the hash is all-bits-zero
Conflicts:
* visualc/VS2010/mbedTLS.vcxproj: resolved by re-generating the file
  with scripts/generate_visualc_files.pl.
@gilles-peskine-arm gilles-peskine-arm added needs-review Every commit must be reviewed by at least two team members, mbedtls-3 needs-reviewer This PR needs someone to pick it up for review labels Apr 19, 2021
Copy link
Contributor

@mpg mpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the parents of the merge commit:

Then I did the merge myself, got the same conflict as noted in the commit message, also resolved it by re-generating the file, and got the same result as this PR.

@mpg mpg merged commit 1cc91e7 into Mbed-TLS:development_3.0 Apr 19, 2021
daverodgman pushed a commit that referenced this pull request Apr 23, 2021
…e_2.x-20210419

Merge development 2.x into 3.0 (Apr 19)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants