Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1213141516»»»

Free Encryption Expand / Collapse
Author
Message
Posted Tuesday, April 6, 2010 6:48 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 2:48 PM
Points: 2,832, Visits: 8,507
Thanks for the link. Is there any way to create a function within SQL ? I don't know anything about C#.


Post #897491
Posted Tuesday, April 6, 2010 9:22 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 1:20 PM
Points: 1,276, Visits: 1,135
You can write a t-sql udf that chops your data into ~7800 byte chunks (symmetric encryption adds some bytes of overhead). Then concatenate the encrypted string back together. To decrypt do the opposite.
Post #897627
Posted Tuesday, April 13, 2010 8:35 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 9, 2010 10:38 AM
Points: 2, Visits: 2
Mike C (4/5/2010)
On sql 2005 and later you should go with the built-in encryption functionality. Extended procs are deprecated since 2005 in favor of clr. The built-in functionality is also more efficient since it lives in t-sql. You're still restricted to 8000 bytes per encryption call by default though. There are a couple of ways around that limitation--you can encrypt lob data in 8000 byte chunks (requires you to write udf/sp) or do it in clr (I posted a blog about this a while ago, but you'll have to google it "encrypt lob data sql server" because I don't have the link handy. These xp's really were meant to provide encryption on sql 2000 only, and there are better alternatives on 2005 and 2008.

Update - Here's the link to encrypting a BLOB in CLR: http://sqlblog.com/blogs/michael_coles/archive/2009/04/08/let-s-encrypt-a-blob.aspx

Thanks
Mike C


Hi Mike,
Any chance that you could post the 64 bit versions of your 32 bit dlls? I know you've given the source code but I don't have a 64 bit development environment to compile it on. We're in the middle of moving to 64 bit SQL2008 and have used your blowfish udf on several columns of our data and the 32 bit dlls don't work.

Thanks,
Todd
Post #902458
Posted Friday, July 2, 2010 8:42 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 2, 2010 11:02 AM
Points: 1, Visits: 6
Hi Mike,

I'm trying to get the source for the SQL 2000 DBA Toolkit using http://www.sqlservercentral.com/products/mcoles/default.asp, so that I can recompile it for x64. I see that the link is dead. Has the code been moved to a different site or is it a URL mistake?

Can anyone post the SQL 2000 DBAToolkit source (if you happen to have it)?

Thanks,
Philip
Post #946875
Posted Monday, August 9, 2010 8:02 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, August 10, 2010 1:15 AM
Points: 1, Visits: 4
philip.manual (7/2/2010)
Hi Mike,

I'm trying to get the source for the SQL 2000 DBA Toolkit using http://www.sqlservercentral.com/products/mcoles/default.asp, so that I can recompile it for x64. I see that the link is dead. Has the code been moved to a different site or is it a URL mistake?

Can anyone post the SQL 2000 DBAToolkit source (if you happen to have it)?

Thanks,
Philip


I have the source but no ability to recompile to x64.

This is the reply I got from Michael in July 2010.

Hi Richard,

Thanks for the kind words. I’m actually working on a SQL 2005/2008 CLR-based version that includes a lot of the same functionality, plus some. Other than the occasional request for source code for those who want to compile it on x64 I haven’t added any functionality to the SQL 2000 version – and probably won’t. If you’d like to tweak it specifically for SQL 2000 platform, I can send you the source code.

Thanks

Michael


So. I have a 2MB zip file from Michael. I'm sure if you drop him an email, he'll be happy to send you the source.

I have VC9 Express Edition. I don't think it can cross compile.

If it can, I'd like someone to do a walkthrough with me. I use it to compile PHP. But I only follow a recipe (buildconf, config.nice, nmake - more or less). No GUI involved.

Regards,

Richard Quadling.
Post #965970
Posted Monday, August 9, 2010 8:16 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 6:53 PM
Points: 31,177, Visits: 15,623
I'll post the file here. good luck.









Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help


  Post Attachments 
SQL_Encryption_Toolkit.zip (74 views, 463.82 KB)
Post #965980
Posted Monday, August 9, 2010 10:27 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 1:20 PM
Points: 1,276, Visits: 1,135
IIRC you were looking specifically for the blowfish or twofish encryption, correct? If so I have .net/clr versions that would be better to run on 2005/2008 (32 or 64 bit). I just finished testing them against the published test datasets. Send me an email offline if you'd be interested.

Thanks
Mike C
Post #966096
Posted Monday, August 9, 2010 10:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, August 9, 2010 10:38 AM
Points: 2, Visits: 2
Hi all,

A while back I compiled the 32 bit version of the blowfish encrypt and decrypt dlls for the 64 bit environment. No functionality changes to the code were made. I've been using them for several months now in our SQL2008 64 bit environment on data that was upgraded from a SQL2000 database and encrypted using the 32 bit version. Works like a charm. I've attached the 64 bit dlls.
Cheers!


  Post Attachments 
xp_blowfish.zip (101 views, 24.97 KB)
Post #966110
Posted Thursday, October 7, 2010 2:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, July 5, 2012 2:48 PM
Points: 4, Visits: 13
Nice post and useful toolkit.

I notice that the function definitions in your ADD.SQL script use varchar(2000) rather than varchar(max). Are there limits on the size of the data that can be passed to the base64encode and base64decode procedures? From a brief look at the .cpp files, it would seem like there are not limits, but I did not do a thorough code review. Would be helpful to know that these routines can arbitrarily large strings.

Thank you,

David
Post #1000880
Posted Thursday, October 7, 2010 2:36 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 1:20 PM
Points: 1,276, Visits: 1,135
Hi David,

This was actually created for SQL 2000--before we had the max data types. There could be a chance the XP API (extended proc API) won't handle max data types properly, but I'm not 100% sure on that--I haven't looked into the XP API in quite a while now. I'm working on CLR versions of these utilities for 2005 and 2008 (and R2) but that project's not complete yet.

Thanks
Mike C
Post #1000910
« Prev Topic | Next Topic »

Add to briefcase «««1213141516»»»

Permissions Expand / Collapse