I've a tiny bit of structured data and I have to accomplish three tasks:
- Save/retrieve data to/from hard disk drive or USB pen
- Possess a "portable" application (absolutely nothing to install on pc apart from framework)
- Secure data
The best idea method to achieve transpire?
I believe that, beeing structured data, I possibly couldOrought to make use of a database... but which?
MySql is free of charge and extremely fast but must be installed... thrown away.
MsSql/Oracle have a similar problem, so that they can not be used.
Maybe SQLite? Well, this may be a great choice: absolutely nothing to install, just one file that may be encoded too utilizing a byte array or perhaps a string as password.
And how about XML? It's not hard to use, only a single file that may be encoded too... but now you ask , how? Using AES? 3DES? Or just storing XML stream inside a ZIP/7Z file protected having a lengthy password?
I understand nothing could be completely sure (today we've GPUs and cloud computing to interrupt protections and passwords), but how do i produce a really secure archive simple to use and portable?
The most dependable way? Why?
XML is really a mix-platform, non-proprietary method of storing information. Data saved in XML format could be read by just about any modern operating-system, as well as hardly any software to become saved around the USB drive, and really should never require installing any third party software. AES is generally secure enough, as lengthy as it is salted.
Whatever information is simple for you to parse. XML and SQLite are generally good options. Use whichever one better suits your own personal purpose and make certain you secure rid of it. SQLite is nice in case your data fits a relational model well- tables, posts, rows -- and XML is a great choice if you wish to store hierarchical data. Which file encryption formula you select again is dependent around the application -- just how much security you'll need in addition to what's better library support for the language of preference. Either XML or SQLite are only as secure because the file encryption you utilize.
You will find some off-the-shelf SQLite file encryption items, but not one of them have the freedom AFAICT. Most likely the very best option would be SQLite Encryption Extension, that is compiled by the writer of SQLite themself, however it costs ($2000). You are able to most likely roll your personal, however it will not be as clean. I additionally think that if you are using .Internet i quickly believe you will get some free password defense against the .Internet libraries (see Password Protect a SQLite DB. Is it possible?).
Edit: after a little more research, I have switched a great list of SQLite wrappers that says which ones support encryption. Choose according to language and private preference.
There's software which enables you to definitely secure a part of you usb key.
I believe the simplest way is by using the System.Data.Sqlite wrapper round the Sqlite database. Encrypting the database is extremely easy: whatever you do is placed the password property for your key string. They discuss the way they make use of the Microsoft Crypto API and RC4 formula within their forum.
You receive the benefit of a SQL database, an ADO.Internet interface, single-file database, along with a single DLL inside your project. It could not be simpler, even when all you are doing is storing XML strings inside your database.