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

Reply
  • 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

Children
  • 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?

  • I'm sorry for the delay on this, I've been sick the lately and haven't been able to look into this. Have you made any progress lately? If not, I can do some investigation on how to go about this? Also, why are you using CC310 to start with? Coudn't you do it in SW first?

    Best regards,

    Simon

  • I haven't made progress on this yet myself.  

    I'm wanting to use the CC310 for this because of what I understand are the standard reasons for using a hardware accelerator.  Lower power, faster, and uses less code space.  If the CC310 didn't support SRP I wouldn't have considered it.

    It starting to look like the answer here is that while the hardware supports the feature, the library doesn't.  If that's the reality then please let me know and I'll look at different options for the feature SRP was going to be a component of.  

  • Hi,

    Your understanding is correct. The CC310 support SRP, but the SW support for it is not complete yet. We have not been able to find a way to use it on the nRF91 with the current nrfxlib. Unfortunately I do not have a timeline for when the SW support will be in place.

Related