This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to get CCRndContext_t pointer needed for SRP

I am looking at using SRP in our application and I am looking through "nrfxlib/crypto/nrf_cc310_mbedcrypto/include/mbedtls_extra/mbedtls_cc_srp.h".  

There is a parameter to the "mbedtls_srp_init" function for a struct with type "CCRndContext_t".

This structure isn't defined or used anywhere outside of pre-compiled code it seems, so I am curious what is the intended means of getting a valid instance of this struct for the init function?

Thank you!

Parents
  • This structure isn't defined or used anywhere outside of pre-compiled code it seems,

    This isn't correct, it is defined here. Read this text as well.

    Unfortunately we do not have any examples (except for precompiled binaries) that demonstrates how to use this. As pointed out here

    I talked to a colleague and got an explanation how to use this:

    "In short it is just a chunk of memory that the users puts of for RNG, and can always get sent along as a pointer to an RND-call. CC310 and many other crypto libraries quite often use it

    In addition, it can be used as a handle, even though is not as relevant for RNG as it is only one instance of it"

    Best regards,

    Simon

  • I messed up my question when I said it wasn't defined.

    What I meant is an instance of the structure isn't initialized anywhere that I can use from application code.  I either need a pointer to an instance that is already within in the pre-compiled libnrf_cc310_platform_0.9.2.a library or some procedure to create my own instance of it.

    So I guess that is my real question.  How do I get or create an instance of that structure to pass into the "mbedtls_srp_init" function?

Reply
  • I messed up my question when I said it wasn't defined.

    What I meant is an instance of the structure isn't initialized anywhere that I can use from application code.  I either need a pointer to an instance that is already within in the pre-compiled libnrf_cc310_platform_0.9.2.a library or some procedure to create my own instance of it.

    So I guess that is my real question.  How do I get or create an instance of that structure to pass into the "mbedtls_srp_init" function?

Children
Related