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

Unable to get ECDH Shared Secret

Hi

We are using nrf mesh Android code  from GitHub and trying to get shared secret during the Provisioning Public Key PDU Process.

We are getting following error -(We are using the  code as it is)

java.security.spec.InvalidKeySpecException: Must use ECPublicKeySpec or X509EncodedKeySpec; was org.spongycastle.jce.spec.ECPublicKeySpec  in the line -

We are using the following version-

implementation  "com.madgag.spongycastle:core:1.58.0.0"
 implementation "com.madgag.spongycastle:prov:1.58.0.0"

  ECPublicKey publicKey = (ECPublicKey) keyFactory.generatePublic(keySpec);

Also wanted to understand that is Spongy castle library /package  still working or not. 

Please share your thoughts on this and also how to resolve the above error.

please add details about the new repository for nRF Mesh App if available for our reference.

Thanks,

Vithika

Related