Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Encryption 8

Status
Not open for further replies.

fischadler

Programmer
May 31, 2002
258
MT
Hi,
I have been looking through the threads to find a solution for my problem, but although I found others that had the same problem, I found the answers inconclusive.
I have a password protected Access DB but as many people know this protection is next to useless.
I was thinking of using an XOR and base 64 based encryption method to encode the data before it is saved to the database and then decrypt it when displaying it in my app. The problem with that is that filtering and sorting of the recordsets won't work. I access the file everytime I need to read or write data. I don't use the "save the database to memory" approach firstly because I don't know how and secondly because there might be multiple users on a network accessing the same DB file simultaneously.
Basically I simply need to make the database unreadable unless accessed through my app. I'de rather not use whole file encryption because:
1) some databases are quite large and would make loading the app a pain
2) a database could be copied after the file is decrypted at startup and before it is re-encrypted at the end of the app
3) if the program crashes the data would remain un-encrypted and available
4) I'm not sure about this but it seems there is danger of losing all the data if somehow the encryption/decryption process is interrupted.

Any ideas?

-Fischadler
 
fischadler,

Be careful about using the version that is on your office CD. Older versions of office have MSDE 1.0 included, which is equivalent to SQL Server 7.

If you are going to start learning MSDE/SQL Server, then I strongly suggest you use the latest and greatest version.



-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
....From:
The page also contains links to MS documentation, user groups and third-party tools

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Can MSDE be accessed using DSN-Less connections like I used to do with Access?
I've been looking hard for an MSDE tutorial for VB6 but only found for VB.Net. [sad]

-Fischadler
 
>>Can MSDE be accessed using DSN-Less connections like I used to do with Access

In order to use MSDE without a DSN, you will need to use ADO rather than sticking with DAO like you want to...
 
Unfortunately I know about SQL Server as much as I know about MSDE - next to nothing.
Code:
IF Using_ADO = The_Only_Way_To_Go AND Want_To_Use_DSN_Less_Connections = TRUE THEN
  Start_Using_ADO = TRUE
END IF
Sorry, old habits die hard LOL!
I've used ADO in ASP so the change of way of thinking should not be too hard.

Any suggestion for an online tutorial about doing that?

-Fischadler
 
I used to use a method for encrypting Acess databases by doing the following (sorry if this goes wrong but it's all from memory):

- do encrypt database as
- on file types, select all
- rename your database to have a .asp extension, e.g. mydata.asp

This meant that because it was an ASP file it couldn't be downloaded via the web but it also worked perfectly as a database as long as you reference it's new extension. Also, keep it out of your web root then people can't download it anyway.

If you also add a password, if a hacker did come across your file, s'he'd probably assume it was a normal ASP file but wouldn't be able to read it.

It worked for me anyway.
 
Although the problem is not directly related with the database on the web, I think your suggestion might be just enough and it costs nothing to implement!

Thanks!

-Fischadler
 
Not a bad solution. It would also prevent users from finding the file on their computer and double-clicking it to open it.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Well I can't take the credit for it as I found out about this method on the web, alas though, I cannot remember where.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top