4
I’d like to understand the difference between Encoding
, Encryption
and Hashing
and also examples of when using one or the other.
4
I’d like to understand the difference between Encoding
, Encryption
and Hashing
and also examples of when using one or the other.
6
Simplistic definition
Definition
Examples
Encoding:
Encryption:
Hashing:
Sources from Sopt himself:
3
Encoding, sometimes called "serialization", is to take some information (e.g., a set of characters) and represent it ("encode it") by means of a sequence of symbols (e.g., an array of bytes). Usually when talking about encoding is referring to Character encoding ("character encoding"), which is like abstract texts (sequences of Unicode Code Points) are expressed in bytes (either for transport or for internal processing).
Encryption (encryption, encryption) consists of transforming one readable information into another illegible ("indecipherable") by everyone except one who possesses a secret capable of deciphering it (called a "key"). The encrypted information can be transformed back into the original information, either with the same key used to encrypt (symmetric encryption, e.g.: AES, 3DES) or with a distinct key (asymmetric encryption, e.g.: RSA, ECC).
Hashing ("cryptographic shuffling function") is the process of converting a data of arbitrary size into a data of fixed size so that it is impracticable: a) to discover the original data from the hased data (pre-image resistance); b) given a hash and its origin, find different data of the same that produce the same hash (resistance to the second pre-image); c) easily produce different data that produce the same hash (collision resistance).
The main difference between Encryption and hashing is that the first process is reversible and the second is not. Uses of hash functions include:
An example where all three are used would be: I have a text in my computer memory, and I want to save it to a file that only I can access. First me code this text in UTF-8, then I encryption the resulting bytes using a key that only I know about (derived from a password, for example, or saved somewhere safe, such as a removable device) and finally I hashish the bytes encrypted so that when I go decrypt that file in the future I can be sure that no one has touched it (the hash also has to be saved in a safe place, for me to compare to the hash of the file in the future, but no matter the file size the hash will only be a few bytes).
As I like answers like this, they are more fluid and colloquial. Avoid that wear when reading a totally technical text. Congratulations, if a teacher’s salary was good, I would recommend that you think about being a.
Browser other questions tagged cryptography hash encode
You are not signed in. Login or sign up in order to post.
So by definition, when we say "encrypt the password on md5" we are wrong. correct?
– RodrigoBorth
Yes, md5 is a hash generating algorithm, which can be used to be
message digest
of a message that may or may not be encrypted, or for other purposes, a hash will never again be the object that originated it other than an encrypted data.– Ricardo