Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Todor Colov <todorcolov@gmail.com>
To: linux-crypto@vger.kernel.org
Subject: Re: IV is not send by kernel (ESP packet)
Date: Tue, 3 Jun 2014 06:23:09 +0000 (UTC)	[thread overview]
Message-ID: <loom.20140603T081949-176@post.gmane.org> (raw)
In-Reply-To: 51ADDD52.8010404@wasko.pl

Hi Grzegorz,







IV generator "eseqiv" adds one block more with "seq of SA" to the "src" 

packet which is being encrypted with "IV salt" and send as IV.



Change your default IV generation method to "chainiv" and you'll solve the 



issue.Proposed patch is something like:







--- linux-3.14.4/crypto/cbc.c   2014-05-13 14:33:14.000000000 +0300







+++ linux-3.14.4-mod/crypto/cbc.c       2014-06-01 09:26:18.311525275 +0300







@@ -255,6 +255,7 @@







        inst->alg.cra_blkcipher.setkey = crypto_cbc_setkey;







         inst->alg.cra_blkcipher.encrypt = crypto_cbc_encrypt;







        inst->alg.cra_blkcipher.decrypt = crypto_cbc_decrypt;







+       inst->alg.cra_blkcipher.geniv = "chainiv";















 out_put_alg:







         crypto_mod_put(alg);















Regads,



Todor

      reply	other threads:[~2014-06-03  6:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04 12:28 IV is not send by kernel (ESP packet) Grzegorz Głowacki
2014-06-03  6:23 ` Todor Colov [this message]

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=loom.20140603T081949-176@post.gmane.org \
    --to=todorcolov@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox