Skip to content Skip to sidebar Skip to footer

Asp.net C# Encryption/decryption On Client And Server Side

Sir, I have the jquery solution to encryption on the client side but it create 'MD5' only. I want Salted Md5 Encryption on the Clientside and Decrypt it at the Server Side in A

Solution 1:

MD5 is a hash, not an encryption mechanism. Hashes are by their very nature lossy, and multiple inputs can (and by virtue of the pigeonhole principle absolutely will) produce the same outputs.

Running MD5 works like counting the number of vowels in a word. If I tell you that a word has 4 vowels in it, and ask you to tell me what the original word was, you simply don't have enough information to give me the the correct answer. You may be able to find some word that has 4 vowels in it, but you won't know whether the word you found was my word. Maybe it is, maybe it isn't. It's mathematically impossible for you to tell.

MD5 works the same way. You're throwing away tons of information, possible gigabytes or terabytes of information, and producing instead a single 16-byte summary.

It is, by intention, an inherently one-way process.

Solution 2:

MD5 cant be decrypted. It is a one way hash. Beside I find that anything that could be decrypted on the other end is insecure, in the case it is intercepted. Always design and code to ensure that you can validate a salt and not decrypt it :)

Post a Comment for "Asp.net C# Encryption/decryption On Client And Server Side"