From: Sebastian Siewior <linux-crypto@ml.breakpoint.cc>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Subject: Re: IV copy strategy
Date: Thu, 15 Nov 2007 22:10:05 +0100 [thread overview]
Message-ID: <20071115211005.GA21159@Chamillionaire.breakpoint.cc> (raw)
In-Reply-To: <20071114142253.GA15201@gondor.apana.org.au>
* Herbert Xu | 2007-11-14 22:22:53 [+0800]:
>Indeed the last call to blkcipher_walk_done will free the IV if
>we had to copy it due to an alignment mismatch. Since geode has
>an alignment of 16 bytes, that's almost a given.
Ach
>You could copy from/to desc->info instead which would solve the
>problem.
>
>However, why does op->iv exist at all? Surely we can just use
>walk->iv directly and the problem goes away completely?
Yes, you are absolutely right. I get rid of op->iv and copy the IV back
to walk->iv in the crypt function (where I have to do it anyway).
In this case, the s390 has the same bug (they copy the IV back after
blkcipher_walk_done()). Howevere it will probably never get triggered
because they have an aligment of 0 (what gets pushed to 3 by the crypto
API if I remenber correcrtly).
So a general question: Is it a must (requirement by the crypto API) to
copy the IV back or not? I guess not if we move completely to async (one
day) :)
>
>Cheers,
Sebastian
next prev parent reply other threads:[~2007-11-15 21:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 23:11 IV copy strategy Sebastian Siewior
2007-11-14 14:22 ` Herbert Xu
2007-11-15 21:10 ` Sebastian Siewior [this message]
2007-11-16 2:08 ` Herbert Xu
2007-11-16 8:19 ` Sebastian Siewior
2007-11-16 9:30 ` Herbert Xu
2007-11-16 11:11 ` Evgeniy Polyakov
2007-11-16 11:25 ` Herbert Xu
2007-11-16 11:42 ` Evgeniy Polyakov
2007-11-16 13:47 ` Herbert Xu
2007-11-18 6:52 ` Herbert Xu
2007-11-18 6:53 ` Herbert Xu
2007-11-19 10:38 ` Evgeniy Polyakov
2007-11-19 11:56 ` Herbert Xu
2007-11-20 14:23 ` Evgeniy Polyakov
2007-11-26 9:10 ` Sebastian Siewior
2007-11-15 21:23 ` [PATCH] [crypto] geode: do not copy the IV too often Sebastian Siewior
2007-11-18 13:41 ` Herbert Xu
2007-11-26 9:25 ` Sebastian Siewior
2007-11-26 9:28 ` Herbert Xu
2007-11-26 9:42 ` Sebastian Siewior
2007-11-27 19:33 ` Sebastian Siewior
2007-11-30 5:37 ` 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=20071115211005.GA21159@Chamillionaire.breakpoint.cc \
--to=linux-crypto@ml.breakpoint.cc \
--cc=herbert@gondor.apana.org.au \
--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 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.