X25519
Curve25519/X25519
Another popular curve is Curve25519, which is 128-bit level, Curve448 is 256-bit level security.1
do
alicePrivateKey <- generateSecretKey
let alicePublicKey = toPublic alicePrivateKey
bobPrivateKey <- generateSecretKey
let bobPublicKey = toPublic bobPrivateKey
let aliceSharedKey = dh bobPublicKey alicePrivateKey
let bobSharedKey = dh alicePublicKey bobPrivateKey
return (aliceSharedKey == bobSharedKey)