What is the difference between SHA and AES encryption?

What is the difference between SHA and AES encryption?

+51
encryption aes
Jun 13 '09 at 13:47
source share
6 answers

SHA is not encryption, it is a one-way hash function. AES (Advanced_Encryption_Standard) is a symmetric encryption standard.

AES Link

+71
Jun 13 '09 at 13:53
source share

SHA is a family of "safe hash algorithms" developed by the National Security Agency. There is currently competition among dozens of options for those who will become SHA-3 , the new hashing algorithm for 2012.

You use SHA functions to take a large document and calculate the "digest" (also called "hash") of the input. It is important to understand that this is a one-way process. You cannot take the digest and restore the original document.

AES , Advanced Encryption Standard is a symmetric block algorithm. This means that it takes 16 byte blocks and encrypts them. It is "symmetrical" because the key allows you to encrypt and decrypt.

UPDATE: Keccak was named SHA-3 winner on October 2, 2012.

+64
Jun 13 '09 at 13:59
source share

SHA and AES serve for different purposes. SHA is used to generate a data hash, and AES is used to encrypt data.

Here is an example of when the SHA hash is useful to you. Let's say you wanted to download an ISO DVD image from some Linux distribution. This is a large file, and sometimes things go wrong - so you want to check if the file you uploaded is correct. What you will do is go to a trusted source (for example, to the official distribution download point), and they usually have a SHA hash for the ISO image. Now you can create a comparable SHA hash file (using any number of open tools) for your uploaded data. Now you can compare the two hashes to make sure they match - which will confirm the image you uploaded is correct. This is especially important if you are getting an ISO image from an unreliable source (such as a torrent) or if you are having problems using the ISO and want to check if the image is damaged.

As you can see, in this case the SHA was used to check for data that was not corrupted. You have every right to see the data in ISO.

AES, on the other hand, is used to encrypt data or does not allow people to view this data, knowing some secret.

AES uses a shared key, which means that the same key (or associated key) that is used to decrypt the data is used to encrypt the data. For example, if I encrypted an email using AES, and I sent you this email, you and I should have known the common key used to encrypt and decrypt the email. This is different from algorithms that use a public key, such as PGP or SSL.

If you want to collect them together, you can encrypt the message using AES and then send the SHA1 hash code of the unencrypted message so that when decrypting the message, they can verify the data. This is a somewhat contrived example.

If you want to know more about these few Wikipedia search terms (besides AES and SHA) that you want to try, follow these steps:

Symmetric Key Algorithm (for AES) Cryptographic Hash Function (for SHA) Public Key Cryptography (for PGP and SSL)

+43
Jun 13 '09 at 14:26
source share

SHA stands for Secure Hash, and AES stands for Advanced Encryption Standard. Thus, SHA is a set of hashing algorithms. AES, on the other hand, is a cipher that is used for encryption. SHA-algorithms (SHA-1, SHA-256, etc.) Will take input and create a digest (hash), this is usually used in the digital signature process (it produces a hash of some bytes and a private key sign),

+4
Jun 13 '09 at 13:59
source share

SHA is a hash function, and AES is an encryption standard. Given input, you can use SHA to produce output that is unlikely to be produced from any other input. In addition, some information is lost when applying the function, therefore, even if you knew how to create input data that give the same result, this input is unlikely to be the same one that was used in the first place. On the other hand, AES is designed to protect against disclosure to third parties any data transferred between two parties using the same encryption key. This means that as soon as you know the encryption key and the output (and IV ...), you can easily return to the original input. Note that SHA does not require anything other than the input that you want to apply, while AES requires at least 3 gaps: what you encrypt / decrypt, the encryption key and the initialization vector (IV).

+4
Jun 13 '09 at 14:04
source share

SHA does not require anything but the input that you want to apply, while AES requires at least 3 things β€” what you encrypt / decrypt, the encryption key and the initialization vector.

+2
Nov 14 '11 at 9:30
source share



All Articles