{"id":864,"date":"2024-01-12T18:01:02","date_gmt":"2024-01-12T10:01:02","guid":{"rendered":""},"modified":"2024-01-12T18:01:02","modified_gmt":"2024-01-12T10:01:02","slug":"FBE \u4e0eFDE\u5b66\u4e60\u603b\u7ed3","status":"publish","type":"post","link":"https:\/\/mushiming.com\/864.html","title":{"rendered":"FBE \u4e0eFDE\u5b66\u4e60\u603b\u7ed3"},"content":{"rendered":"
1.1\u3001<\/strong><\/strong>\u5b9a\u4e49<\/strong><\/strong>:<\/strong><\/strong><\/strong><\/p>\n<\/p>\n Full-disk encryption (FDE) \u5168\u76d8\u52a0\u5bc6android4.0\u5f15\u5165<\/p>\n File-based encryption (FBE) \u6587\u4ef6\u7ea7\u52a0\u5bc6 android7.0\u5f15\u5165<\/p>\n 1\u3001\u719f\u6089 linux \u52a0\u5bc6\/\u89e3\u5bc6\uff0c\u6302\u8f7d\u6d41\u7a0b\uff0c\u5de5\u5177\u4f7f\u7528<\/p>\n 2\u3001\u719f\u6089android\u52a0\u5bc6\/\u89e3\u5bc6\uff0c\u6302\u8f7d\u6d41\u7a0b\u3002<\/p>\n https:\/\/www.cnblogs.com\/redcoatjk\/p\/3822585.html<\/u><\/u> \u6309\u4f5c\u7528\u4e0d\u540c\uff0c\u6587\u4ef6\u52a0\u5bc6\u548c\u6570\u5b57\u7b7e\u540d\u6280\u672f\u4e3b\u8981\u5206\u4e3a\u6570\u636e\u4f20\u8f93\u3001\u6570\u636e\u5b58\u50a8\u3001\u6570\u636e\u5b8c\u6574\u6027\u7684\u9274\u522b\u4ee5\u53ca\u5bc6\u94a5\u7ba1\u7406\u6280\u672f4\u79cd\u3002<\/p>\n 1\u3001\u6570\u636e\u4f20\u8f93\u52a0\u5bc6\u6280\u672f\u662f\u5bf9\u4f20\u8f93\u4e2d\u7684\u6570\u636e\u6d41\u52a0\u5bc6\uff0c\u5e38\u7528\u7684\u65b9\u6cd5\u6709\u7ebf\u8def\u52a0\u5bc6\u548c\u7aef\u5bf9\u7aef\u52a0\u5bc6\u4e24\u79cd\u3002<\/p>\n 2\u3001\u6570\u636e\u5b58\u50a8\u52a0\u5bc6\u6280\u672f\u76ee\u7684\u662f\u9632\u6b62\u5728\u5b58\u50a8\u73af\u8282\u4e0a\u7684\u6570\u636e\u5931\u5bc6\uff0c\u53ef\u5206\u4e3a\u5bc6\u6587\u5b58\u50a8\u548c\u5b58\u53d6\u63a7\u5236\u4e24\u79cd\u3002<\/p>\n 3\u3001\u6570\u636e\u5b8c\u6574\u6027\u9274\u522b\u6280\u672f\u662f\u5bf9\u4ecb\u5165\u4fe1\u606f\u7684\u4f20\u9001\u3001\u5b58\u53d6\u3001\u5904\u7406\u7684\u4eba\u7684\u8eab\u4efd\u548c\u76f8\u5173\u6570\u636e\u5185\u5bb9\u8fdb\u884c\u9a8c\u8bc1\uff0c\u8fbe\u5230\u4fdd\u5bc6\u7684\u8981\u6c42\u3002<\/p>\n 4\u3001\u5bc6\u94a5\u7ba1\u7406\u6280\u672f\u662f\u6570\u636e\u7684\u52a0\u5bc6\u6280\u672f\u901a\u5e38\u662f\u8fd0\u7528\u5bc6\u94a5\u5bf9\u6570\u636e\u8fdb\u884c\u52a0\u5bc6\uff0c\u8fd9\u5c31\u6d89\u53ca\u5230\u4e86\u5bc6\u94a5\u7684\u7ba1\u7406\u95ee\u9898\u3002<\/p>\n 2.2.1\u3001\u57fa\u4e8e\u201c\u6d88\u606f\u6458\u8981\u201d\u7684\u4e3b\u8981\u7b97\u6cd5<\/strong><\/strong><\/strong><\/p>\n<\/p>\n MD5\u3001sha.1\uff0c\u4e3b\u8981\u7279\u70b9\u5bc6\u6587\u56fa\u5b9a\u957f\u5ea6\u3001\u7a0d\u6709\u6539\u53d8\u5bc6\u6587\u5b8c\u5168\u4e0d\u540c\u3001\u65e0\u6cd5\u6570\u636e\u8fd8\u539f\u3002\u6240\u4ee5\u7528\u4e8e\u9a8c\u8bc1\u6570\u636e\u7684\u5b8c\u6574\u6027\u3002android\u4e2d\u7684\u4f7f\u7528\u4f8b\u5b50OTA\u5305\u4f20\u8f93\u4f7f\u7528\u7684MD5\uff0cOTA\u5dee\u5206\u5347\u7ea7\u4f7f\u7528\u7684SHA256\uff0cDM-verity\u4f7f\u7528\u7684HASH\u7b97\u6cd5\u3002<\/p>\n MD5\u7b97\u6cd5\u539f\u7406https:\/\/blog.csdn.net\/sinat_27933301\/article\/details\/79538169<\/u><\/u><\/p>\n<\/p>\n 2.2.2\u3001\u201c\u5bf9\u79f0\/\u975e\u5bf9\u79f0\u5bc6\u94a5\u201d\u52a0\u5bc6\u7b97\u6cd5<\/strong><\/strong><\/strong><\/p>\n \u5bf9\u79f0\u7b97\u6cd5\uff1aDES\u7b97\u6cd5\uff0cRC\u7b97\u6cd5\uff0cAES\u7b97\u6cd5\uff0c\u4e3b\u8981\u7279\u70b9\u52a0\u5bc6\u53ef\u9006\uff0c\u52a0\u5bc6\u89e3\u5bc6\u4f7f\u7528\u76f8\u540c\u5bc6\u94a5\u3002\u5168\u76d8\u52a0\u5bc6\uff0c\u6587\u4ef6\u7ea7\u52a0\u5bc6\u4f7f\u7528\u7684\u4e00\u822c\u662fAES\u7b97\u6cd5\u3002<\/p>\n \u975e\u5bf9\u79f0\u7b97\u6cd5\uff1aRSA\u7b97\u6cd5\uff0c\u4e3b\u8981\u7279\u70b9\u662f\u52a0\u5bc6\u89e3\u5bc6\u4f7f\u7528\u4e0d\u540c\u5bc6\u94a5\u3002<\/p>\n \u516c\u94a5\u52a0\u5bc6\uff0c\u79c1\u94a5\u89e3\u5bc6\uff08\u52a0\u5bc6\u4f20\u8f93\uff09\uff1b\u79c1\u94a5\u7b7e\u540d\uff0c\u516c\u94a5\u9a8c\u7b7e\uff08\u786e\u8ba4\u53d1\u9001\u65b9\uff0c\u4e5f\u53ef\u9a8c\u8bc1\u5b8c\u6574\u6027\uff0c\u53ef\u4ee5\u7528\u4e8eOTA\u5305\u7b7e\u540d\uff0csecure boot\uff0cVerify boot\uff0c\u5e94\u7528\u7b7e\u540d\uff09\u3002<\/p>\n https:\/\/www.jianshu.com\/p\/3331467d139f<\/u><\/u><\/p>\n \u7b7e\u540d\u3001\u52a0\u5bc6\u3001\u8bc1\u4e66\u7684\u57fa\u672c\u539f\u7406\u548c\u7406\u89e3 https:\/\/www.cnblogs.com\/Caersi\/p\/6720789.html<\/u><\/u><\/p>\n AES\u7b97\u6cd5\u539f\u7406https:\/\/blog.csdn.net\/gulang03\/article\/details\/81175854<\/u><\/u><\/p>\n RSA\u7b97\u6cd5\u539f\u7406https:\/\/blog.csdn.net\/u014044812\/article\/details\/80866759<\/u><\/u><\/p>\n<\/p>\n 2.3.1\u5bf9\u79f0\u7b97\u6cd5<\/strong><\/strong><\/strong><\/p>\n \u5168\u76d8\u52a0\u5bc6<\/u><\/u><\/p>\n \u5168\u76d8\u52a0\u5bc6\u5de5\u5177\u4f7f\u7528https:\/\/blog.csdn.net\/zhongbeida_xue\/article\/details\/78550712#t18<\/u><\/u><\/p>\n \u793a\u4f8b<\/p>\n \u6587\u4ef6\u7cfb\u7edf\u52a0\u5bc6<\/u><\/u><\/p>\n \u539f\u7406 https:\/\/www.kernel.org\/doc\/html\/latest\/filesystems\/fscrypt.html<\/u><\/u><\/p>\n \u6587\u4ef6\u7ea7\u52a0\u5bc6\u5de5\u5177\u4f7f\u7528https:\/\/blog.csdn.net\/zm_jack\/article\/details\/78894980<\/u><\/u><\/p>\n \u793a\u4f8b<\/p>\n sudo apt-get install ecryptfs-utils<\/em><\/em> <\/em>\/\/\u5b89\u88c5\u63a7\u4ef6<\/em><\/em><\/p>\n sudo mount -t ecryptfs real_path ecryptfs_mounted_path<\/em><\/em> <\/em>\/\/\u4ee5\u6587\u4ef6\u52a0\u5bc6\u65b9\u5f0f\u6302\u8f7d\u6587\u4ef6<\/em><\/em><\/p>\n \u4fee\u6539\u6587\u4ef6<\/p>\n sudo umount -t ecryptfs ecryptfs_test<\/em><\/em> <\/em>\/\/\u5378\u8f7d<\/em><\/em><\/p>\n \u4ee5\u4e0d\u540c\u65b9\u5f0f\u518d\u6302\u8f7d\u5e76\u4fee\u6539\u6587\u4ef6<\/p>\n sudo mount -t ecryptfs real_path ecryptfs_mounted_path<\/em><\/em> <\/em>\/\/\u4ee5\u6587\u4ef6\u52a0\u5bc6\u65b9\u5f0f\u6302\u8f7d\u6587\u4ef6<\/em><\/em><\/p>\n 1\u3001\u8f93\u5165\u4e0d\u540c\u53c2\u6570\u6216\u5bc6\u7801<\/p>\n 2\u3001\u53e0\u52a0\u52a0\u5bc6<\/p>\n<\/p>\n \u67e5\u770bkeys<\/p>\n cat \/proc\/keys | grep <\/em><\/em><\/p>\n \u4e2a\u4eba\u603b\u7ed3\u5168\u76d8\u52a0\u5bc6\u548c\u6587\u4ef6\u7cfb\u7edf\u52a0\u5bc6\u533a\u522b\uff1a<\/p>\n 1\u3001\u5168\u76d8\u52a0\u5bc6\u53ea\u6709\u4e00\u4e2a\u5bc6\u7801\uff0c\u8be5\u5bc6\u7801\u6b63\u786e\u89e3\u5bc6\u540e\u624d\u53ef\u4f7f\u7528\u3002\u6587\u4ef6\u7ea7\u52a0\u5bc6\u5bc6\u7801\u6216\u53c2\u6570\u4e0d\u6b63\u786e\u65f6\u4e5f\u80fd\u6302\u8f7d\uff0c\u5982\u679c\u4e4b\u524d\u52a0\u5bc6\u7684keyring\u5b58\u5728\uff0c\u5219\u53ef\u4ee5\u8bfb\u53d6\u6587\u4ef6\uff0c\u4e0d\u5b58\u5728\u5219\u4e0d\u80fd\u8bfb\u53d6\uff1b\u5199\u5165\u65f6\u4ee5\u65b0\u53c2\u6570\u52a0\u5bc6\u65b9\u5f0f\u5199\u5165\uff1b<\/p>\n 2\u3001\u5168\u76d8\u52a0\u5bc6\u78c1\u76d8\u4e0a\u662f\u5df2\u52a0\u5bc6\u6570\u636e\uff0c\u770b\u4e0d\u5230\u6587\u4ef6\u7cfb\u7edf\u7684\uff0c\u6d41\u7a0b\u4e0a\u662f\u5c31\u9700\u8981\u5148\u521b\u5efa\u89e3\u5bc6\u6620\u5c04\uff0c\u7136\u540e\u6302\u8f7d\u51fa\u6587\u4ef6\u7cfb\u7edf\uff08\u5982\u679c\u8be5\u78c1\u76d8\u4e0d\u5b58\u5728\u6587\u4ef6\u7cfb\u7edf\uff0c\u53ea\u662fbin\u6587\u4ef6\u5c31\u4e0d\u9700\u8981\u518d\u6302\u8f7d\u4e86\uff09\u3002\u6587\u4ef6\u7ea7\u52a0\u5bc6\u5df2\u7ecf\u5b58\u5728\u6587\u4ef6\u7cfb\u7edf\uff0c\u76f4\u63a5\u6620\u5c04\u89e3\u5bc6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"FBE \u4e0eFDE\u5b66\u4e60\u603b\u7ed32\u3001\u5168\u76d8\u52a0\u5bc6\u78c1\u76d8\u4e0a\u662f\u5df2\u52a0\u5bc6\u6570\u636e\uff0c\u770b\u4e0d\u5230\u6587\u4ef6\u7cfb\u7edf\u7684\uff0c\u6d41\u7a0b\u4e0a\u662f\u5c31\u9700\u8981\u5148\u521b\u5efa\u89e3\u5bc6\u6620\u5c04\uff0c\u7136\u540e\u6302\u8f7d\u51fa\u6587\u4ef6\u7cfb\u7edf\uff08...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/864"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=864"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/864\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}1.2\u3001\u5b66\u4e60\u76ee\u6807:<\/strong><\/strong><\/strong><\/h4>\n
2\u3001\u9884\u5907\u77e5\u8bc6<\/strong><\/strong><\/strong><\/h3>\n
2.1\u3001\u52a0\u5bc6\u6280\u672f<\/strong><\/strong><\/strong><\/h4>\n
2.2\u3001\u5178\u578b\u52a0\u5bc6\u7b97\u6cd5<\/strong><\/strong><\/strong><\/h4>\n
2.3\u3001Linux\u52a0\u5bc6\u5de5\u5177<\/strong><\/strong><\/strong><\/h4>\n
fallocate -l 1G .\/luks.vol \/\/\u521b\u5efa\u5927\u6587\u4ef6\n\ncryptsetup --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 10000 luksFormat .\/luks.vol \/\/\u52a0\u5bc6\n\ncryptsetup luksOpen .\/luks.vol yectest \/\/\u521b\u5efa\u89e3\u5bc6\u6620\u5c04\u8fde\u63a5\n\nls \/dev\/mapper\/\n\nmkfs.ext4 \/dev\/mapper\/yectest \/\/\u7ed9\u8be5\u5757\/\u6587\u4ef6\u521b\u5efa\u6587\u4ef6\u7cfb\u7edf\n\nmkdir \/mnt\/yectest \n\nmount \/dev\/mapper\/yectest \/mnt\/yectest\/\/\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\n\ndf -hT\n\n\u4fee\u6539\u6587\u4ef6\n\numount \/mnt\/yectest \/\/\u5378\u8f7d\n\ncryptsetup close yectest \/\/\u5173\u95ed\u6620\u5c04\u8fde\u63a5<\/code><\/pre>\n