navneet83 / Cross-platform-AES-encryption

Basic cross platform AES encryption
Apache License 2.0
319 stars 152 forks source link

Add authentication #61

Open Vinc0682 opened 5 years ago

Vinc0682 commented 5 years ago

The messages are currently not autheticated thus potentially allowing padding oracle attacks or other malicious modifications of the message. To fix this apply a message authentication code (MAC) like HMAC-SHA256 onto the ciphertext and verify it BEFORE decrypting the message.