summaryrefslogtreecommitdiff
path: root/include/linux/crypto.h
AgeCommit message (Collapse)Author
2006-01-09[CRYPTO] Allow multiple implementations of the same algorithmHerbert Xu
This is the first step on the road towards asynchronous support in the Crypto API. It adds support for having multiple crypto_alg objects for the same algorithm registered in the system. For example, each device driver would register a crypto_alg object for each algorithm that it supports. While at the same time the user may load software implementations of those same algorithms. Users of the Crypto API may then select a specific implementation by name, or choose any implementation for a given algorithm with the highest priority. The priority field is a 32-bit signed integer. In future it will be possible to modify it from user-space. This also provides a solution to the problem of selecting amongst various AES implementations, that is, aes vs. aes-i586 vs. aes-padlock. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2005-09-01[CRYPTO]: Added CRYPTO_TFM_REQ_MAY_SLEEP flagHerbert Xu
The crypto layer currently uses in_atomic() to determine whether it is allowed to sleep. This is incorrect since spin locks don't always cause in_atomic() to return true. Instead of that, this patch returns to an earlier idea of a per-tfm flag which determines whether sleeping is allowed. Unlike the earlier version, the default is to not allow sleeping. This ensures that no existing code can break. As usual, this flag may either be set through crypto_alloc_tfm(), or just before a specific crypto operation. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-06[CRYPTO] Ensure cit_iv is aligned correctlyHerbert Xu
This patch ensures that cit_iv is aligned according to cra_alignmask by allocating it as part of the tfm structure. As a side effect the crypto layer will also guarantee that the tfm ctx area has enough space to be aligned by cra_alignmask. This allows us to remove the extra space reservation from the Padlock driver. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-06[CRYPTO] Add alignmask for low-level cipher implementationsHerbert Xu
The VIA Padlock device requires the input and output buffers to be aligned on 16-byte boundaries. This patch adds the alignmask attribute for low-level cipher implementations to indicate their alignment requirements. The mid-level crypt() function will copy the input/output buffers if they are not aligned correctly before they are passed to the low-level implementation. Strictly speaking, some of the software implementations require the buffers to be aligned on 4-byte boundaries as they do 32-bit loads. However, it is not clear whether it is better to copy the buffers or pay the penalty for unaligned loads/stores. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-06[CRYPTO] Add support for low-level multi-block operationsHerbert Xu
This patch adds hooks for cipher algorithms to implement multi-block ECB/CBC operations directly. This is expected to provide significant performance boots to the VIA Padlock. It could also be used for improving software implementations such as AES where operating on multiple blocks at a time may enable certain optimisations. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-01-25[XFRM]: Probe selected algorithm only.Herbert Xu
This patch removes an annoying problem in xfrm_user. As it is every time an SA is added it probes every known algorithm in the universe. Now if they all existed it would be OK. However, for the ones which don't actually exist this causes multiple /sbin/modprobe processes to be spawned which slows the system down when you're adding hundreds of SAs. Since we know the type of algorithm required when we're adding a new SA, we can get away with only probing the selected algorithms. This is what the following patch does for xfrm_user. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: James Morris <jmorris@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2004-11-30[CRYPTO]: Standalone VIA PadLock driver.Michal Ludvig
Signed-off-by: David S. Miller <davem@davemloft.net>
2004-03-21[CRYPTO]: Add setkey operation for digests.James Morris
From Jouni Malinen <jkmaline@cc.hut.fi> Added support for using keyed digest with an optional dit_setkey handler. This does not change the behavior of the existing digest algorithms, but allows new ones to add setkey handler that can be used to initialize the algorithm with a key or seed. setkey is to be called after init, but before any of the update call(s).
2003-08-17[IPSEC]: Fix oops using null ciper in CBC mode.Mikael Ylikoski
2003-03-28[CRYPTO]: Add Deflate algorithm to crypto API.James Morris
2003-03-07[CRYPTO]: Eliminate crypto_tfm.crt_ctx, from Adam Richter.James Morris
2003-03-07[CRYPTO]: Add encrypt_iv() and decrypt_iv() methods.James Morris
2003-02-02[CRYPTO]: in/out scatterlist support for ciphers.James Morris
- Merge scatterwalk patch from Adam J. Richter <adam@yggdrasil.com> API change: cipher methods now take in/out scatterlists and nbytes params. - Merge gss_krb5_crypto update from Adam J. Richter <adam@yggdrasil.com> - Add KM_SOFTIRQn (instead of KM_CRYPTO_IN etc). - Add asm/kmap_types.h to crypto/internal.h - Update cipher.c credits. - Update cipher.c documentation.
2002-12-07[CRYPTO]: Simplify crypto memory allocation.Adam J. Richter
2002-11-25[CRYPTO]: Add twofish algorithm.James Morris
2002-11-18[CRYPTO]: Add null algorithms and minor cleanups.James Morris
2002-11-17[CRYPTO]: Fix non-modular build.James Morris
2002-11-14[CRYPTO] kstack cleanup (v0.28)James Morris
2002-11-06[CRYPTO]: Add blowfish algorithm.James Morris
2002-11-04[IPSEC/CRYPTO]: Allocate work buffers instead of using kstack.David S. Miller
2002-11-03[CRYPTO]: Include kernel.h in crypto.hDavid S. Miller
2002-11-03[CRYPTO]: Rework HMAC interface.James Morris
2002-11-01[CRYPTO]: Add crypto_alg_available interface.James Morris
2002-10-29[CRYPTO]: Cleanups based upon suggestions by Jeff Garzik.James Morris
- Changed unsigned to unsigned int in algos. - Consistent use of u32 for flags throughout api. - Use of unsigned int rather than int for counting things which must be positive, also replaced size_ts to keep code simpler and lessen bloat on some archs. - got rid of some unneeded returns. - const correctness.
2002-10-28include/linux/crypto.h: Include linux/string.hDavid S. Miller
2002-10-28[CRYPTO]: Build/warning fixups.David S. Miller
2002-10-28[CRYPTO]: Update to IV get/set interface.James Morris
2002-10-28[CRYPTO]: Cleanups and more consistency checks.James Morris
- Removed local_bh_disable() from kmap wrapper, not needed now with two atomic kmaps. - Nuked atomic flag, use in_softirq() instead. - Converted crypto_kmap() and crypto_yield() to check in_softirq(). - Check CRYPTO_MAX_CIPHER_BLOCK_SIZE during alg init. - Try to initialize as much at compile time as possible (feedback from Christoph Hellwig). - Clean up list handling a bit (feedback from Christoph Hellwig).
2002-10-27[CRYPTO]: Assert that interfaces are called on correct cipher type.James Morris
2002-10-27[CRYPTO]: Run tcrypt through lindent, plus doc update.James Morris
2002-10-27[CRYPTO]: Algorithm lookup API change plus bug fixes.James Morris
- API change: implemented simplest version of algorithm lookup by name (feedback from Rusty Russell and Herbert Valerio Riedel). - Now need to add the following line to to /etc/modules.conf for dynamic module loading: alias des3_ede des
2002-10-26[CRYPTO]: Add MD4.James Morris
2002-10-24[CRYPTO]: Use kmod to try to autoload modules.James Morris
2002-10-24[CRYPTO]: Use try_inc_mod_count and semaphore for alg list.James Morris
2002-10-24[CRYPTO]: Cleanups based upon feedback from Rusty and jgarzikJames Morris
- s/__u/u/ - s/char/u8/ - Fixed bug in cipher.c, page remapped was off by one block
2002-10-23[CRYPTO]: Add in 3des implementation.James Morris
2002-10-23[CRYPTO]: Add initial crypto api subsystem.James Morris