Proof of possession. x25519 + ed25519
Is this scheme correct ? What should I review/read to make it correct ?
  


One obvious issue is that the client is willing to decrypt arbitrary ciphertexts with its private key.  Hence, if it uses the private key for any other purpose, well, it's insecure.


  
  In the article from Digital Ocean you can find that client doesn't send raw data back to server but gets md5 of it and sends only md5. Why so ?
  


Well, that's to prevent someone from using the client as a decryption Oracle; they still could use it as a "decrypt-and-MD5" Oracle, but that's not nearly as bad.

Personally, I would make three changes:


Replace MD5 with a modern hash (for example, SHA-256) - while MD5 is probably perfectly safe in this use, it has shown enough weaknesses that steering clear is probably the wiser option.
I'd replace the deterministic hash with a randomized one.  That is, I'd have the client pick a random string "r", and return the pair $r, SHA256( r || decryption )$.  That way, the client can't be used as a "decrypt-and-SHA256" oracle either.
On decryption failure, I'd make sure I'd pick a random decryption, and return the pair $r, SHA256( r || random )$ - there's no reason to give people a "is this a valid ciphertext" Oracle.


Actually, personally I'd probably replace this entire thing with a Schnorr proof of knowledge, but I rather assumed you didn't want to wholesale replace everything...