On Fri, Mar 27, 2009 at 04:36:15PM +0800, Herbert Xu wrote: > On Mon, Mar 16, 2009 at 12:52:51PM +0100, Steffen Klassert wrote: > > If the crypro requests of a crypto transformation are processed in > > parallel, the usual chain IV generator would serialize the crypto > > requests again. The percpu IV chain genarator allocates the IV as > > percpu data and generates percpu IV chains, so a crypro request > > does not need to wait for the completition of the IV generation > > from a previous request that runs on a different cpu. > > > > Signed-off-by: Steffen Klassert <steffen.klassert@xxxxxxxxxxx> > > I actually thought about this one when I first wrote chainiv, > I chose to avoid this because it has some security consequences. > In particular, an attacker would now be able to infer whether two > packets belong to two differnt flows from the fact that they came > from two different IV streams. > > In any case, I don't think this is central to your work, right? > Well, to do efficient parallel processing we need a percpu IV chain genarator. pcrypt sends the crypto requests round robin to the cpus independent of the flow they are belong to, so the flows and the IV streams are mixing. As long as we use the percpu IV chain genarator just for parallel algorithms we don't have this security issues. -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html