diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-12-17 08:34:32 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-01-10 16:16:41 -0500 |
commit | 5311f248b7764ba8b59e6d477355f766e5609686 (patch) | |
tree | 228910c68fc3d29a6bfe82cccfdc042e4003ebd2 /include/crypto/ctr.h | |
parent | 653ebd9c8510a7d647ed23e66e1338f848ebdbab (diff) |
[CRYPTO] ctr: Refactor into ctr and rfc3686
As discussed previously, this patch moves the basic CTR functionality
into a chainable algorithm called ctr. The IPsec-specific variant of
it is now placed on top with the name rfc3686.
So ctr(aes) gives a chainable cipher with IV size 16 while the IPsec
variant will be called rfc3686(ctr(aes)). This patch also adjusts
gcm accordingly.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/ctr.h')
-rw-r--r-- | include/crypto/ctr.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/crypto/ctr.h b/include/crypto/ctr.h new file mode 100644 index 000000000000..4180fc080e3b --- /dev/null +++ b/include/crypto/ctr.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * CTR: Counter mode | ||
3 | * | ||
4 | * Copyright (c) 2007 Herbert Xu <herbert@gondor.apana.org.au> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the Free | ||
8 | * Software Foundation; either version 2 of the License, or (at your option) | ||
9 | * any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef _CRYPTO_CTR_H | ||
14 | #define _CRYPTO_CTR_H | ||
15 | |||
16 | #define CTR_RFC3686_NONCE_SIZE 4 | ||
17 | #define CTR_RFC3686_IV_SIZE 8 | ||
18 | #define CTR_RFC3686_BLOCK_SIZE 16 | ||
19 | |||
20 | #endif /* _CRYPTO_CTR_H */ | ||