New SHA Security Functions (Convert Value Back)

Moderator: NorbertKrupa

Post Reply
sarah
Intermediate
Intermediate
Posts: 77
Joined: Mon Aug 27, 2012 1:34 pm

New SHA Security Functions (Convert Value Back)

Post by sarah » Fri Dec 13, 2013 9:34 pm

Howdy!

Vertica 7 has the new SHA() security functions.

Code: Select all

dbadmin=> select sha256('Dog');
                              sha256
------------------------------------------------------------------
 0eb129bf94594aaeee66e38361d7be212cd927c3df4dd92e3ded2e0da0c7ad88
(1 row)
Is there a way I can covert " 0eb129bf94594aaeee66e38361d7be212cd927c3df4dd92e3ded2e0da0c7ad88" back to "dog"?

Thanks...
Have a GREAT day!

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: New SHA Security Functions (Convert Value Back)

Post by JimKnicely » Sat Dec 14, 2013 12:38 pm

SHA-1 is a one-way cryptographic hash function designed to make it practically impossible to reverse the process.

So the easiest answer to your question is "no" :(
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

quantomatic
Newbie
Newbie
Posts: 2
Joined: Sun Dec 15, 2013 12:56 am

Re: New SHA Security Functions (Convert Value Back)

Post by quantomatic » Sun Dec 15, 2013 2:53 am

One thing to have in mind is not to use straight SHA or any other hash functions to encrypt passwords without salt.
Hashed non strong passwords can be easily decrypted with a rainbow table.
To use your 'dog' example below, a simple Google search will reveal the password just by searching for the hash:

https://www.google.com/search?q=0eb129b ... a0c7ad88&o

If you want to use it storing passwords, you should use salted hashes.
https://exyr.org/2011/hashing-passwords/

Post Reply

Return to “Vertica Premium Edition”