DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: levent demir <levent.demir@inria.fr>
To: dm-crypt@saout.de
Subject: [dm-crypt] Cryptesetup and dm-crypt
Date: Wed, 27 Apr 2016 14:56:50 +0200	[thread overview]
Message-ID: <1461761810.6452.16.camel@inria.fr> (raw)
In-Reply-To: <56E73AE2.9020404@gmail.com>

Hi,

I am a PhD student and works and I am working with cryptsetup and a hw
crypto engine. 

I am using an ATMEL board which is able to do AES-ECB mode for example. 

We have implemented an XTS version with all operations (XOR, GF
Multiplication, 2 AES : one for IV one for data...)

My question is can we use the page size instead of the block size of 512
bytes ?

I have read some thread it is written that it could be a security issue
but I don't agree because : 

Now to implement XTS I do as follows basically : 

I take the IV encrypt it with the second part of the key, then I compute
the 32 tweaks values in -for example- an array tweak_buf[512]. 
Then I just have to compute the XOR with plaintext. 
I do a DMA encryption with ECB of the 512 bytes. 
Again I xor the ciphered data with tweak_buf.

Then I have ciphered a whole block of 512 bytes.

Now my question, the hardware is supporting a DMA operation till 4096, 
is it not interesting to encrypt 8 blocks at a time ? 
It is exactly the same operation as encrypting each block
consecutively. 

Of course I need to pre-compute the 8 tweak_buf in a big
tweak_buf[4096].Then in only one DMA operation I will be able to encrypt
4096 bytes with ECB mode. 

I hope you understand what I mean.

Can you tell me if it is possible ? If yes can I use a previous patch, I
have seen that there are some works on it ?

Thank you. 

  parent reply	other threads:[~2016-04-27 13:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 15:21 [dm-crypt] Some questions/clarifications around the LUKS spec Daniel P. Berrange
2016-03-14 18:58 ` Sven Eschenberg
2016-03-14 19:54   ` Milan Broz
2016-03-14 21:24     ` Sven Eschenberg
2016-03-14 22:27       ` Milan Broz
2016-03-15 14:21         ` Sven Eschenberg
2016-04-27 12:56         ` levent demir [this message]
2016-04-27 16:35           ` [dm-crypt] Cryptesetup and dm-crypt Arno Wagner
2016-03-14 20:31 ` [dm-crypt] Some questions/clarifications around the LUKS spec Milan Broz
2016-03-15 10:23   ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461761810.6452.16.camel@inria.fr \
    --to=levent.demir@inria.fr \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox