What is the most preferred and secure way of combining both Encryption and MAC. There was a lecture on different combining strategies adopted by different protocols on a cryptography course by coursera.
- Authenticate then encrypt SSL
(MSG -> compute Tag(MSG)-> MSG + Tag -> Encrypt(MSG+Tag)
- Encrypt then authenticate IPSEC
(MSG -> encrypt(MSG) -> compute Tag(encrypted MSG) -> encrypted MSG + tag)
- Encrypt and authenticate SSH
(MSG -> encrypt(MSG) -> compute Tag(MSG) -> encrypted MSG + tag
The lecture concluded with IPSEC approach being the correct implement but i still lacks mathematical background and why SSL approach is not preferred.