Skip to content

Conversation

@gilles-peskine-arm
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm commented Dec 19, 2019

Update the SSL client code for ECDH using PSA crypto to the new elliptic curve key type encoding in ARMmbed/mbed-crypto#330.

This pull request and ARMmbed/mbed-crypto#330 need to be merged close together because the crypto PR breaks mbedtls. To merge:

  • 1. Merge the mbed-crypto PR.
  • 2. Amend the crypto submodule update commit in the mbedtls PR.
  • 3. Merge the mbedtls PR.
  • 4. Update mbedtls in mbed-os and update the mbed-os code that depends on EC curve encodings (PR forthcoming).

@gilles-peskine-arm gilles-peskine-arm added mbed TLS team needs-review Every commit must be reviewed by at least two team members, component-tls needs-preceding-pr Requires another PR to be merged first labels Dec 19, 2019
@gilles-peskine-arm gilles-peskine-arm force-pushed the psa-streamline_encodings-types_and_curves-ls branch from bdf6d80 to b314414 Compare December 19, 2019 12:46
@gilles-peskine-arm gilles-peskine-arm force-pushed the psa-streamline_encodings-types_and_curves-ls branch from b314414 to 3bac2d0 Compare December 19, 2019 16:40
@AndrzejKurek AndrzejKurek self-requested a review December 31, 2019 09:42
AndrzejKurek
AndrzejKurek previously approved these changes Dec 31, 2019
mpg
mpg previously approved these changes Jan 2, 2020
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.

LGTM

@mpg mpg removed the needs-review Every commit must be reviewed by at least two team members, label Jan 2, 2020
@mpg
Copy link
Contributor

mpg commented Jan 2, 2020

Note: CI is passing except for the API-ABI check, which is expected to fail as this PR indeed changes the API by updating the crypto submodule to a version with a new API.

@gilles-peskine-arm gilles-peskine-arm dismissed stale reviews from mpg and AndrzejKurek via 8a87d2b January 30, 2020 17:28
@gilles-peskine-arm gilles-peskine-arm force-pushed the psa-streamline_encodings-types_and_curves-ls branch 2 times, most recently from 8a87d2b to 1955b5f Compare January 30, 2020 19:25
@gilles-peskine-arm
Copy link
Contributor Author

I rebased to not have a conflict in the submodule update commit and to get up-to-date CI results.

@mpg
Copy link
Contributor

mpg commented Jan 31, 2020

The CI is still passing except the API/ABI check as expected, as it's kinda the point of this PR.

@gilles-peskine-arm gilles-peskine-arm force-pushed the psa-streamline_encodings-types_and_curves-ls branch from 1955b5f to edf00ce Compare January 31, 2020 09:25
@gilles-peskine-arm
Copy link
Contributor Author

CI is passing on HEAD except for a known flaky DTLS test case. We'll need to do another final round of CI after updating the crypto submodule once the crypto PR is merged.

AndrzejKurek
AndrzejKurek previously approved these changes Jan 31, 2020
Copy link
Contributor

@AndrzejKurek AndrzejKurek left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Previously in d875285:
* Mbed-TLS#333: Streamline PSA key type encodings: prepare
* Mbed-TLS#323: Initialise return values to an error

Previously in dbcb442:
* Mbed-TLS#291: Test MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
* Mbed-TLS#334: Fix some pylint warnings

Previously in ceceedb:
* Mbed-TLS#348: Bump version to Mbed TLS 2.20.0 and crypto SO version to 4
* Mbed-TLS#354: Fix incrementing pointer instead of value

In this commit:
* Mbed-TLS#349: Fix minor defects found by Coverity
* Mbed-TLS#179: Add option to build SHA-512 without SHA-384
* Mbed-TLS#327: Implement psa_hash_compute and psa_hash_compare
* Mbed-TLS#330: Streamline PSA key type and curve encodings
Adapt to the change of encoding of elliptic curve key types in PSA
crypto. Before, an EC key type encoded the TLS curve identifier. Now
the EC key type only includes an ad hoc curve family identifier, and
determining the exact curve requires both the key type and size. This
commit moves from the old encoding and old definitions from
crypto/include/mbedtls/psa_util.h to the new encoding and definitions
from the immediately preceding crypto submodule update.
@gilles-peskine-arm gilles-peskine-arm force-pushed the psa-streamline_encodings-types_and_curves-ls branch from edf00ce to 4245980 Compare January 31, 2020 13:57
@gilles-peskine-arm gilles-peskine-arm added needs-review Every commit must be reviewed by at least two team members, and removed needs-preceding-pr Requires another PR to be merged first labels Jan 31, 2020
@gilles-peskine-arm
Copy link
Contributor Author

The crypto PR is merged. I've updated the crypto submodule update commit in this PR for a final round of CI and review.

Copy link
Contributor

@Patater Patater left a comment

Choose a reason for hiding this comment

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

LGTM

Crypto submodule is now pointing to the current https://github.com/ARMmbed/mbed-crypto/tree/development, so no final updates should be required before merging (barring any other issues found in code review).

@gilles-peskine-arm
Copy link
Contributor Author

CI passed except for the expected API changes.

@gilles-peskine-arm gilles-peskine-arm merged commit 512d040 into Mbed-TLS:development Jan 31, 2020
@Patater Patater removed the needs-review Every commit must be reviewed by at least two team members, label Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants