StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



TripleDESWrapperExpand / Collapse
Author
Message
Posted 11/14/2006 4:42:38 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 8:08:48 PM
Posts: 607, Visits: 17,185
What is the key to the encryption here when I use this wrapper?

What will I need to move to my webserver upon deployment (thinking ahead) to maintain the ability to read encrypted data I deploy?

I am using this (as below) to encrypt both database values for some sensitive information as well as parameters I pass to avoid the possibility of hack and SQL injection attacks. Am I using it correctly?

Thanks,

Keith

sample implementation:
Dim x As String = "hhhh"
Dim encrypted_x As String
Dim decrypted_x As String

Dim wrapper As MicroFour.StrataFrame.Security.Encryption.TripleDESWrapper
wrapper = New MicroFour.StrataFrame.Security.Encryption.TripleDESWrapper

encrypted_x = wrapper.Encrypt(x)
decrypted_x = wrapper.Decrypt(encrypted_x)
Post #4454
Posted 11/14/2006 4:47:32 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 5:44:29 PM
Posts: 4,366, Visits: 4,393
Yes, this looks fine.  The only other thing that I would recommend is creating your own encryption key and vector rather than using the default keys.  If you notice, there is an overload on the New().  Use the second overload to provide the key and vector:

loDES = New TripleDESWrapper(New Integer() {24 values}, New Integer() {8 values})

The intellisense should give you some sample code on this.

Post #4456
Posted 11/14/2006 4:48:38 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 8:08:48 PM
Posts: 607, Visits: 17,185
as always, thank you.
Post #4457
Posted 11/14/2006 4:49:52 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 5:44:29 PM
Posts: 4,366, Visits: 4,393
No problem...
Post #4458
Posted 11/14/2006 5:09:32 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 8:08:48 PM
Posts: 607, Visits: 17,185
If it were you, would you put your keys in the code? or somewhere else?

The project isn't for NASA or the government, just a financial institution, but I want to do things as "by the book" as possible just in case they ask and I don't want the headaches that we all know can result from "sensitive data" being obtained.



Post #4461
Posted 11/14/2006 5:17:31 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 5:44:29 PM
Posts: 4,366, Visits: 4,393
I generally have a shared class somewhere that defined these as constants.  This way I can reuse them more easily.  When it comes to high-level encryption and preventing any type of disassembler, I basically pre-encrypt as much information as possible.

In your case, I would just put the keys in a code file that is different than the one you are defining your encryption class.  That should be sufficient for most cases.

Post #4463
Posted 11/14/2006 5:19:39 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: Today @ 8:08:48 PM
Posts: 607, Visits: 17,185
Excellent.....
Post #4464
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:12pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.