Add ellswift usage example

This should hopefully be useful as orientation for users implementing
the key exchange part of BIP324. Conceptually the example is not very
different to the ECDH one, so a lot of code/comments are just copied
(e.g. context creation, secret key generation, shared secret comparison,
console output, cleanup with secret key clearing).
This commit is contained in:
Sebastian Falbesoner
2024-06-25 03:11:21 +02:00
parent fe4fbaa7f3
commit 31f84595c4
6 changed files with 143 additions and 0 deletions

View File

@@ -28,3 +28,7 @@ endif()
if(SECP256K1_ENABLE_MODULE_SCHNORRSIG)
add_example(schnorr)
endif()
if(SECP256K1_ENABLE_MODULE_ELLSWIFT)
add_example(ellswift)
endif()