From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: linux-crypto@vger.kernel.org, Herbert Xu <herbert@gondor.apana.org.au>
Cc: Sebastian Siewior <linux-crypto@ml.breakpoint.cc>
Subject: Re: [1/1 take 2] HIFN 795x driver.
Date: Wed, 3 Oct 2007 12:41:19 +0400 [thread overview]
Message-ID: <20071003084118.GA19117@2ka.mipt.ru> (raw)
In-Reply-To: <20071002190512.GA8761@Chamillionaire.breakpoint.cc>
On Tue, Oct 02, 2007 at 09:05:12PM +0200, Sebastian Siewior (linux-crypto@ml.breakpoint.cc) wrote:
> >DES currently does not pass tcrypt's multipage test, since HIFN adapter
> >can not work with non-blocksize aligned chunks, although crypto alignmask
> >is set to 3, tcrypt provides a block of size 2 in its multipage test,
> >which fails.
> I recalled now that I forgot to point this out. You set the align mask to
> the block size of the algorithm but it is almost unused / useless.
> Let me explain:
> - it is ensured that the key you get (in the setkey function) is
> properly aligned. This doesn't matter in your case because you
> memcpy() the key away to your private struct.
> - your private struct is pointer aligned (if I remember correctly). You
> memcpy() your key away so it looks like you don't need the ctx
> aligned according to your mask (but it would be possible :))
> - the proper alignment of src, dst and the IV that you get is _not_
> ensured. This would be the case if you would develop a blkcipher and
> use blkcipher_walk_init(), blkcipher_walk_virt(), ....
>
> Now. If you pass your AES-tcrypt-test (where you need 16 bytes alignment)
> than this is pure luck. If you really need aligned src,dst or the IV
> than you have to do it by yourself :(
It has to be multiple of blocksize. I.e. it is impossible to
crypt one byte - hardware will stall, DES test provides two bytes as
input - this will not work. If that is going to be handled in driver,
then it will relocate. I'm not sure it is the right decision.
--
Evgeniy Polyakov
next prev parent reply other threads:[~2007-10-03 8:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-02 15:00 [1/1 take 2] HIFN 795x driver Evgeniy Polyakov
2007-10-02 19:05 ` Sebastian Siewior
2007-10-03 8:41 ` Evgeniy Polyakov [this message]
2007-10-03 11:54 ` Herbert Xu
2007-10-03 12:05 ` Evgeniy Polyakov
2007-10-04 5:49 ` Herbert Xu
2007-10-04 9:22 ` Evgeniy Polyakov
2007-10-04 10:04 ` Herbert Xu
2007-10-04 15:04 ` Evgeniy Polyakov
2007-10-05 8:18 ` Herbert Xu
2007-10-06 21:58 ` Sebastian Siewior
2007-10-08 3:15 ` Herbert Xu
2007-10-08 15:49 ` Sebastian Siewior
2007-10-08 16:07 ` Herbert Xu
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=20071003084118.GA19117@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@ml.breakpoint.cc \
--cc=linux-crypto@vger.kernel.org \
/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