[RFC PATCH 1/3] crypto: add interleave option to cipher_alg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Many ciphers perform better when allowed to operate on data sizes that are
larger than the natural block size of the algorithm.

This patch adds a struct member .cia_interleave which holds the preferred
number of blocks processed in a single invocation. The invocations themselves
should occur through .cia_enc_interleave and .cia_dec_interleave.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>
---
 include/linux/crypto.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index b92eadf92d72..4f09a10a4efa 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -252,6 +252,10 @@ struct cipher_alg {
 	                  unsigned int keylen);
 	void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
 	void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
+
+	unsigned int cia_interleave;
+	void (*cia_enc_interleave)(struct crypto_tfm *tfm, u8 *d, const u8 *s);
+	void (*cia_dec_interleave)(struct crypto_tfm *tfm, u8 *d, const u8 *s);
 };
 
 struct compress_alg {
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux