0

My application is a client desktop app that connects to a database server. The app is a document management system that allows the user to store their files such as .pdf .xlsx etc in the database and it keeps track of all versions of the documents. The user can "check in" and "check out" the documents. When the user checks out a file, it is downloaded from the database and copied to the user's hard drive. The user then accesses the file, edits, and checks back into the database. Inside the database, the file is stored in a compressed, encrypted and base64 encoded form in a text field.

My objective is to ensure that when the file is copied to the user's hard drive, that it be encrypted, but still allow the user easy access to it. The best way to visualize what I want is to consider how TrueCrypt works - it allows the user to create an encrypted binary file which can then be mounted as a drive. So for example on Windows, a drive letter will be assigned to the volume and the user can access the files via My Computer for example.

My app uses the Botan library for encryption.

Is it possible to achieve something similar with Qt? If so, how? If not, what do you recommend?

Many thanks.

4

1 回答 1

2

好吧,我认为您所说的非常合理,但在继续讨论技术细节和可能的解决方案之前需要一些“核心设计”思想。

据我了解,事情是这样的:

<---> <----> <----> <第三方应用程序>

然后文件从文件系统转到数据库,您使用某种算法对其进行加密。一旦文件从 db 回到文件系统,它就应该可供 3rd 方软件进行修改...

这就是要点所在.. 你需要对硬盘进行加密吗?在您进一步实施之前,我认为您应该指定您要实现的目标。一旦第 3 方软件有权访问未加密的数据,这实际上意味着安装在操作系统上的所有其他软件都具有相同级别的访问权限。(在写这篇文章时,我在考虑一些奇怪的配置,例如开放式办公室可以由您的应用程序在特定用户(linux)下运行,而存储文件的文件夹只能由所有者访问读/写,但我认为它可以走得太远)..无论如何..问题是-您要防止什么...我相信在提议的情况下您唯一能想到的就是在物理拔出硬盘驱动器时访问数据.. 然后根据操作系统,我建议使用任何标准解决方案,如 TrueCrypt 并在 linux 上使用“挂载”系统调用或在 Win32 上使用 API(大多数解决方案都有 API 或命令行实用程序可用,您可以从应用程序运行它们)。这很容易实现。

于 2013-08-07T20:15:08.163 回答