Skip to content

Conversation

@avtolstoy
Copy link
Member

@avtolstoy avtolstoy commented Jun 21, 2019

Problem

We'd like to have access to mbedTLS functions available in system-firmware from user application in certain cases.

Solution

This PR exports crypto dynalib from system side and imports it from the user part.

Steps to Test

TODO

Example App

#include "application.h"
#include <mbedtls/ecjpake.h>
// for mbedtls_default_rng
#include "mbedtls_util.h"

/* executes once at startup */
void setup() {
    mbedtls_ecjpake_context test = {};
    
    mbedtls_ecjpake_init(&test);
    size_t olen = 123;
    mbedtls_ecjpake_derive_secret(&test, nullptr, 123, &olen, mbedtls_default_rng, nullptr);
    mbedtls_ecjpake_free(&test);
}

References

N/A


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

@m-mcgowan
Copy link
Contributor

m-mcgowan commented Aug 1, 2019

Just for the record, this is not planned to be released but is being made available for hacking. Currently, mbedtls is provided within the system so that the application can include its own version of the library.

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