Solved

Encrypting an Access Database

Posted on 2006-06-26
8
201 Views
Last Modified: 2010-04-16
Greetings,

I have a need to quickly add a bit of secrecy to a database I'll be leaving on the customer's site.  Is there a way to read and write encrypted data?

Thanks,
Bob



0
Comment
Question by:ba272
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 27

Accepted Solution

by:
Chinmay Patel earned 500 total points
ID: 16989961
Hi There,

There are two ways you can do this :
1. Encrypt the Access database with a strong password.
2. Encrypt the data you are writing to the database.

The first one can be done via Tools -> Security - Set Database Password...

and for second one you can use any available encryption method available with .Net.

If you need more information just let me know.

Regards,
Chinmay

0
 

Author Comment

by:ba272
ID: 16992556
Chinmay,

Thanks.  How long a password is needed to be called "Strong"?  And once I've set the password in Access, how do I open it from C#?

I use OleDbConnection.  Would I add the folowing to the ConnectionString property?

Pwd=123;

I have no need to enter a "User ID", right?

Thanks,
Bob

PS I prefer the first method for now.  It should be much quicker to implement, and I need the data to be human readable without me needing to transpose it.
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 16993780
Hi There,

"Strong" as far as computer security is concerned, is a very, relative term. A Strong password for me can be a piece of cake for a skilled person to break. So I leave it upto you to set up a Strong password. If you google around you'll get what is the best Strong password in your situation. Generally more than 6 alphanumeric characters(it should form non dictionary word) and 3-4 special characters is sufficient, however I still suggest you to evaluate this from your propectives too.

Here are sample connection strings:
Standard security:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin;Password=;"

 Workgroup (system database):
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:System Database=system.mdw;"

With password:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:Database Password=MyDbPassword;"

and for future reference, you can bookmark this site: http://www.connectionstrings.com

Regards,
Chinmay
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

Author Comment

by:ba272
ID: 16995863
Thanks.  One last question:

I use the free version of Dotfuscator and am not too keen on upgrading at the moment.  The free version does not obfuscate text strings.  Any ideas about how to build that password string on the fly in a way which would not take me lots of coding?

Thanks for all the help.

0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 16995931
Hi There,

You can use Aspose Obfuscator free version.
http://www.aspose.com/Products/Aspose.Obfuscator/Downloads.html

or else you can get an encryption library from here to use with your application.
http://www50.brinkster.com/cspatel/CodeBase/CryptoAPI.zip

its very simple to use, all you'll have to do is store encrypting string in a predefined variable
and decrypt it whenever you need in your application.

Regards,
Chinmay
0
 

Author Comment

by:ba272
ID: 16996502
thanks a bunch.

Bob
0
 

Author Comment

by:ba272
ID: 17028744
I had trouble getting the encryption project to open.  I both dragged the files out of the zip file and extracted all.  But when I open the project, the tree in the Class View fails.

As far as switching to another obfuscator, do you have any experience with this?  It's a big deal to switch from Dotfuscator.  And if I could obfucate the string values I'd be able to stick with the free one.  

Is there any other way to obfuscate string values?

Thanks,
Bob
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 17029627
Hi There,

I am sorry, there is no known free obfuscatoor as per my knowledge that will encrypt strings too.

I'll still search around, lets see what I can find.

Regards,
Chinmay
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question