aboutsummaryrefslogtreecommitdiff
path: root/crypto/tcrypt.h
diff options
context:
space:
mode:
authorMikko Herranen <mh1@iki.fi>2007-11-26 22:12:07 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2008-01-11 08:16:23 +1100
commite3a4ea4fd2e5f154ae9233f1ce30e7564e5cbcfc (patch)
tree8564aa42c333db6170cdc5dfc93e7a82bc315b27 /crypto/tcrypt.h
parentff85a8082f0665fe6f79d50eb79bdccb98cabfa2 (diff)
[CRYPTO] tcrypt: Add aead support
Add AEAD support to tcrypt, needed by GCM. Signed-off-by: Mikko Herranen <mh1@iki.fi> Reviewed-by: Mika Kukkonen <mika.kukkonen@nsn.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.h')
-rw-r--r--crypto/tcrypt.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
index 6ffc411bf46..865196a648a 100644
--- a/crypto/tcrypt.h
+++ b/crypto/tcrypt.h
@@ -6,12 +6,14 @@
*
* Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
* Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
+ * Copyright (c) 2007 Nokia Siemens Networks
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
+ * 2007-11-13 Added AEAD support
* 2006-12-07 Added SHA384 HMAC and SHA512 HMAC tests
* 2004-08-09 Cipher speed tests by Reyk Floeter <reyk@vantronix.net>
* 2003-09-14 Changes by Kartikey Mahendra Bhatt
@@ -51,6 +53,26 @@ struct cipher_testvec {
unsigned short rlen;
};
+struct aead_testvec {
+ char key[MAX_KEYLEN] __attribute__ ((__aligned__(4)));
+ char iv[MAX_IVLEN];
+ char input[512];
+ char assoc[512];
+ char result[512];
+ char tag[128];
+ unsigned char tap[MAX_TAP];
+ unsigned char atap[MAX_TAP];
+ int np;
+ int anp;
+ unsigned char fail;
+ unsigned char wk; /* weak key flag */
+ unsigned char klen;
+ unsigned short ilen;
+ unsigned short alen;
+ unsigned short rlen;
+ unsigned short tlen;
+};
+
struct cipher_speed {
unsigned char klen;
unsigned int blen;