Detailed description of developing disk encryption methods in Linux (1)

Source: Internet
Author: User

As the computing and storage capabilities of smartphones increase, mobile phones will store more and more private data, and the leakage of such data may cause serious consequences. Mobile phone information security has always been one of our key points. For some important functions, we need to authenticate them before they can be used. However, this can only block novice hackers, and it can only protect against gentlemen and prevent villains, therefore, we hope to encrypt important data before saving it. To this end, it took a moment to learn about the Linux disk encryption method.
Method 1:

Download and compile util-linuxhttp: // www.paranoiacs.org /~ Sluskyb/hacks/util-linux/losetup-combined.patchhttp: // ftp. cwi. nl/aeb/util-linux/util-linux-2.12.tar.gzhttp: // hydra.azilian.net/util-linux-2.12-kernel-2.6.patchtar zxvf util-linux-2.12.tar.gzcd util-linux-2.12patch-p1 <.. /losetup-combined.patchpatch-p1 <.. /util-linux-2.12-kernel-2.6.patch (if there are compilation errors such as _ syscall5, replace it with the new call method syscall) make; make install compile kernel (skip this step if cryptoloop is already supported) make menuconfigDevice Drivers > Block Devices> Loopback device supportBLK_DEV_CRYPTOLOOP loading module modprobe cryptoloop (and encryption module) create a loop device dd if =/dev/zero of = ~ /Cryptoloop. image bs = 1 M count = 10 losetup-e aes-256/dev/loop0 ~ /Cryptoloop. image (Prompt For Password Input) create a file system and load mkfs. ext3/dev/loop0mkdir/mnt/cryptomount-t ext3 ~ /Cryptoloop. image/mnt/crypto/-oencryption = aes-256 (prompted for a password) uninstall umount/mnt/cryptolosetup-d/dev/loop0 reload losetup-e aes-256/dev/loop0 ~ /Cryptoloop. imagemount-t ext3 ~ /Cryptoloop. image/mnt/crypto/-oencryption = aes-256
Cryptoloop is a transfer implementation. For which transfer and transfer parameters (such as passwords) are used, this can be done through the ioctrl System Call of LOOP_SET_STATUS64 (the mount command is implemented in this way ).
The disadvantage of cryptoloop is that it is only applicable to loop devices and does not work for log file systems.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.