473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

encryption

I am using the SHA1 algorithm to encrypt user passwords. Fair enough. Many user sign in forms also have a provision to
send you your password should you forget it. Is this possible
with sha1. Once encrypted, I don't see any we to retrieve it.
Brian
Jul 25 '07 #1
10 1201
dafodil
392 256MB
I am using the SHA1 algorithm to encrypt user passwords. Fair enough. Many user sign in forms also have a provision to
send you your password should you forget it. Is this possible
with sha1. Once encrypted, I don't see any we to retrieve it.
Brian

I don't have idea about this SHA1, since I don't use it but hope this link helps you

http://en.wikipedia.org/wiki/SHA-1#SHA-1_algorithm

This will test your reverse engineering skills.

good luck.
Jul 25 '07 #2
kovik
1,044 Expert 1GB
Hashing and encryption are different. Encryption means you can decrypt the data, but hashed data is irretrievable. The way you allow users to deal with forgotten passwords is to have a security question (or some other form of verification that they wouldn't forget), and then an email that gives them a randomly generated code that you have stored to confirm that it is the same person, then allow them to create a new password.

Security is a broad topic, and you should think about everything that could go wrong during the "forgot your password" process. You want to avoid other people from stealing a password, so take the necessary measures.
Jul 26 '07 #3
dafodil
392 256MB
You mean to say you can't decrypt SHA-1 since it is hashing?

How come in this site they said that SHA-1 is an encryption algorithm?
If you look closely at the first paragraph it is written that SHA-1 is a Hash encryption algorithm?
http://www.vocal.com/SHA1.html


I just want to clear things up.
SHA-1 algorithm is included in the Cryptographic hash function.
It means to say you that they are Data encryption functions.

Check this site for reference:
http://en.wikipedia.org/wiki/Cryptog...hash_functions

read the Applications of hash functions part over there.
There is a part there referring to password encryption.

First of all if Iam going to invent a formula to encrypt files, Why would I not want to decrypt it.
Right?
Jul 26 '07 #4
dafodil
392 256MB
There is already some security issues about SHA-1.

In various standards and applications, the two most-commonly used hash functions are MD5 and SHA-1. In 2005, security flaws were identified in both algorithms.

Reference:

http://en.wikipedia.org/wiki/Cryptog...hash_functions

There are other cryptographic hash functions. Check the table for the list.
Jul 26 '07 #5
kovik
1,044 Expert 1GB
So are you saying that SHA1 is encryption, and not hashing? Because all other SHA algorithms are hashing.
Jul 26 '07 #6
dafodil
392 256MB
So are you saying that SHA1 is encryption, and not hashing? Because all other SHA algorithms are hashing.
Its already written there its hashing. I just don't understand why you said that hashed data is irretrievable. When you can actually decrypt it.
Jul 26 '07 #7
nathj
938 Expert 512MB
I am using the SHA1 algorithm to encrypt user passwords. Fair enough. Many user sign in forms also have a provision to
send you your password should you forget it. Is this possible
with sha1. Once encrypted, I don't see any we to retrieve it.
Brian
I am having to develop a similar system. What I intend to do if a user forgets the password is generate a new random one.

However, they will have to identify themselves first by supplying:
1) Their username
2) Their main email address - the new password will be sent to this address
3) The contents of a captcha image.

The first two will be validated against the database and if there is no match the password is not reset.

For the purposes of my system this is fine, it may also be worth adding the security questions like mothers maiden name, name of junior school etc to this process.

I have deliberatly not developed a mechanism to decrypt the passwords as I don't want to to be able to know all the passwords. So if a user forgets their password then they get a new one which when used they can reset or keep.

This is my solution to the problem, without too much discussion on hashing and encryption.

Cheers
nathj
Jul 26 '07 #8
dafodil
392 256MB
I am having to develop a similar system. What I intend to do if a user forgets the password is generate a new random one.

However, they will have to identify themselves first by supplying:
1) Their username
2) Their main email address - the new password will be sent to this address
3) The contents of a captcha image.

The first two will be validated against the database and if there is no match the password is not reset.

For the purposes of my system this is fine, it may also be worth adding the security questions like mothers maiden name, name of junior school etc to this process.

I have deliberatly not developed a mechanism to decrypt the passwords as I don't want to to be able to know all the passwords. So if a user forgets their password then they get a new one which when used they can reset or keep.

This is my solution to the problem, without too much discussion on hashing and encryption.

Cheers
nathj
That's an alternative not actually a solution to the problem his asking.
Jul 26 '07 #9
nathj
938 Expert 512MB
That's an alternative not actually a solution to the problem his asking.
That's correct - but an alternative can indeed be a solution. The process of decrypting passwords is not one I would ever reccommend.

nathj
Jul 26 '07 #10
kovik
1,044 Expert 1GB
Its already written there its hashing. I just don't understand why you said that hashed data is irretrievable. When you can actually decrypt it.
That is where you are incorrect. Encryption is a function performed with a key that turns cleartext into unintelligible data, which can be reverted back using the key. Hashing is a one-time function that turns any data into a fixed length string.

If you don't understand what I'm saying, hash (using SHA-0 or higher, or MD5) any small string, then hash an entire paragraph. They both will produce the same amount of characters. What makes you think that they can possibly be decrypted to get their original contents?
Jul 26 '07 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Cliff | last post by:
We are trying to connect to 3 different Oracle databases using MS Access as the front-end and ODBC as the connection. The problem that we are having is that 1 of the databases requires a...
113
by: Bonj | last post by:
I was in need of an encryption algorithm to the following requirements: 1) Must be capable of encrypting strings to a byte array, and decyrpting back again to the same string 2) Must have the same...
7
by: Alan Silver | last post by:
Hello, I am writing a page where sensitive data is collected (over SSL) and stored in a database. I have been looking at the .NET encryption classes, but am a bit confused as to which is best...
2
by: Sumit Gupta | last post by:
Can anyone please tell me how to encrpt string or any kind of Data. Also the Algorithm of Compression. Any Link tutorial etc. Like : Zip or RAR Formats etc.
9
by: sweety | last post by:
Dear All, How to encrypt a C data file and make binary file and then have to read a bin file at run time and decrypt the file and have to read the data. Any help to achive this pls. Would be...
4
by: pintu | last post by:
Hello everybody.. I hav some confusion regarding asymmetric encryption.As asymmetric encryption it there is one private key and one public key.So any data is encrypted using private key and the...
1
by: =?Utf-8?B?bWljcm9ob2Y=?= | last post by:
Short version: Is there a way to configure (preferably programmatically) the max encryption strength that will be used by the framework when connecting to a particular SSL-protected web service? ...
11
by: John Williams | last post by:
I've written a simple program to do XOR encryption as my first foray into understanding how encryption works. The code compiles fine, however it segmentation faults on every run. using gdb to...
22
by: j1mb0jay | last post by:
I have had to create a simple string encryption program for coursework, I have completed the task and now have to do a write up on how it could be improved at a later date. If you could look...
19
by: klenwell | last post by:
Another request for comments here. I'd like to accomplish something like the scheme outlined at this page here: http://tinyurl.com/3dtcdr In a nutshell, the form uses javascript to hash...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.