Solved

Encrypting an Access Database

Posted on 2006-06-26
8
197 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
  • 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
 

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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Aspnet xml 2 37
C# remove trailing commas from csv file 10 52
comparing string in C# 3 34
ASP.NET Web API or ASP.NET Core MVC? 3 32
Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now