Reciever:
$secureRandom = openssl_random_pseudo_bytes(32, $strong);
$private = curve25519_private($secureRandom);
$public = curve25519_public($private);
the reciever sends $public to the sender.
The sender encrypt the message 'Hello'
$x = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $public, 'Hallo', MCRYPT_MODE_CBC, 9999)
and send the encrypted message to the reciever.
the reciever can now decrypt the message with his private key
$result = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $private, DECRYPTED_MESSAGE, MCRYPT_MODE_CBC, 9999);
i await that $result has 'Hallo' but that do not work at me.
can you help?