[llvmlinux] More VLAIS code ...

Jan-Simon Möller dl9pf at gmx.de
Tue Nov 19 19:13:22 UTC 2013


We got his code merged:

commit 7ec7c4a9a686c608315739ab6a2b0527a240883c
Author: Ard Biesheuvel <ard.biesheuvel at linaro.org>
Date:   Thu Oct 10 09:55:20 2013 +0200

    mac80211: port CCMP to cryptoapi's CCM driver
    
    Use the generic CCM aead chaining mode driver rather than a local
    implementation that sits right on top of the core AES cipher.
    
    This allows the use of accelerated implementations of either
    CCM as a whole or the CTR mode which it encapsulates.
    
    Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
    Signed-off-by: Johannes Berg <johannes.berg at intel.com>

diff --git a/net/mac80211/aes_ccm.c b/net/mac80211/aes_ccm.c
index be7614b9..7c7df47 100644
--- a/net/mac80211/aes_ccm.c
+++ b/net/mac80211/aes_ccm.c
@@ -2,6 +2,8 @@
  * Copyright 2003-2004, Instant802 Networks, Inc.
  * Copyright 2005-2006, Devicescape Software, Inc.
  *
+ * Rewrite: Copyright (C) 2013 Linaro Ltd <ard.biesheuvel at linaro.org>
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
@@ -17,134 +19,75 @@
 #include "key.h"
 #include "aes_ccm.h"
 
-static void aes_ccm_prepare(struct crypto_cipher *tfm, u8 *scratch, u8 *a)
+void ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
+                              u8 *data, size_t data_len, u8 *mic)
 {
-       int i;
-       u8 *b_0, *aad, *b, *s_0;
-
-       b_0 = scratch + 3 * AES_BLOCK_SIZE;
-       aad = scratch + 4 * AES_BLOCK_SIZE;
-       b = scratch;
-       s_0 = scratch + AES_BLOCK_SIZE;
-
-       crypto_cipher_encrypt_one(tfm, b, b_0);
+       struct scatterlist assoc, pt, ct[2];
+       struct {
+               struct aead_request     req;
+               u8                      priv[crypto_aead_reqsize(tfm)];
+       } aead_req;


@Renato: can you ping the author and see if we can adapt the code ?

Best,
-- 

Dipl.-Ing.
Jan-Simon Möller

jansimon.moeller at gmx.de


More information about the LLVMLinux mailing list