Linux Kernel Encryption Support for File system
Kyungsik Lee SW Platform Lab., Corporate R&D LG Electronics, Inc. 2016/10/20
Support for File system Kyungsik Lee SW Platform Lab., Corporate - - PowerPoint PPT Presentation
Linux Kernel Encryption Support for File system Kyungsik Lee SW Platform Lab., Corporate R&D LG Electronics, Inc. 2016/10/20 Mobile Security Mobile Security is an important issue More data could be more danger with mobile devices
Kyungsik Lee SW Platform Lab., Corporate R&D LG Electronics, Inc. 2016/10/20
2
For device implementations supporting full-disk encryption and with Advanced Encryption Standard (AES) crypto performance above 50MiB/sec, the full-disk encryption MUST be enabled by default at the time the user has completed the out-of-box setup experience Excerpted from Android 6.0 Compatibility Definition Document
3
50 100 150 200 250 ext4 dm-crypt ext4(encrypt) eCryptfs MiB/sec.
Cpu-freq. 598000 Cpu-freq. 819000 Cpu-freq. 1001000
4
20 40 60 80 100 120 ext4 dm-crypt ext4(encrypt) eCryptfs MiB/sec.
cpu-freq. 598000 cpu-freq. 819000 cpu-freq. 1001000
=> Generic File system Encryption Support
5
different keys that can be unlocked independently.
whole volume, disk partition
6
Storage Block layer User space File system Virtual device Encrypt/Decrypt Crypto APIs
7
Kernel Internals
Storage File system(lower) User space eCryptfs Block layer Crypto APIs
8
Kernel Internals
targets are all encrypted
Storage User space Ext4(encrypt) Block layer Crypto APIs
9
Kernel Internals
eCryptfs, aes-cbc Ext4-encrypt, aes-xts dm-crypt, aes-cbc-essiv:sha256
10
11
50 100 150 200 250 ext4 ext4-fde ext4(encrypt) ecryptfs-ext4 MiB/sec.
ra=disabled ra=enabled 5 10 15 20 25 ext4 dm-crypt ext4(encrypt) eCryptfs MiB/sec.
cpu=1 cpu=2
50 100 150 200 250 ext4 dm-crypt ext4(encrypt) eCryptfs MiB/sec.
cpu=1 cpu=2 cpu=4
12
50 100 150 200 250 ext4 dm-crypt ext4(encrypt) eCryptfs MiB/sec.
cpu=1 cpu=2 cpu=4
x2 x2 x1
13
20 40 60 80 100 120 140 ext4 dm-crypt ext4(encrypt) eCryptfs MiB/sec.
cpu=1 cpu=2
14
20 40 60 80 100 120 140 ext4 dm-crypt ext4(encrypt) eCryptfs MiB/sec.
cpu=1 cpu=2
x2 x2 x1
15
1000 2000 3000 4000 5000 6000 ext4 dm-crypt ext4(encrypt) eCryptfs IOPS
Random read(IOPS)
IOPS ra=enabled IOPS ra=disabled
16
1000 2000 3000 4000 5000 6000 ext4 dm-crypt ext4(encrypt) eCryptfs IOPS
Random read(IOPS)
IOPS ra=enabled IOPS ra=disabled
Lower File system Page Cache
17
18
50 100 150 200 250 ext4 dm-crypt ext4(encrypt) eCryptfs MiB/sec.
cpu=1 cpu=2
Decrypt Overhead
19
Storage User space Ext4(encrypt) Block layer Normal IO Heavy IO Decrypt thread Bottleneck
20
Storage User space Ext4(encrypt) Block layer Normal IO Heavy IO Decrypt thread Decrypt thread Decrypt thread Decrypt thread
10 20 30 40 50 60 70 80 cpu=1 cpu=2 cpu=4 MiB/sec.
ext4(encrypt) Patched
21
500 1000 1500 2000 2500 3000 3500 cpu=1 cpu=2 cpu=4 IOPS
Random read(IOPS)
ext4(encrypt) Patched
50%
decryption
22
23