linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ablkcipher algorithm with givencrypt
@ 2009-02-06 23:26 Lee Nipper
  2009-02-09 22:19 ` Lee Nipper
  0 siblings, 1 reply; 2+ messages in thread
From: Lee Nipper @ 2009-02-06 23:26 UTC (permalink / raw)
  To: linux-crypto

Herbert,

I'm implementing ablkcipher algorithms in talitos and need some clarification.

If an ablkcipher crypto algorithm implements .givencrypt with geniv as "<built-in>"
what is the reason that it cannot be used as a building block cipher for
an IPsec use case ?

I've noticed that if an ablkcipher algorithm does not implement givencrypt,
and sets geniv to eseqiv, then the algorithm can somewhat support an IPsec use case.
During testing however, it seems that eseqiv_givencrypt doesn't handle a scatterlist
fully for an already fragmented src.  For example, a large ping (> 1460 bytes)
going out causes a scatterlist with two entries within esp_output, but it appears that
the src scatterlist doesn't carry forth properly through eseqiv_givencrypt
into the ablkcipher encrypt routine.

I'm wondering if I've stumbled onto a bug in this case.
At the least my understanding is incomplete.

Thank you,

Lee Nipper
Freescale Semiconductor Inc.
 






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

* Re: ablkcipher algorithm with givencrypt
  2009-02-06 23:26 ablkcipher algorithm with givencrypt Lee Nipper
@ 2009-02-09 22:19 ` Lee Nipper
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Nipper @ 2009-02-09 22:19 UTC (permalink / raw)
  To: linux-crypto

On Fri, 2009-02-06 at 17:26 -0600, Lee Nipper wrote:
> During testing however, it seems that eseqiv_givencrypt doesn't handle a scatterlist
> fully for an already fragmented src.  For example, a large ping (> 1460 bytes)
> going out causes a scatterlist with two entries within esp_output, but it appears that
> the src scatterlist doesn't carry forth properly through eseqiv_givencrypt
> into the ablkcipher encrypt routine.

I was mistaken.  I was unaware of the chained sg from eseqiv_givencrypt.
Using scatterwalk_sg_next instead of sg_next handles it.

Lee


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

end of thread, other threads:[~2009-02-09 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-06 23:26 ablkcipher algorithm with givencrypt Lee Nipper
2009-02-09 22:19 ` Lee Nipper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).