0

I am searching for a function that allows me to put a dialog-window(w/ a password query) before the folder is accessed. Is there such a function? Also, this would be great if this protection is there before any program, even Windows Explorer/cmd.exe are allowed to access those files. Is that possible to make?

I'm not using something like IOContainer, passwd. protected ZIPs or any other things that are too slow, because I guess 20GB in one file are a bit overkill and it would take ages to decrypt that file. Is there maybe a VFS solution for C# which supports password protection and can be used as a normal filesystem or folder on the disk?

Thanks!

Felipe
  • 80
  • 7
  • There is nothing built-in in windows that you could use. However, there are options for you to write a driver that intercept file i/o accesses and then you could show your password protection.. – Mike Dinescu Oct 11 '15 at 20:00
  • @MikeDinescu: Do you know any websites which introduce me into such hard things? Also, thanks! – Felipe Oct 11 '15 at 20:02
  • [Introduction to File System Filter Drivers](https://msdn.microsoft.com/en-us/library/windows/hardware/ff548202.aspx). Alternatively, a [Shell Namespace Extension](https://msdn.microsoft.com/en-us/library/windows/desktop/cc144095.aspx). – IInspectable Oct 11 '15 at 21:15

1 Answers1

1

There exist two options. The simpler one is to have a virtual file system mapped from the file. Our product, SolFS (OS edition), does exactly what you are asking in the second part of your question - it provides a container with optional encryption, which is exposed as a virtual drive so that access to the contents is transparent. Decryption in such systems is done in pages, so 20GB-large file won't be decrypted in whole as you worry.

Another option is to employ a filesystem filter driver, which will intercept requests for directory opening, and will ask the user for a password. This approach is possible (we even have a product for this, called CallbackFilter), but there are two drawbacks in it: first, it's not impossible to remove the driver, leaving the data unprotected. And the second problem is that if you ask the user for a password in a callback, while the OS is waiting for access to the directory, you can end up in a deadlock or a timeout while the user is thinking.

With these two limitations in mind something like SolFS is the preferred and recommended approach.

PS: and we have free non-commercial licenses as well.

Eugene Mayevski 'Callback
  • 45,135
  • 8
  • 71
  • 121