Showing posts with label encryption. Show all posts
Showing posts with label encryption. Show all posts

Wednesday, March 7, 2012

Password Encryption in XML File

I am unable to encrypt password of sqlserver database in XML file by Package Configuration in SSIS.

I think that is not possible (though it might be possible if you develop something). According to the SSIS help you can either save the config file in SQL Server or use Windows access control lists to protect access to your config file. See ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.SQLSVR.v9.de/extran9/html/2e3ddea9-5289-4289-a70e-11c018f34977.htm|||Yes in config file i have to put the password manually in config file.If i choose only connection string property in configuration wizard then it is working fine.But When i reset the server password then it fails.So i have to give the password.But unable to encrypt it for security reasons.

Password encryption and decryption

Hi there,
Currently I working on a project that requires users to enter a username and
password before they can use one of our internal administration system.
The system is built using VB6.0 and SQL server 200o on Windows 2000.
Can someone please suggest a way of encrypting and decrypting the password
so that the passwords can be stored in the databaseCall the Windows Crypto API in the VB6 application.
Lots of information on MSDN.
Pity you are not using .NET as there, it is 100's of times easier to
implement.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Padmini" <Padmini@.discussions.microsoft.com> wrote in message
news:3DB5CD8B-17E8-459E-9CD8-331952A8FD90@.microsoft.com...
> Hi there,
> Currently I working on a project that requires users to enter a username
> and
> password before they can use one of our internal administration system.
> The system is built using VB6.0 and SQL server 200o on Windows 2000.
> Can someone please suggest a way of encrypting and decrypting the password
> so that the passwords can be stored in the database|||Don't store the password in the database. Password recovery mechanisms are
inherently insecure. Instead store a secure hash, including salt. The MS
crypto API provides the tools you need.
David Portas
SQL Server MVP
--|||are there any code examples of doing this anywhere?
"David Portas" wrote:

> Don't store the password in the database. Password recovery mechanisms are
> inherently insecure. Instead store a secure hash, including salt. The MS
> crypto API provides the tools you need.
> --
> David Portas
> SQL Server MVP
> --

password encryption

Hi all Im used to work on mysql and in that Db you can call the password function to encrypt password, so that people browsing directly the db can't see others password.

What is the best way to do this in sqlserver ?

You may use these two undocumented SQL Server functions.

PWDEncrypt and PWDCompare

How to use them?
http://msmvps.com/blogs/gladchenko/archive/2005/04/06/41083.aspx

Pwdencrypt() Weakness
http://www.sqlteam.com/article/pwdencrypt-weakness

Good luck.

|||

so as I see it. It seems easy to hack, So I will ask an other question to you. How do you procede to encrypt password? do you encrypt in code instead of in the db?|||

Frist thing you need to make Password column as VarBinary.

It will save in encrypted format. If you dont wanna use builtin function then make some function which will add some values and then subtract some values.

Hope this will help you.

DBMaster

My Blog

|||

You could use varbinary, you could also use binary, since the results will always be the same lengh.

Public Function MD5(s as string) as byte()

Dim encoder as New UTF8Encoding()
Dim md5Hasher as NewSystem.Security.Cryptography.MD5CryptoServiceProvider

return md5Hasher.ComputeHash(encoder.GetBytes(s))

end function


dim cmd as new SqlCommand("INSERT INTO Users(UserName,Password) VALUES (@.UserName,@.Password)",conn)

with cmd.parameters

.add("@.UserName",sqldbtype.varchar).value=txtUsername.text

.add("@.Password",sqldbtype.varBinary).value=md5(txtPassword.text)

end cmd

...

dim cmd as new SqlCommand("SELECT COUNT(*) FROM Users WHEREUserName=@.UserName ANDPassword=@.Password",conn)

with cmd.parameters

.add("@.UserName",sqldbtype.varchar).value=txtUsername.text

.add("@.Password",sqldbtype.varBinary).value=md5(txtPassword.text)

end cmd

if cmd.executescalar<>1 then

throw new applicationexception("Bad password")

endif

password encryption

I have an Access .adp application and I need to store the passwords encrypted. I see that there are unsupported functions pwdencrypt() and pwdcompare() in SQL server 2K.
Are there any other functions or methods in SQL Server 2000 that could be called that would provide this capability?Are there any other functions or methods in SQL Server 2000 that could be called that would provide this capability?

SQL Server 2000 encryption is pretty weak. 2005 is supposed to address this. In the meantime, you might consider this link:

http://www.sqlservercentral.com/columnists/mcoles/freeencryption.asp

(you may have to register, but registration is free).

Alternatively, you could use the Micrsoft Crypto API (capicom.dll) or the .Net Encryption utilities (don't have more specific references on these).

Regards,

hmscott

Password Encryption

Hi

I want to encrypt the password. Can u suggest some Encryption algorithms for Password protection?

Thanks

There are several option based on the SQL Server Version you are using, SQL 2k5 has built in ecrypting mechanisms, SQL Server 2000 does not. What are you using ?

HTH, Jens K. Suessmeyer.

http.//www.sqlserver2005.de|||

Hi

Thank u for ur reply.

I'm using SQL Server 2000

Thanks

|||Sorry, which password are you referring to ? I guess you mean a password within the database. Then you either will have to do it within your application logic or seach for a vendor that wote an extended procedure to do this.

HTH, jens K. Suessmeyer.

http://www.sqlserver2005.de