From 3631c650c495d61b1dabf32eb26b46873636e918 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Thu, 13 Dec 2007 22:28:59 +0800 Subject: [CRYPTO] null: Add null blkcipher algorithm This patch adds a null blkcipher algorithm called ecb(cipher_null) for backwards compatibility. Previously the null algorithm when used by IPsec copied the data byte by byte. This new algorithm optimises that to a straight memcpy which lets us better measure inherent overheads in our IPsec code. Signed-off-by: Herbert Xu --- include/crypto/internal/skcipher.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/crypto') diff --git a/include/crypto/internal/skcipher.h b/include/crypto/internal/skcipher.h index 2071999d4b5e..0053f34764ff 100644 --- a/include/crypto/internal/skcipher.h +++ b/include/crypto/internal/skcipher.h @@ -88,5 +88,10 @@ static inline void skcipher_givcrypt_complete( ablkcipher_request_complete(&req->creq, err); } +static inline u32 ablkcipher_request_flags(struct ablkcipher_request *req) +{ + return req->base.flags; +} + #endif /* _CRYPTO_INTERNAL_SKCIPHER_H */ -- cgit v1.2.3