Topic: wc_ecc_shared_secret - RNG required but not provided error
I am implementing exchange compress ecc key with wc_ecc_shared_secret, but I received -236 error (RNG required).
I have checked the init and make key are working well. I also already initiate the rng. I export the public key using wc_ecc_x963_ex ( &private_key, public_key, &size, 1) (size = 33), if I am understand it correctly, p256 will return 33 bytes public key. I then import the public key using wc_ecc_x963 (public_key, 33, &pk_receive) where pk_receive is an initiated ecc_key.
To test the exchange key, I call wc_ecc_shared_secret( &another_private_key, &pk_receive, sharedSecret, &shareSec_size) and then I get the -236 error.
Could you please let me know where I did it wrong or what am I missing to use the shared_secret function.
Thank you in advance.