summaryrefslogtreecommitdiffstats
path: root/include/crypto/sha.h
Commit message (Collapse)AuthorAgeFilesLines
* crypto: sha - Fix build error due to crypto_sha1_updateHerbert Xu2011-08-161-0/+2
| | | | | | | | | | | | | | | | | | | | | On Tue, Aug 16, 2011 at 03:22:34PM +1000, Stephen Rothwell wrote: > > After merging the final tree, today's linux-next build (powerpc > allyesconfig) produced this warning: > > In file included from security/integrity/ima/../integrity.h:16:0, > from security/integrity/ima/ima.h:27, > from security/integrity/ima/ima_policy.c:20: > include/crypto/sha.h:86:10: warning: 'struct shash_desc' declared inside parameter list > include/crypto/sha.h:86:10: warning: its scope is only this definition or declaration, which is probably not what you want > > Introduced by commit 7c390170b493 ("crypto: sha1 - export sha1_update for > reuse"). I guess you need to include crypto/hash.h in crypto/sha.h. This patch fixes this by providing a declaration for struct shash_desc. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: sha1 - export sha1_update for reuseMathias Krause2011-08-101-0/+3
| | | | | | | | | | | Export the update function as crypto_sha1_update() to not have the need to reimplement the same algorithm for each SHA-1 implementation. This way the generic SHA-1 implementation can be used as fallback for other implementations that fail to run under certain circumstances, like the need for an FPU context while executing in IRQ context. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: sha512_generic - Use 64-bit countersHerbert Xu2009-07-221-3/+3
| | | | | | | | This patch replaces the 32-bit counters in sha512_generic with 64-bit counters. It also switches the bit count to the simpler byte count. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: sha512 - Export struct sha512_stateHerbert Xu2009-07-221-0/+6
| | | | | | | | This patch renames struct sha512_ctx and exports it as struct sha512_state so that other sha512 implementations can use it as the reference structure for exporting their state. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: sha256_generic - Add export/import supportHerbert Xu2009-07-111-0/+6
| | | | | | | | This patch adds export/import support to sha256_generic. The exported type is defined by struct sha256_state, which is basically the entire descriptor state of sha256_generic. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* crypto: sha1_generic - Add export/import supportHerbert Xu2009-07-111-0/+8
| | | | | | | | This patch adds export/import support to sha1_generic. The exported type is defined by struct sha1_state, which is basically the entire descriptor state of sha1_generic. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* [CRYPTO] sha256-generic: Extend sha256_generic.c to support SHA-224Jonathan Lynch2008-01-111-0/+12
| | | | | | | | | | | | | | | | | Resubmitting this patch which extends sha256_generic.c to support SHA-224 as described in FIPS 180-2 and RFC 3874. HMAC-SHA-224 as described in RFC4231 is then supported through the hmac interface. Patch includes test vectors for SHA-224 and HMAC-SHA-224. SHA-224 chould be chosen as a hash algorithm when 112 bits of security strength is required. Patch generated against the 2.6.24-rc1 kernel and tested against 2.6.24-rc1-git14 which includes fix for scatter gather implementation for HMAC. Signed-off-by: Jonathan Lynch <jonathan.lynch@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* [CRYPTO] sha: Add header file for SHA definitionsJan Glauber2007-10-101-0/+53
There are currently several SHA implementations that all define their own initialization vectors and size values. Since this values are idential move them to a header file under include/crypto. Signed-off-by: Jan Glauber <jang@de.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
OpenPOWER on IntegriCloud