EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Implementation Question

Posted: 09/09/2012 01:34:48
by Frank Gambino (Standard support level)
Joined: 09/09/2012
Posts: 10


I'm interested in purchasing CBFS, but I want to make sure it has the proper functionality to work with my program first!

There are some files in my file system that will require extra writing at another position when a user writes to it.

Basically, every block of data has its SHA1 hash stored in a hash table in another part of the file. I need to recalculate and update this hash entry every time the file's stream is flushed.

Also, just before the file is closed, I need the driver to RSA sign some data and write it to the header of the file.

And since this only applies for some files, there has to be a way to read the header when the file is opened and store its metadata someplace where the driver can access it when events are invoked.

Is this possible to implement using CBFS?

Thank you!
Posted: 09/09/2012 01:52:16
by Eugene Mayevski (Team)

CBFS doesn't write files yourself - your code does. All CBFS does is sends a request to your code telling you to perform certain file operation and use the provided buffer to take data from or to put data to.

Consequently you are completely free in implementing whatever you need in regards to file modifications. If you need to calculate a hash or to put a signature to (say) beginning of the file - no problems with this. Calculating "real" file size to report it to the OS would be tricky, but surely possible.

There's one more option I'd like to turn your attention to. If you keep files in one place, you can combine CBFS with our other product, SolFS application edition. It would make your task simpler, and here's how:

SolFS provides a virtual file system in a container (which is usually but not always a file on the disk). Instead of putting hashes and signatures to the middle of the file, you store them in alternative files streams of files within SolFS.

Example: you have all your files stored in SolFS container. File X is stored as /X . Now hashes are stored in /X:hashes stream and signature is stored in /X:signature stream or even in file tag (kind of DOS attribute but tags can handle large data) for simplicity.

The benefit is that your main file stream contains exactly what the OS wants and you don't need to recalculate file sizes and do other tricky reading and writing of files.

Of course this would work if you don't have third-party applications that need to manipulate the file with hashes and signature embedded.

Even for backup purposes you can keep SolFS and backup the container in whole. But this depends on your requirements.

Sincerely yours
Eugene Mayevski
Posted: 09/09/2012 02:08:41
by Frank Gambino (Standard support level)
Joined: 09/09/2012
Posts: 10

Actually, the method I described doesn't make sense. Since the files are their own file system, they should be mounted as another device, and another driver should be created to handle them. CBFS should work well with this.

I do have another question though:

Can one driver extend another?

I have an abstract class named ODFX that will handle I/O operations for the classes that implement it. Both the SVOD device and the ODD device derive from ODFX. These two devices only have to implement reading and writing methods.

Thank you again for your support.
Posted: 09/09/2012 02:18:27
by Eugene Mayevski (Team)

Not sure that I understand your question. If you can perform certain set of operations (mainly random file read, write and directory enumeration), you can do this with CBFS. CBFS passes FS-related activities to your user-mode code.

The only problems start to happen when the underlying file storage does not support certain operation. Eg. FTP does not support random access for writing, and box.net API didn't implement random access at all (maybe this changed recently).

Sincerely yours
Eugene Mayevski
Posted: 09/09/2012 02:22:58
by Frank Gambino (Standard support level)
Joined: 09/09/2012
Posts: 10

Okay, I'm going to see what I can do with the evaluation.
Posted: 09/09/2012 19:12:03
by Frank Gambino (Standard support level)
Joined: 09/09/2012
Posts: 10

Now that I see how everything works, my questions sound pretty stupid >_>

What's the best way to have Windows automatically mount a device if certain conditions are met? Would I have to create a service and use CBFSMntNtf3.dll?
Posted: 09/09/2012 23:24:27
by Eugene Mayevski (Team)

The virtual disk is instantiated and managed by your application. Consequently to make Windows mount a device automatically is to make your application handle command-line parameters and then automate Windows in some way to start your application with those parameters and tell the application to mount a device.

Sincerely yours
Eugene Mayevski



Topic viewed 1175 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!