Cryptography
1) Encoding vs Encryption vs. Hashing
Encoding: transforms data into another format using a scheme that is publicly available so that it can easily be reversed. It does not
require a key as the only thing required to decode it is the algorithm that was used to encode it. (eg: ascii, unicode, URL Encoding,
base64) - usability
Encryption: transforms data into another format in such a way that only specific individual(s) can reverse the transformation.
It uses a key, which is kept secret, in conjunction with the plaintext and the algorithm, in order to perform the encryption operation.
As such, the ciphertext, algorithm, and key are all required to return to the plaintext. (eg: AES, Blowfish, RSA) - confidentiality
Hashing: serves the purpose of ensuring integrity, (i.e. making it so that if something is changed you can know that it’s changed.)
Technically, hashing takes arbitrary input and produce a fixed-length string and the process is not reversible.
(eg: sha-3, md5) - integrity 2) Asymmetric (Public-Key Cryptography) vs Symmetric encryption
Symmetric encryption: uses the same key for both encryption and decryption - much faster but the key needs to be transferred over
an unencrypted channel
Asymmetric encryption: uses different keys for encryption and decryption - more secure but slow
Using a hybrid approach should be preferred. Setting up a channel using asymmetric encryption and then sending the data using
symmetric process.Last updated
Was this helpful?