Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Encryption/Decryption Utility

Author  Topic 

rajk
Starting Member

20 Posts

Posted - 2003-08-31 : 23:47:05
Hi,

I would like to know if SQL Server 2000 has any encryption/decryption utilities that we could use. I have a situation where I need to store the password into a database table. But I want to store this as an encrypted value.

We cannot use any third party encryption tools for this purpose.

Any help is greatly appreciated.

Thanks
Raj

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2003-09-01 : 00:04:16
There is an unsupported encryption routine, but it won't decrypt.
Do a forum search for "encryption" for why this is a REALLY bad idea.


Damian
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-09-02 : 12:40:23
Instead of storing the password in the database, how about storing it in the registry instead?

Tara
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2003-09-02 : 19:12:42
I think he is probably talking about building a web app that has to manage many users. Putting 100000 passwords in the registry wouldn't be such a hot idea.


Damian
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2003-09-03 : 00:30:58
quote:
Originally posted by rajk
We cannot use any third party encryption tools for this purpose.



I assume you mean you can't spend any money on the solution, right? Anyway, I was looking into hashing algorithms a while back and found a couple of interesting potential solutions. We never implemented (or tested for that matter) anything, so it was just an exercise in googling.

This site has a lot of software based encryption solutions (MD5, MD4, SHA-1, etc) http://pajhome.org.uk/crypt/md5/

For SQL Server solutions check out the md5.sql code by Sindile and Vencu (no DLLs required) and xp_crypt by Oren Novotny. You'll probably have to email the md5.sql guys, because I can't find any documentation on the code that they provide. Links to both of these can be found on the site mentioned above.

Here is an interesting extended stored proc solution that uses the free crypto++ library. This supports just about every crypto algorithm under the sun (SHA, SHA2 (SHA-256), SHA2 (SHA-384), SHA2 (SHA-512), MD5, RIPEMD-160, Tiger) http://sourceforge.net/projects/ctnhashproc/

Here is another MD5 based solution that uses DLLs http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=735&lngWId=5. the download includes DLLs, SQL and ASP code for a complete end-to-end solution.

another using microsoft CAPICOM and cryptoAPI http://www.dbazine.com/larsen2.shtml

All software above is free btw.

-ec
Go to Top of Page
   

- Advertisement -