wolfssl-examples/pk/ecdh_generate_secret
JacobBarthelmeh 912c585989
Merge pull request #411 from dgarske/keywrap
Example for key wrap using ECDH, HKDF and AES GCM
2025-03-26 03:50:37 +07:00
..
Makefile Clean up wolfSSL path variable name 2024-04-04 13:28:23 -04:00
README.md Add Curve448, Ed448 and Ed25519 examples 2020-06-18 13:16:03 +10:00
ecdh_gen_secret.c Merge pull request #411 from dgarske/keywrap 2025-03-26 03:50:37 +07:00

README.md

An example of generating an ecdh secret

Building: configure wolfssl with --enable-curve25519 --enable-curve448 --enable-ecc and make install

Makefile by default uses /usr/local for LIB_PATH to find /usr/local/include and /usr/local/lib. If you configured wolfSSL with --prefix=/my/custom/path update the makefile LIB_PATH variable to use /my/custom/path instead.

run 'make'

Currently supports curves:

SECP256R1 CURVE25519 CURVE448

Usage:

./ecdh_gen_secret - Will ask for run-time user input ./ecdh_gen_secret 1 - no run-time user input, uses SECP256R1 ./ecdh_gen_secret 2 - no run-time user input, uses CURVE25519 ./ecdh_gen_secret 3 - no run-time user input, uses CURVE448

NOTE: By default the example generates keys at run time for use. If you would prefer to use buffers see wolfcrypt/test/test.c example of importing keys with the wc_ecc_import, wc_curve25519_import or wc_curve448_import API's (imports from a buffer to a key structure).

Best of luck in all your testing, contact the wolfSSL support team via email at support@wolfssl.com or through the zendesk portal at https://wolfssl.zendesk.com if you have any questions or issues. Thanks!

  • The wolfSSL Team