Re: [PATCH] crypto: authenc - convert to ahash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 17, 2009 at 09:47:10AM +0200, Steffen Klassert wrote:
>
> @@ -165,8 +219,16 @@ static int crypto_authenc_genicv(struct aead_request *req, u8 *iv,
>  		dst = cipher;
>  	}
>  
> -	cryptlen = req->cryptlen + ivsize;
> -	hash = crypto_authenc_hash(req, flags, dst, cryptlen);
> +	sg_init_table(asg, 2);
> +	memcpy(asg, req->assoc, sizeof(struct scatterlist));
> +	asg->page_link &= ~0x02;
> +	authenc_chain(asg, dst, 0);
> +	dst = asg;

This is not quite right.  What I had in mind was to use the digest
interface if the assoc SG list has a single entry in it.  Otherwise
it should just fall back to doing update followed by finup.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux