Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	patches@linaro.org, linville@tuxdriver.com
Subject: Re: [PATCH] mac80211: port CCMP to cryptoapi's CCM driver
Date: Tue, 08 Oct 2013 21:08:36 +0200	[thread overview]
Message-ID: <1381259316.13359.17.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1381231915-24232-1-git-send-email-ard.biesheuvel@linaro.org> (sfid-20131008_133333_304168_2D31449F)

I'm not too familiar with the aead API, so here's another question:

> +	sg_init_one(&pt, data, data_len);
> +	sg_init_one(&assoc, &aad[2], be16_to_cpup((__be16 *)aad));
> +	sg_init_table(ct, 2);
> +	sg_set_buf(&ct[0], cdata, data_len);
> +	sg_set_buf(&ct[1], mic, IEEE80211_CCMP_MIC_LEN);

Is it guaranteed to be allowed that the input and output are the same
buffer? It seems we rely on that for encrypt_one(), but is it true here
as well?

(Btw - why pass in data/cdata as separate pointers into the function?)

> @@ -343,7 +337,7 @@ static void ccmp_special_blocks(struct sk_buff *skb, u8 *pn, u8 *scratch,
>  		data_len -= IEEE80211_CCMP_MIC_LEN;
>  
>  	/* First block, b_0 */
> -	b_0[0] = 0x59; /* flags: Adata: 1, M: 011, L: 001 */
> +	b_0[0] = 0x1; /* set L := 1, M and Adata flags are implied */

Hmm. I don't think I understand, can you explain this to me?

johannes


  parent reply	other threads:[~2013-10-08 19:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08 11:31 [PATCH] mac80211: port CCMP to cryptoapi's CCM driver Ard Biesheuvel
2013-10-08 11:52 ` Johannes Berg
2013-10-08 12:00   ` Ard Biesheuvel
2013-10-08 12:16     ` Johannes Berg
2013-10-08 12:20       ` Ard Biesheuvel
2013-10-08 13:01   ` David Laight
2013-10-08 13:16     ` Ard Biesheuvel
2013-10-08 13:41     ` Ard Biesheuvel
2013-10-08 13:45       ` Johannes Berg
2013-10-08 13:45         ` Johannes Berg
2013-10-08 14:52           ` Ard Biesheuvel
2013-10-08 18:27             ` Johannes Berg
2013-10-08 19:08 ` Johannes Berg [this message]
2013-10-08 20:00   ` Ard Biesheuvel

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=1381259316.13359.17.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ard.biesheuvel@linaro.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=patches@linaro.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