November 14, 2008 at 3:56 pm
The link to the code does not work. I am hoping to source code in order to see if I can get around the export/import issue I am having.
Thanks
November 17, 2008 at 3:23 pm
Michael,
I appreciate the DBA Toolkit, and it has been very helpful. I continue to have trouble with the encryption and desperately need help.
I need to be able to to set up another server for failover. I have compiled the code for CertMgr (posted earlier) (that uses the machine key). I used this to Export the scrypto params. Then on the failover server I do an import of the same scrypto.params file. I also have a SQL script with the data from the Local_key and Master_Key tables. so the data in these tables on both servers are the same.
My test is to use the decrypt_AES function to see the value in the encrypted column. On the failover server I am getting NULL back.
I also have problems getting data back from ASP.NET using a ADO.NET SQLClient call to a stored procedure. The values in the column is null. Calling the same stored procedure through ASP - ODBC works.
Is the source code for the sprocs available?
Thank-you
April 30, 2009 at 1:00 pm
Hi all,
I have a problem, I encrypted data using AES encryption algorithm with function fn_encrypt_aes, but the results were diferents in differents servers.
how could be the results to be the same in both servers?
Thanks for your help.
Alejandra
September 18, 2009 at 1:05 pm
I'm upgrading to SQL 2008 and I want to use something similar to this toolkit on the new SQL 2008 server. Is there something compatible?
Jason
September 19, 2009 at 5:01 pm
Check out transparent data encryption now available in 2008. If this does not meet your needs please read Micheal's article and all the threads. One issue with the toolkit is with replication, or restoring to another server.
November 5, 2009 at 12:55 am
Hi Mike,
It's a cool Tool kit and I'm now studying the kit and going to propose it to be used in a project enhancement.
To propose, I need to have a prove of licensing and prove of safe of the dlls. I found that there is a statement of licensing posted by you. So, if I modified the install.sql, uninstall.sql and do not include every functions (dlls) to the kit, will the terms break? and is there any offical terms of usage so that I can show to my boss?
For safety, how can I prove to my boss on the safety of dlls?
Million thanks,
Gary.
November 5, 2009 at 1:18 am
Hi Mike,
I'm studying the tool kit and got a question of using password for the key. I have used different password for creating master and local keys but I found that whenever the password used for encrypt the data and decrypt the data is the same, the password for keys are meaningless. Like the example below, all the key materials and passwords are different for the master key and local key. But still, I can get the right encryption and decryption by that key as below.
exec create_master_key 'PWMaster', 'pw1', 'pw2'
exec create_local_key 'PWMaster', 'PWLocal', 'pw3'
DECLARE @encry AS VARBINARY(128)
DECLARE @decry AS VARCHAR(128)
select @encry = dbo.fn_encrypt_aes(CAST('Data to be encrypt' AS VARBINARY), 'PWLocal', 'pw4', 128)
select @decry = dbo.fn_decrypt_aes(@encry, 'PWLocal', 'pw4', 128)
Print @encry
Print @decry
Have I made any stupid mess up of the concept? Can you please remind me? Thanks so much.
Gary.
February 3, 2010 at 2:07 pm
I am also having the same problem. I used the web site to encrypt/decryt credit card details but when i checked it with other machine, for example in Query Analyzer, it shows NULL result.
Is it possible to remove this "per local machine" and to make it accessible to everyone?
Can I also request for the source code for AES algorithm? Desperately need solution on this.
Thanks,
Mark
April 5, 2010 at 3:03 pm
Will BlowFish or TwoFish work with image data ?? I downloaded the latest SQL toolkit and Tried running TwoFish after modifying it to handle image data converted to varbinary(max). The data came back as NULL, instead of encrypted. Either I did something wrong (very likely), or there's some limitation in the DLL for length, or there's some other problem I don't understand.
--modified fn_encrypt_twofish in the hopes it will work with bigger data
CREATE FUNCTION [dbo].[fn_encrypt_twofish_max] (@plaintext VARBINARY(max),
@localkeyname VARCHAR(128),
@password VARCHAR(128),
@keybits INT)
RETURNS VARBINARY(max)
AS
BEGIN
DECLARE @masterkey VARBINARY(64)
DECLARE @localkey VARBINARY(80)
SELECT @masterkey = m.[Key], @localkey = l.[Key]
FROM dbo.Local_Key_Vault l, dbo.Master_Key_Vault m
WHERE l.[name] = @localkeyname
AND l.[master_key_name] = m.[name]
DECLARE @enctext VARBINARY(max)
EXEC dbo.xp_encrypt_twofish @plaintext, @enctext OUTPUT, @password, @masterkey, @localkey, @keybits
RETURN @enctext
END
and then ran
-- Encrypt data
UPDATE MyTable
SET VoiceData = cast(master.dbo.fn_encrypt_twofish_max(VoiceData ,
'Local Key 1', NULL, 32) AS VARBINARY(max))
Thoughts ?
TIA
August 9, 2010 at 3:14 pm
Mark Salvador (2/3/2010)
I am also having the same problem. I used the web site to encrypt/decryt credit card details but when i checked it with other machine, for example in Query Analyzer, it shows NULL result.Is it possible to remove this "per local machine" and to make it accessible to everyone?
Can I also request for the source code for AES algorithm? Desperately need solution on this.
Thanks,
Mark
Hi Mark,
The code uses the local machine encryption key to protect your data encryption keys. You can conceivably remove this limitation, but you'd have to modify the code yourself to do this. The source code (including the source for all algorithms used) is posted here: http://www.sqlservercentral.com/Forums/Topic199534-236-14.aspx
Thanks
Mike C
August 9, 2010 at 3:25 pm
homebrew01 (4/5/2010)
Will BlowFish or TwoFish work with image data ?? I downloaded the latest SQL toolkit and Tried running TwoFish after modifying it to handle image data converted to varbinary(max). The data came back as NULL, instead of encrypted. Either I did something wrong (very likely), or there's some limitation in the DLL for length, or there's some other problem I don't understand.
--modified fn_encrypt_twofish in the hopes it will work with bigger data
CREATE FUNCTION [dbo].[fn_encrypt_twofish_max] (@plaintext VARBINARY(max),
@localkeyname VARCHAR(128),
@password VARCHAR(128),
@keybits INT)
RETURNS VARBINARY(max)
AS
BEGIN
DECLARE @masterkey VARBINARY(64)
DECLARE @localkey VARBINARY(80)
SELECT @masterkey = m.[Key], @localkey = l.[Key]
FROM dbo.Local_Key_Vault l, dbo.Master_Key_Vault m
WHERE l.[name] = @localkeyname
AND l.[master_key_name] = m.[name]
DECLARE @enctext VARBINARY(max)
EXEC dbo.xp_encrypt_twofish @plaintext, @enctext OUTPUT, @password, @masterkey, @localkey, @keybits
RETURN @enctext
END
and then ran
-- Encrypt data
UPDATE MyTable
SET VoiceData = cast(master.dbo.fn_encrypt_twofish_max(VoiceData ,
'Local Key 1', NULL, 32) AS VARBINARY(max))
Thoughts ?
TIA
Hi HomeBrew,
This was written originally for SQL 2000, and the XP's would not accept BLOB data. You're limited to a max. of 8,000 bytes in most cases (I believe the Blowfish implementation maxxed out at 2,000 bytes). You're using SQL 2005 or 2008 (otherwise you wouldn't have access to varbinary(max)). If you're interested contact me offline and I'll send you an updated version of Blowfish/Twofish that uses CLR and doesn't have these same limitations.
Thanks
Mike C
July 18, 2011 at 3:00 am
Hi
We are currently migrating from SQL 2000 to SQL2008R2 64x and are unable to install the dll's - because the dlls were compiled for 32bit environments.
We use the AES encryption and base64 encoding functionality.
Does anyone have the 64bit version of the AES/base64 related dlls that they can post a link for please? i.e. 64 bit versions of the following:
xp_encrypt_aes.dll
xp_decrypt_aes.dll
xp_encode_base64.dll
xp_decode_base64.dll
If not, does anyone have the source code so I can recompile myself?
Thanks
August 26, 2011 at 7:37 pm
Thank you very much you are a genius!
Viewing 13 posts - 61 through 72 (of 72 total)
You must be logged in to reply to this topic. Login to reply