Asymmetric vs. Symmetric Cryptography
While asymmetric encryption works really well in untrusted environments, it’s also computationally more expensive and complex.
On the other hand, symmetric encryption algorithms are faster and more efficient in encrypting large amounts of data.
An asymmetric encryption algorithm is chosen as a key exchange mechanism or cipher. What this means is that, the symmetric encryption key or shared secret, is transmitted securely to the other party using asymmetric encryption to keep the shared secret secure in transit. Once the shared secret is received, data can be sent quickly and efficiently and securely using an symmetric encryption cipher.
MACs (Message Authentication Codes): A bit of information that allows authentication of a received message, ensuring that the message came from the alleged sender and not a third party masquerading as them
- It also ensures that the message wasn’t modified in some way in order to provide data integrity.
- HMAC (Keyed-Hash Message Authentication Codes): It uses a cryptographic hash function along with a secret key to generate a MAC
- CMACs (Cipher-based Message Authentication Codes): The process is similar to HMAC, but instead of using a hashing function to produce a digest, a symmetric cipher with a shared keys used to encrypt the message and the resulting output is used as the MAC
- CBC-MAC (Cipher block chaining message authentication codes): A mechanism for building MACs using block ciphers