Are there any plans to incorporate elliptic curves ED25519 and ED448 into swipl?
While migrating some services into swipl where we make extensive use of: signing (using load_private_key/3) and diffie-hellman exchanges (via crypto_name_curve/2) we’re unable to leverage the “simpler” edwards curves with swipl. The Edwards curves are (finally) recommended for US Govt use.
The inefficient and ugly workaround is to create a separate process for functionality akin to:
openssl genpkey -algorithm ED25519 -out test.pem
openssl pkey -pubout -in test.pem -out test.pub.pem
openssl pkeyutl -sign -rawin -inkey test.pem -in input.txt -out signature.bin
openssl pkeyutl -verify -rawin -pubin -inkey test.pub.pem -in input.txt -sigfile signature.bin
(using openssl v3+, rawin isn’t available in earlier versions).
I should add the swipl predicates for EC and crypto_data_hash make it surprisingly easy to do complex things, like double ratchet or most of signal protocol (for fun). Thank-you.
Ref: 1. “Recommendations for Discrete Logarithm-based Cryptography” for US Government use
2. FIPS 186-5 FEDERAL INFORMATION PROCESSING STANDARDS