diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2008-08-31 01:47:27 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-12-24 19:01:26 -0500 |
commit | 7b5a080b3c46f0cac71c0d0262634c6517d4ee4f (patch) | |
tree | 41ba9e7051d1ecd47eb5cd371209229db3202ab6 /include/linux/crypto.h | |
parent | 7b0bac64cd5b74d6f1147524c26216de13a501fd (diff) |
crypto: hash - Add shash interface
The shash interface replaces the current synchronous hash interface.
It improves over hash in two ways. Firstly shash is reentrant,
meaning that the same tfm may be used by two threads simultaneously
as all hashing state is stored in a local descriptor.
The other enhancement is that shash no longer takes scatter list
entries. This is because shash is specifically designed for
synchronous algorithms and as such scatter lists are unnecessary.
All existing hash users will be converted to shash once the
algorithms have been completely converted.
There is also a new finup function that combines update with final.
This will be extended to ahash once the algorithm conversion is
done.
This is also the first time that an algorithm type has their own
registration function. Existing algorithm types will be converted
to this way in due course.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/crypto.h')
-rw-r--r-- | include/linux/crypto.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index ffaaa418cf59..ee95c748695c 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #define CRYPTO_ALG_TYPE_HASH 0x00000009 | 39 | #define CRYPTO_ALG_TYPE_HASH 0x00000009 |
40 | #define CRYPTO_ALG_TYPE_AHASH 0x0000000a | 40 | #define CRYPTO_ALG_TYPE_AHASH 0x0000000a |
41 | #define CRYPTO_ALG_TYPE_RNG 0x0000000c | 41 | #define CRYPTO_ALG_TYPE_RNG 0x0000000c |
42 | #define CRYPTO_ALG_TYPE_SHASH 0x0000000d | ||
42 | 43 | ||
43 | #define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e | 44 | #define CRYPTO_ALG_TYPE_HASH_MASK 0x0000000e |
44 | #define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000c | 45 | #define CRYPTO_ALG_TYPE_AHASH_MASK 0x0000000c |