Re: HIFN+IPsec crashes in current -git

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

 



Hi Patrick.

On Wed, Feb 20, 2008 at 01:33:22PM +0100, Patrick McHardy (kaber@xxxxxxxxx) wrote:
> I saw the discrepancy between the elen value used
> for aead_request_set_crypt() in esp_input() and the
> req->nbytes value seen in hifn_setup_session().

What iv generation scheme do you use? It looks like only gcm and ccm add
16 bytes to cryptlen and set nbytes to them. Although they both install
two scatterlists for crypto operation: one for data and one for above
addition block of 16 bytes.

Btw, Herbert, I've found a tiny typo in both ccm and gcm modules, which
do not set correct cra_aead.geniv name.

Signed-off-by: Evgeniy Polyakov <johnpol@xxxxxxxxxxx>

diff --git a/crypto/ccm.c b/crypto/ccm.c
index 7cf7e5a..118b6f5 100644
--- a/crypto/ccm.c
+++ b/crypto/ccm.c
@@ -821,7 +821,7 @@ static struct crypto_instance *crypto_rfc4309_alloc(struct rtattr **tb)
 	inst->alg.cra_aead.encrypt = crypto_rfc4309_encrypt;
 	inst->alg.cra_aead.decrypt = crypto_rfc4309_decrypt;
 
-	inst->alg.cra_aead.geniv = "seqiv";
+	inst->alg.cra_aead.geniv = "ccm";
 
 out:
 	return inst;
diff --git a/crypto/gcm.c b/crypto/gcm.c
index e70afd0..058de64 100644
--- a/crypto/gcm.c
+++ b/crypto/gcm.c
@@ -754,7 +754,7 @@ static struct crypto_instance *crypto_rfc4106_alloc(struct rtattr **tb)
 	inst->alg.cra_aead.encrypt = crypto_rfc4106_encrypt;
 	inst->alg.cra_aead.decrypt = crypto_rfc4106_decrypt;
 
-	inst->alg.cra_aead.geniv = "seqiv";
+	inst->alg.cra_aead.geniv = "gcm";
 
 out:
 	return inst;


-- 
	Evgeniy Polyakov
-
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