Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Userspace tool to create ext4 encrypted directories.

License

NotificationsYou must be signed in to change notification settings

gdelugre/ext4-crypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux kernel 4.1 introduced native encryption for the ext4 filesystem.

This is a userspace tool to manage encrypted ext4 directories.

Warning: this kernel feature is very unstable and experimental at the moment. I managed to crash my kernel (4.1.2) a few times very easily just by playing with it.

Usage

Encrypting a new directory

The target directory must be empty.

$mkdir vault$ext4-crypt create vaultEnter passphrase:Confirm passphrase:vault: Encryption policy is now set.$ext4-crypt status vaultPolicy version:   0Filename cipher:  aes-256-ctsContents cipher:  aes-256-xtsFilename padding: 4Key descriptor:   qC6PCZsFKey serial:       351198062

Unlocking an encrypted directory

$ls vaultFTRsD7y2dUyXl6e8omKYbB  IdLqPffZBKSebTeh6hZI7C  tReYAc2tKyIOHSIcaSV2DB$ext4-crypt attach vaultEnter passphrase:$ls vaultfstab  passwd  services

Install

cmake.makesudo make install

Distribution packages could be provided later if deemed useful.

Requirements

Linux kernel 4.1+ with support forCONFIG_EXT4_ENCRYPTION.

Limitations

There isno key verification !

So basically, any passphrase you provide will be accepted, but you'll get junkif you provide the wrong key. This is currently a limitation of the kernelimplementation.

Cannot choose cipher

Cipher is hardcoded to be AES-256-XTS for data and AES-256-CTS for filenames.More ciphers will probably be available in future kernel versions.

You cannot permanently decrypt a directory

The encryption policy is stored at the inode level and cannot be removed fromuserspace. You'll need to provide the right key and copy the data to anotherdirectory if you want to remove the encryption.

Plaintext filenames still appear after detaching the key

That is a kernel issue. The dentries cache is not invalidated when you remove the key and still contains the plaintext filenames.

You must remount the device or force a filesystem cache flush with:

#echo 2> /proc/sys/vm/drop_caches

Dependencies

About

Userspace tool to create ext4 encrypted directories.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp