Topic: How to ECDH using wolfssl API ? ( encryption & decryption.)
I don't know how to make ECDH using wolfssl api.
especially, encryption and decryption.
give me answer, plz.
Is there any ECDH examples using wolfssl api
regards
You are not logged in. Please login or register.
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
ReferenceswolfSSL - Embedded SSL Library → General Inquiries → How to ECDH using wolfssl API ? ( encryption & decryption.)
I don't know how to make ECDH using wolfssl api.
especially, encryption and decryption.
give me answer, plz.
Is there any ECDH examples using wolfssl api
regards
Hi kjjy7,
You would use the function:
wc_ecc_shared_secret
Parameter 1: your static private key
Parameter 2: Public key from the end entity used to generate the shared secret when combined with your private key
Parameter 3: an output buffer to store the shared secret
Parameter 4: the size of the output buffer when passed in, gets updated by calling function to indicate size of shared secret.
Example:
unsigned char* sharedOutBuf[512]; // size assumes a 256-bit curve field, adjust if using large curve field to (curve_fieldSz*2)
word32 sOutBSz = 512;
ret = wc_ecc_shared_secret(&userA_priv, &userB_pub, sharedOutBuf, &sOutBSz);
Regards,
Kaleb
I know this is an old thread, but follow up question:
Once the shared secret is created, how do you encrypt/decrypt with the wolfssl api?
Please checkout:
wc_ecc_encrypt(): https://www.wolfssl.com/doxygen/group__ … a32b9795b2
wc_ecc_decrypt(): https://www.wolfssl.com/doxygen/group__ … 804aca27e6
- KH
wolfSSL - Embedded SSL Library → General Inquiries → How to ECDH using wolfssl API ? ( encryption & decryption.)
Powered by PunBB, supported by Informer Technologies, Inc.
Generated in 0.017 seconds (90% PHP - 10% DB) with 11 queries