Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1488663

fscrypt: in-place decrypt vs. out-of-place encrypt?

From Richard Weinberger <richard@nod.at>
Newsgroups linux.kernel
Subject fscrypt: in-place decrypt vs. out-of-place encrypt?
Date 2016-09-22 11:00 +0200
Message-ID <sk81j-45n-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi!

While reading the fscrypt code I noticed that some functions use the bounce pages
and some not.
fscrypt_decrypt_page() and fscrypt_decrypt_bio_pages() work in-place while
fscrypt_encrypt_page() and fscrypt_zeroout_range() use a bounce page.

So, both ext4 and f2fs encrypt data using an extra buffer but decrypt mostly
in-place without the need of an extra buffer.
Why that? I'd assume when decryption can be done in-place also encryption is possible
that way.

I'm working on fscrypt for UBIFS and would like to avoid an extra buffer since memory
is low on embedded systems.

Thanks,
//richard

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

fscrypt: in-place decrypt vs. out-of-place encrypt? Richard Weinberger <richard@nod.at> - 2016-09-22 11:00 +0200
  Re: fscrypt: in-place decrypt vs. out-of-place encrypt? Theodore Ts'o <tytso@mit.edu> - 2016-09-22 15:20 +0200
    Re: fscrypt: in-place decrypt vs. out-of-place encrypt? Richard Weinberger <richard@nod.at> - 2016-09-22 16:20 +0200

csiph-web