views:

346

answers:

1

I am learning C#. I want to code an on the fly encryption program. Something similar to Truecrypt. It basically creates an encrypted container, which can be mounted as a virtual drive and from which you can decrypt files on the fly without writing them to the hard drive. Truecrypt uses some filter drivers [ I dont know what they are]. I need to know if it can be implemented in c#. Do i need to learn any driver programming? Can it be done without the use of drivers? What all do i need to learn?

+4  A: 

You won't be able to do this in C# (or any .NET language for that matter) as device drivers must be written in unmanaged code.

Additionally, you have a more subtle problem. You might be keeping the information in memory, but that memory might be paged out to disk, which is something that you have to avoid if you want this to be truly secure.

casperOne
+1, also not meaning to be to snarky, but if you don't know what a filter driver is writing one is probably a very bad idea for a first project
Sam Saffron
I dont mind if its paged to the disk. Can this be done without drivers?
veagles
@veagles: I don't believe so, because you still need a driver in order to mount the virtal drive, and you can't write drivers in unmanaged code.
casperOne