473,507 Members | 4,494 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Decrypt

Hello,

I used this article
(http://aspnet.4guysfromrolla.com/articles/103002-
1.2.aspx) to encrypt my password. Now I need to decrypt
the password again to a string. Is that possible, if so
how?

Thanks
Nov 18 '05 #1
7 2682
why do you want to decrypt it? have you forgotten it :)

if you just want to check the incoming password then just encrypt that too,
and compare the two encrypted versions.

-
AM

"Vishal" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
Hello,

I used this article
(http://aspnet.4guysfromrolla.com/articles/103002-
1.2.aspx) to encrypt my password. Now I need to decrypt
the password again to a string. Is that possible, if so
how?

Thanks

Nov 18 '05 #2
MD5 is a hashing algorighm. This is a one-way encrypt. You cannot decrypt
this password. Only thing you can do is use the same hashing function you
used to hash the password the first time..then compare it to the hashed
password to the one stored in the database. This article explains this in
the Limitations of Storing Encrypted Passwords in the Database section
"Vishal" wrote:
Hello,

I used this article
(http://aspnet.4guysfromrolla.com/articles/103002-
1.2.aspx) to encrypt my password. Now I need to decrypt
the password again to a string. Is that possible, if so
how?

Thanks

Nov 18 '05 #3
Vishal... I think you must have misunderstood the purpose of the MD5
algorithm. It is designed to create a "message digest". This allows you
to
verify a password without actually storing the password on the server.
As
such, it is a one way algorithm, designed to make it difficult to
compute the
original password from the message digest. For example, a crude method
would be to XOR all of the bytes in a password and store the result on
the
server creating a crude message digest.

Regards,
Jeff
I used this article

(http://aspnet.4guysfromrolla.com/articles/103002-
1.2.aspx) to encrypt my password. Now I need to decrypt
the password again to a string. Is that possible, if so
how?<
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4
Thanks to all for the reply. Yes I somehow misunderstood
the MD5 algorithms. I overread that it is a one way
encryption. Can anybody tell me which encryption is used
for two-way? So that I can encrypt/decrypt the passwords?

Thanks

-----Original Message-----
Vishal... I think you must have misunderstood the purpose of the MD5algorithm. It is designed to create a "message digest". This allows youto
verify a password without actually storing the password on the server.As
such, it is a one way algorithm, designed to make it difficult tocompute the
original password from the message digest. For example, a crude methodwould be to XOR all of the bytes in a password and store the result onthe
server creating a crude message digest.

Regards,
Jeff
I used this article(http://aspnet.4guysfromrolla.com/articles/103002-
1.2.aspx) to encrypt my password. Now I need to decrypt
the password again to a string. Is that possible, if so
how?<
*** Sent via Developersdex http://www.developersdex.com

***Don't just participate in USENET...get rewarded for it!
.

Nov 18 '05 #5
Vishal... RC4 and DES are examples of two way algorithms. The .NET
cryptograhpy API has two way algorithms, but it is _not_ recommended
that you store the encrypted passwords on the server. If someone
compromises the server they can decrypt them. If you only store
hashcodes on the server, it will be difficult to recreate the password
table. In fact, don't just hash the passwords, but combine the password
with a random "salt" --> hash the result and store the hash and random
salt on the server. To verify the user's credentials, take the users
input, add it to the stored random salt --> hash the result and compare
it to the stored hash.

Regards,
Jeff
Can anybody tell me which encryption is used

for two-way? So that I can encrypt/decrypt the passwords?<

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #6
Vishal,

I understand that decrypting passwords is important -- you might have a user
who lost their password and needs to be reminded what their password is --
among other scenarios where decryption is necessary. Have a look at this
example (VB.NET example starts in the middle of the page):

How To: Encrypt and Decrypt Data Using a Symmetric (Rijndael) Key
(C#/VB.NET)
http://www.obviex.com/samples/Encryption.aspx

Good Luck,
Ben

"Vishal" <an*******@discussions.microsoft.com> wrote in message
news:92****************************@phx.gbl...
Thanks to all for the reply. Yes I somehow misunderstood
the MD5 algorithms. I overread that it is a one way
encryption. Can anybody tell me which encryption is used
for two-way? So that I can encrypt/decrypt the passwords?

Thanks

Nov 18 '05 #7
Hasing your password is better, you don't need to decrypt a password to validate it.

"Tampa .NET Koder" <Ta***********@discussions.microsoft.com> wrote in message news:<82**********************************@microso ft.com>...
MD5 is a hashing algorighm. This is a one-way encrypt. You cannot decrypt
this password. Only thing you can do is use the same hashing function you
used to hash the password the first time..then compare it to the hashed
password to the one stored in the database. This article explains this in
the Limitations of Storing Encrypted Passwords in the Database section
"Vishal" wrote:
Hello,

I used this article
(http://aspnet.4guysfromrolla.com/articles/103002-
1.2.aspx) to encrypt my password. Now I need to decrypt
the password again to a string. Is that possible, if so
how?

Thanks

Nov 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1396
by: Mark Hanford | last post by:
I've been setting up a new MySQL/PHP site which will contain store some CC details, and have been wondering how to pass the keys. CC's are written in a similar way to: INSERT INTO cc (ccName,...
1
3948
by: Benoît | last post by:
Hi, I have generated two keys : "C:>openssl req -nodes -new -x509 -keyout ben.key -out ben.crt -days 3650" I try to encrypt/decrypt a string like "JOHN" with these asymetrics keys. With the...
3
29201
by: Jimski | last post by:
Hello all, I am having a problem where I get an error message when I call FlushFinalBlock when decrypting my encrypted text. I am using the Rijndael algorithm. The error message is "Length...
4
9069
by: Hrvoje Voda | last post by:
Does anyone knows a good example of how to encrypt/decrypt a string? Hrcko
8
8154
by: Gidi | last post by:
Hi, Is there Buid-In fuction in C# that Encrypt and Decrypt strings? i have a textbox which i'm writing into file, and i want to encrypt it before writing, i'm not looking for something fancy,...
7
17858
by: Dica | last post by:
i've used the sample code from msdn to create an encyption/decryption assembly as found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT10.asp i'm...
0
3349
by: Hannibal111111 | last post by:
I found this code on a site for doing string encryption/decryption. The string will encrypt fine, but I get this error when I try to decrypt. Any idea why? I posted the code below. The error...
3
8210
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0...
1
4815
by: MimiMi | last post by:
I'm trying to decrypt a byte array in java that was encrypted in C#. I don't get any error messages, just a result that's completely not what I was hoping for. I think I am using the same type of...
2
17936
by: MimiMi | last post by:
I'm trying to decrypt a byte array in java that was encrypted in C#. I don't get any error messages, just a result that's completely not what I was hoping for. I think I am using the same type of...
0
7220
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7105
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7023
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7479
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1534
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
410
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.