如何加密整个磁盘?
我想编写应用程序(作为后台服务)来完全加密整个文件系统。问题是:
- 是否有可能让所有 Android 服务都能顺利运行?比如微软的 BitLocker?
- 如果是这样 - 有人可以向我指出一些来源/文档吗?
I would like to write application (as background service) which will encrypt whole file system totally. The questions are:
- Is it possible, such that all Android services will work smoothly? Like, say Microsoft's BitLocker?
- If so - can someone point me to some sources/docs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不,API 认为这是不可能的。
您必须获取 Android 的源代码,并尝试自己烘焙自己的自定义系统映像来实现它。
但我认为这根本不可能。
No this is not possible thought the API.
You'd have to get the source code of Android and try to implement that yourself baking your own custom system image.
However I don't think it is possible at all.
加密文件系统只能通过内核模式驱动程序实现,这意味着设备的自定义 ROM。
Encrypted file system would be possible only via kernel-mode driver, which means a custom ROM for a device.
目前尚不清楚您这样做是为了安全,还是只是为了让特洛伊木马索取恢复文件的费用;)
在以明文形式写入文件后对其进行加密将使明文散布在您的闪存(或磁盘)中,直到该空间稍后会被回收用于新文件。它基本上不安全。您必须在将字节写入磁盘之前进行加密。
Android 在 Linux 上运行,用于存储的设备驱动程序虽然是模块化的,但已编译到内核中。因此,除非您分发自定义 Android 映像,否则您无法在某人的设备上安装驱动程序。
此处的邮件列表中已有类似的讨论。
Its not clear if you are doing this to be secure, or only in order for a trojan to claim payment for restoring the files ;)
Encrypting files after they have been written in plaintext will leave the plaintext spread around your Flash (or disk) until that space is later reclaimed for new files. Its basically not secure. You have to encrypt before bytes get written to disk.
Android runs on Linux, and device drivers for storage, whilst modular, are compiled into the kernel. So unless you are distributing a custom Android image, you cannot post-install install a driver on someone's device.
There has been discussion like this on the mailing list here.