Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Md5 Encryption Symmetric or Asymmetric?

For my iPhone application, Apple wants to know if my password encryption (md5) is greater then 64-bit symmetric or greater then 1024-bit symmetric. I have not been able to find it online, so I am wondering if anyone knows the answer. In addition, is this considered an appropriate encryption technology for passwords, or should I use something different?

Thanks for any help!

like image 875
PF1 Avatar asked Jan 05 '10 02:01

PF1


People also ask

Is hash encryption symmetric or asymmetric?

Common Encryption and Hashing AlgorithmsAsymmetric encryption uses two different keys, a public and private key, for encryption and decryption. The private key is used to encrypt data, and is kept a secret from everyone but the person encrypting the data.

Is SHA256 symmetric or asymmetric?

It is "symmetric" because the key allows for both encryption and decryption.

Why is MD5 insecure?

A major concern with MD5 is the potential it has for message collisions when message hash codes are inadvertently duplicated. MD5 hash code strings also are limited to 128 bits. This makes them easier to breach than other hash code algorithms that followed.

What is the difference between MD5 and SHA256?

The MD5 algorithm is designed to be quite fast on 32-bit machines. This algorithm found by Professor Ronald L. Rivest[2]. The SHA256 algorithm is a cryptography hash function and used in digital certificate as well as in data integrity.


4 Answers

MD5 is a hashing function, thus by definition it is not reversible. This is not the case for encryption (either symmetric or asymmetric), which has to be reversible to be useful.

To be more precise, hashes are one-way functions, in that an infinite number of inputs can map to a single output, thus it is impossible to obtain the exact input, with certainty, that resulted in a given output.

However, it may be possible to find a different input that hashes to the same output. This is called a collision.

Generally, hashing passwords instead of storing the plain text (even encrypted) is a good idea. (Even better if using a salt) However, MD5 has known weaknesses (and large collections of rainbow tables that aid in finding collisions), thus it would be a good idea to switch to something like SHA-1 or one of the SHA-2 family of hashes.

However, to answer your original question, there is really is no way to compare MD5 or any hash against any type of encryption; they have no equivalents because it's like comparing apples and oranges.

like image 82
Peter Avatar answered Nov 10 '22 03:11

Peter


md5 isn't really symmetric or asymmetric encryption because it isn't reversible either symmetrically or asymmetrically. It's a Message Digest (secure hash) algorithm.

like image 42
Nimrod Avatar answered Nov 10 '22 01:11

Nimrod


It's not encryption, it's a digest. If you didn't salt it, it's not particularly secure, but they're asking you the wrong question.

What exactly are you doing with MD5 and passwords? There are standard ways of doing things here, and it's always better to use one, but without knowing what you want to do it's hard to point you at a relevant standard.

like image 35
Andrew McGregor Avatar answered Nov 10 '22 02:11

Andrew McGregor


It is NOT encryption at all.

like image 27
President James K. Polk Avatar answered Nov 10 '22 03:11

President James K. Polk