All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] why nbytes for block cipher encrypt/decrypt is only 512 bytes
@ 2012-04-20  9:28 Rodel Miguel
  2012-04-20 10:22 ` Arno Wagner
  0 siblings, 1 reply; 4+ messages in thread
From: Rodel Miguel @ 2012-04-20  9:28 UTC (permalink / raw)
  To: dm-crypt; +Cc: Rodel Miguel

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]

Hi,

I am implementing a hardware encryption driver but I am having some
performance issues.  One of the areas of performance improvement that I am
thinking is to increase the number of bytes (unsigned int nbytes) that my
block cipher driver's encrypt/decrypt function gets; from 512 to 4096
bytes.  My hardware can be maximized to 4kbytes.  Do you have any
suggestions how I can maximize the en/decrypt performance by getting more
than 512 bytes of data every time the block cipher's encrypt/decrypt is
called?

Thank you very much for your help!

Kind Regards,
Rodel

[-- Attachment #2: Type: text/html, Size: 662 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-crypt] why nbytes for block cipher encrypt/decrypt is only 512 bytes
  2012-04-20  9:28 [dm-crypt] why nbytes for block cipher encrypt/decrypt is only 512 bytes Rodel Miguel
@ 2012-04-20 10:22 ` Arno Wagner
  2012-04-20 10:55   ` Rodel Miguel
  2012-04-20 11:35   ` Milan Broz
  0 siblings, 2 replies; 4+ messages in thread
From: Arno Wagner @ 2012-04-20 10:22 UTC (permalink / raw)
  To: dm-crypt

I think you cannot. As long as the block-size for the IV scheme
is 512 bytes, you are stuck with encrypting 512 bytes at a time,
as they have their own IV. 

Arno


On Fri, Apr 20, 2012 at 05:28:54PM +0800, Rodel Miguel wrote:
> Hi,
> 
> I am implementing a hardware encryption driver but I am having some
> performance issues.  One of the areas of performance improvement that I am
> thinking is to increase the number of bytes (unsigned int nbytes) that my
> block cipher driver's encrypt/decrypt function gets; from 512 to 4096
> bytes.  My hardware can be maximized to 4kbytes.  Do you have any
> suggestions how I can maximize the en/decrypt performance by getting more
> than 512 bytes of data every time the block cipher's encrypt/decrypt is
> called?
> 
> Thank you very much for your help!
> 
> Kind Regards,
> Rodel

> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt


-- 
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name 
GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25 338F
----
One of the painful things about our time is that those who feel certainty 
are stupid, and those with any imagination and understanding are filled 
with doubt and indecision. -- Bertrand Russell 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-crypt] why nbytes for block cipher encrypt/decrypt is only 512 bytes
  2012-04-20 10:22 ` Arno Wagner
@ 2012-04-20 10:55   ` Rodel Miguel
  2012-04-20 11:35   ` Milan Broz
  1 sibling, 0 replies; 4+ messages in thread
From: Rodel Miguel @ 2012-04-20 10:55 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 1792 bytes --]

Hi Arno , thanks for the reply. What if I trick the system to have block
size of say 128 instead of the default 16 for my AES driver? Do you know
what the side effect could be?

Thanks!
On Apr 20, 2012 6:23 PM, "Arno Wagner" <arno@wagner.name> wrote:

> I think you cannot. As long as the block-size for the IV scheme
> is 512 bytes, you are stuck with encrypting 512 bytes at a time,
> as they have their own IV.
>
> Arno
>
>
> On Fri, Apr 20, 2012 at 05:28:54PM +0800, Rodel Miguel wrote:
> > Hi,
> >
> > I am implementing a hardware encryption driver but I am having some
> > performance issues.  One of the areas of performance improvement that I
> am
> > thinking is to increase the number of bytes (unsigned int nbytes) that my
> > block cipher driver's encrypt/decrypt function gets; from 512 to 4096
> > bytes.  My hardware can be maximized to 4kbytes.  Do you have any
> > suggestions how I can maximize the en/decrypt performance by getting more
> > than 512 bytes of data every time the block cipher's encrypt/decrypt is
> > called?
> >
> > Thank you very much for your help!
> >
> > Kind Regards,
> > Rodel
>
> > _______________________________________________
> > dm-crypt mailing list
> > dm-crypt@saout.de
> > http://www.saout.de/mailman/listinfo/dm-crypt
>
>
> --
> Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email:
> arno@wagner.name
> GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25
> 338F
> ----
> One of the painful things about our time is that those who feel certainty
> are stupid, and those with any imagination and understanding are filled
> with doubt and indecision. -- Bertrand Russell
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>

[-- Attachment #2: Type: text/html, Size: 2486 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dm-crypt] why nbytes for block cipher encrypt/decrypt is only 512 bytes
  2012-04-20 10:22 ` Arno Wagner
  2012-04-20 10:55   ` Rodel Miguel
@ 2012-04-20 11:35   ` Milan Broz
  1 sibling, 0 replies; 4+ messages in thread
From: Milan Broz @ 2012-04-20 11:35 UTC (permalink / raw)
  To: dm-crypt

On 04/20/2012 12:22 PM, Arno Wagner wrote:
> I think you cannot. As long as the block-size for the IV scheme
> is 512 bytes, you are stuck with encrypting 512 bytes at a time,
> as they have their own IV. 

Yes for now, 512bytes sector as internal device-mapper unit ==
size of encryption unit in dmcrypt.

There was several discussions about it (see list archive) and maybe
in future there will be an option to make it configurable (it will
cause several incompatibility problems though) but for now, 512 is
the only supported value.

Milan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-20 11:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-20  9:28 [dm-crypt] why nbytes for block cipher encrypt/decrypt is only 512 bytes Rodel Miguel
2012-04-20 10:22 ` Arno Wagner
2012-04-20 10:55   ` Rodel Miguel
2012-04-20 11:35   ` Milan Broz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.