aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-08-12 07:56:17 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-20 21:41:52 -0400
commit5c64097aa0f6dc4f27718ef47ca9a12538d62860 (patch)
treed8c0cd3358464f589c9f2778b7be348f73db6950 /include
parentf28776a369b12f9a03a822a8e1090ed670a41f4f (diff)
[CRYPTO] scatterwalk: Prepare for block ciphers
This patch prepares the scatterwalk code for use by the new block cipher type. Firstly it halves the size of scatter_walk on 32-bit platforms. This is important as we allocate at least two of these objects on the stack for each block cipher operation. It also exports the symbols since the block cipher code can be built as a module. Finally there is a hack in scatterwalk_unmap that relies on progress being made. Unfortunately, for hardware crypto we can't guarantee progress to be made since the hardware can fail. So this also gets rid of the hack by not advancing the address returned by scatterwalk_map. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include')
-rw-r--r--include/crypto/algapi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 6f9fb27b2071..f21ae672e8a8 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -50,6 +50,11 @@ struct crypto_spawn {
50 struct crypto_instance *inst; 50 struct crypto_instance *inst;
51}; 51};
52 52
53struct scatter_walk {
54 struct scatterlist *sg;
55 unsigned int offset;
56};
57
53int crypto_register_template(struct crypto_template *tmpl); 58int crypto_register_template(struct crypto_template *tmpl);
54void crypto_unregister_template(struct crypto_template *tmpl); 59void crypto_unregister_template(struct crypto_template *tmpl);
55struct crypto_template *crypto_lookup_template(const char *name); 60struct crypto_template *crypto_lookup_template(const char *name);