How do cryptographic algorithms ensure secure communication and data protection?