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

Everest integration #140

Merged
merged 78 commits into from
Aug 29, 2019
Merged

Conversation

yanesca
Copy link
Collaborator

@yanesca yanesca commented Jun 5, 2019

This PR is the result of rebasing Mbed-TLS/mbedtls#2073 on the top of Mbed Crypto development.

This PR has to be merged shortly before Mbed-TLS/mbedtls#2799 to avoid CI failures.

@yanesca yanesca force-pushed the everest_integration branch 2 times, most recently from a2d1cc8 to e6707db Compare June 6, 2019 15:00
@yanesca
Copy link
Collaborator Author

yanesca commented Jun 7, 2019

On the CI the crypto job is passing, the TLS part of the pr jobs is failing, because the Mbed TLS build scripts seem to pick up the the TLS version of the crypto related headers and not the crypto version. (Changing this might make sense since crypto does not have the ssl headers anymore, but since the crypto files will be deleted soon, I don't think it is worth the effort.)

@wintersteiger
Copy link

Just checking: could you give us a rough idea of when this will be merged?

@yanesca
Copy link
Collaborator Author

yanesca commented Jul 18, 2019

Splitting the repository into Mbed TLS and Mbed Crypto complicated things: This PR is the part of the changes that need to go in Mbed Crypto. There is another part that needs to go in Mbed TLS. Before we could raise this second PR, we need to finish up a splitting related task in Mbed TLS first. Once it is done we will raise the second PR as soon as possible and we can get both of them merged.

@wintersteiger
Copy link

Sounds good, thanks for the update!

@achamayou
Copy link

@yanesca any update on this PR? We would be very keen to pick up a release of mbedtls with these changes in for our project.

Christoph M. Wintersteiger added 21 commits August 19, 2019 13:19
These files are automatically generated by the Everest toolchain from F*
files. They do not respect the mbedTLS code style guidelines as manual
modification would invalidate verification guarantees. The files in
3rdparty/everest/include/kremli{n,b} are a customized (minimzed) version of the
support headers expected by the code extracted using KreMLin.
This allows the use of #ifdef ... #endif in enum definitions (e.g.,
mbedtls_ecdh_variant in ecdh.h).
This being the first 3rdparty-contribution, we may want to consider the
structure of the project file generation scripts. Perhaps add small,
constribution-specific scripts to each directory in 3rdparty instead of adding
all constraints to generate_visualc_files.pl?
@yanesca yanesca force-pushed the everest_integration branch from e6707db to c25df68 Compare August 19, 2019 12:38
@yanesca yanesca added enhancement New feature or request needs: ci Needs a passing full CI run needs: preceding PR Requires another PR to be merged first labels Aug 19, 2019
@yanesca
Copy link
Collaborator Author

yanesca commented Aug 19, 2019

@achamayou I have rebased this PR, I'll still need to fix the CI failures (if any) and rebase Mbed-TLS/mbedtls#2073 before we could do the reviews and eventually merge.

@yanesca
Copy link
Collaborator Author

yanesca commented Aug 19, 2019

CI is only failing, because the PSA API is out of sync between Mbed TLS and Mbed Crypto. This is going to be resolved after merging Mbed-TLS/mbedtls#2767.

@yanesca yanesca added needs: review The pull request is ready for review. This generally means that it has no known issues. and removed needs: ci Needs a passing full CI run labels Aug 19, 2019
@Patater Patater added needs: ci Needs a passing full CI run and removed needs: preceding PR Requires another PR to be merged first labels Aug 20, 2019
@achamayou
Copy link

@yanesca thank you for the update, we look forward to using x25519 in mbedtls.

@yanesca
Copy link
Collaborator Author

yanesca commented Aug 21, 2019

The CI fails only on the check-names script when testing with Mbed TLS. The reason is that MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED is not present in the Mbed TLS config file yet. This will be fixed when Mbed-TLS/mbedtls#2799 is merged.

@yanesca yanesca removed the needs: ci Needs a passing full CI run label Aug 21, 2019
At this point Mbed TLS and Mbed Crypto headers with the same name,
including the Mbed Crypto headers in `everest_inc` breaks Mbed TLS
builds.
@yanesca
Copy link
Collaborator Author

yanesca commented Aug 22, 2019

API checking fails on the head, because the development has been updated since the PR had been raised. Merging to development should fix this failure.

Copy link
Contributor

@dgreen-arm dgreen-arm left a comment

Choose a reason for hiding this comment

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

I've reviewed this by comparing it to the approved PR at Mbed-TLS/mbedtls#2073, this PR implements all the relevant parts in the same manner.

@Patater
Copy link
Contributor

Patater commented Aug 22, 2019

I see a check-names failure. Anything we can do to avoid it?

******************************************************************
* check_names: test/build: declared and exported names 
* Wed Aug 21 14:55:44 UTC 2019
******************************************************************
Analysing source code...
1494 macros
     210 enum-consts
1390 identifiers
413 exported-symbols

Exported symbols declared in header: PASS
Names of actual-macros: PASS
Names of enum-consts: FAIL
#endif
#ifdefined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)
Names of identifiers: PASS
Likely typos: PASS

Overall: FAILED
^^^^check_names: test/build: declared and exported names: tests/scripts/check-names.sh -v -> 1^^^^

@yanesca
Copy link
Collaborator Author

yanesca commented Aug 22, 2019

@Patater That failure is in the TLS tests, and uses TLS's scripts that can't be updated by this PR but are updated by Mbed-TLS/mbedtls#2799. The failures should go away when 2799 is merged into Mbed TLS. (PR2799 uses this PR as a submodule and the CI is green over there.)

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

Before merge, we should have automated tests for Everest crypto on Windows.

@Patater Patater removed the needs: review The pull request is ready for review. This generally means that it has no known issues. label Aug 29, 2019
@Patater Patater merged commit f071654 into ARMmbed:development Aug 29, 2019
@Patater
Copy link
Contributor

Patater commented Sep 5, 2019

@wintersteiger Thanks a lot for your contribution! And especially thanks for your patience working with us to get this in. Much appreciated!

@wintersteiger
Copy link

Many thanks for getting this merged! It took a little longer than expected, but we're very happy it's now in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants