Re: Re:Data Encryption

From: Tom O (tomo@tomo.com)
Date: 11/14/02


From: "Tom O" <tomo@tomo.com>
Date: Wed, 13 Nov 2002 23:03:26 -0600


You can't really decrypt the string. It's a one way hash. You can guess at
what the original string was and then use pwdcompare to verify your guess, but
once the data has been hashed there is no method to return it to its plain-text
state.

"Vishal Parkar" wrote:
> SQL Server has 2 undocumented password encryption function
> by which you can encrypt and decrypt a string.
>
> Following is the example.
>
> declare @x varbinary(500)
> declare @ret int
> select @x=convert(varbinary(500),pwdencrypt('check'))
> select pwdcompare('check',@x, 0)
>
> You can use pwdencrypt in a update/insert trigger to
> encrypt the values of a table's column. While decrypting
> you'll have to use pwdcompare which will return 0 or 1 on
> the basis of failed or successfull comparison respectively.
>
> for more information visit
> http://www.sqlmag.com/Articles/Index.cfm?ArticleID=9809
>
> --Vishal
>
> >-----Original Message-----
> >Oracle 8i + includes the OBFUSCATION toolkit which
> enables
> >the creation of hash and random keys. Does anyone know if
> >MSSQL 7/2k offers the same type of encryption for
> >sensitive data?
> >
> >Note: my encryption has to be done through a store proc,
> >not through any other software.
> >
> >Thanks, JB
> >.
> >



Relevant Pages

  • Re: Byte array to string and back - newbie question
    ... // Create a symmetric algorithm. ... This is done to make encryption more ... // Encrypt a string into a string using a password ... // Decrypt a byte array into a byte array using a key and an IV ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • How do I Use DPAPI to Encrypt and Decrypt Data (C#/VB.NET)?
    ... Use DPAPI to Encrypt and Decrypt Data ... The code below demonstrates how to call Data Protection API (DPAPI) ... In addition to encryption and decryption, ... public static string Encrypt ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: error writing encrypted byte string to a file
    ... First of all since you aren't setting the padding mode, ... was used during the encryption processes. ... > in the string and decrypt it ... ...
    (microsoft.public.dotnet.security)
  • RE: Using Win32 CryptDecrypt to Decrypt RijndaelManaged
    ... Did you check the encryption output from BOTH CAPI and .Net using the ... I am trying to write a Win32 app that can decrypt that string using the ... I can get both to encrypt and decrypt successfully in their own projects, ... DWORD cbKeySize; ...
    (microsoft.public.platformsdk.security)
  • RE: Using Win32 CryptDecrypt to Decrypt RijndaelManaged
    ... Did you check the encryption output from BOTH CAPI and .Net using the ... I am trying to write a Win32 app that can decrypt that string using the ... I can get both to encrypt and decrypt successfully in their own projects, ... DWORD cbKeySize; ...
    (microsoft.public.platformsdk.security)