Hi:
This series of patches converts ahash to the new algorithm format
just like shash. Note that I've incorporated a couple of the
previously posted patches (notably the padlock/hmac conversion)
into it.
At this point all implementations are either shash or ahash. So
we can now move forward to
crypto: shash - Export/import hash state only
This patch replaces the full descriptor export with an export of
the partial hash state. This allows the use of a consistent export
format across all implementations of a given algorithm.
This is useful because a number of cases require the use of
crypto: shash - Move finup/digest null checks to registration time
This patch moves the run-time null finup/digest checks to the
shash_prepare_alg function which is run at registration time.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/shash.c | 10 ++
1 file
crypto: sha256_generic - Use 64-bit counter like sha1
This patch replaces the two 32-bit counter code in sha256_generic
with the simpler 64-bit counter code from sha1.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/sha256_generic.c | 65
crypto: sha256-s390 - Add export/import support
This patch adds export/import support to sha256-s390. The exported
type is defined by struct sha256_state, which is basically the entire
descriptor state of sha256_generic.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto: padlock - Use shash fallback for sha
This patch changes padlock sha fallback to shash instead of hash.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
drivers/crypto/padlock-sha.c | 82 +++
1 file changed, 52 insertions(+), 30
crypto: async - Use kzfree for requests
This patch changes the kfree call to kzfree for async requests.
As the request may contain sensitive data it needs to be zeroed
before it can be reallocated by others.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
include/crypto/hash.h |
crypto: shash - Make descsize a run-time attribute
This patch changes descsize to a run-time attribute so that
implementations can change it in their init functions.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/shash.c | 39
crypto: hmac - Switch to shash
This patch changes hmac to the new shash interface.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/hmac.c | 271 --
1 file changed, 114 insertions(+), 157 deletions(-)
diff --git
crypto: xcbc - Switch to shash
This patch converts the xcbc algorithm to the new shash type.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/xcbc.c | 235 +-
1 file changed, 87 insertions(+), 148 deletions(-)
diff --git
crypto: authenc - Remove reference to crypto_hash
Now that there are no more legacy hash implementations we can
remove the reference to crypto_hash.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/authenc.c |6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff
crypto: shash - Export async functions
This patch exports the async functions so that they can be reused
by cryptd when it switches over to using shash.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/shash.c | 42 +
crypto: cryptd - Use shash algorithms
This patch changes cryptd to use shash algorithms instead of the
legacy hash interface.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/cryptd.c | 164
1 file changed, 84
crypto: cryptd - Use crypto_ahash_set_reqsize
This patch makes cryptd use crypto_ahash_set_reqsize to avoid
accessing crypto_ahash directly.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/cryptd.c |5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
crypto: crypto4xx - Use crypto_ahash_set_reqsize
This patch makes crypto4xx use crypto_ahash_set_reqsize to avoid
accessing crypto_ahash directly.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
drivers/crypto/amcc/crypto4xx_alg.c |3 ++-
drivers/crypto/amcc/crypto4xx_core.c |
crypto: api - Remove frontend argument from extsize/init_tfm
As the extsize and init_tfm functions belong to the frontend the
frontend argument is superfluous.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/api.c|4 ++--
crypto/pcompress.c |6 ++
crypto: ahash - Convert to new style algorithms
This patch converts crypto_ahash to the new style. The old ahash
algorithm type is retained until the existing ahash implementations
are also converted. All ahash users will automatically get the
new crypto_ahash type.
Signed-off-by: Herbert Xu
crypto: ahash - Add instance/spawn support
This patch adds support for creating ahash instances and using
ahash as spawns.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/ahash.c | 72 +
include/crypto/internal/hash.h |
crypto: hash - Add helpers to free spawns
This patch adds the helpers crypto_drop_ahash and crypto_drop_shash
so that these spawns can be dropped without ugly casts.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
include/crypto/internal/hash.h | 10 ++
1 file changed, 10
crypto: cryptd - Switch to new style ahash
This patch changes cryptd to use the new style ahash type. In
particular, the instance is enlarged to encapsulate the new
ahash_alg structure.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/cryptd.c | 64
crypto: cryptd - Switch to template create API
This patch changes cryptd to use the template-create function
instead of alloc in anticipation for the switch to new style
ahash algorithms.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/cryptd.c | 53
crypto: ahash - Use GFP_KERNEL in unaligned setkey
We currently use GFP_ATOMIC in the unaligned setkey function
to allocate the temporary aligned buffer. Since setkey must
be called in a sleepable context, we can use GFP_KERNEL instead.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto: hash - Zap unaligned buffers
Some unaligned buffers on the stack weren't zapped properly which
may cause secret data to be leaked. This patch fixes them by doing
a zero memset.
It is also possible for us to place random kernel stack contents
in the digest buffer if a digest operation
crypto: crypto4xx - Disable SHA implementation
The crypto4xx SHA implementation keeps the hash state in the tfm
data structure. This breaks a fundamental requirement of ahash
implementations that they must be reentrant.
This patch disables the broken implementation.
Signed-off-by: Herbert Xu
crypto: ahash - Remove old_ahash_alg
Now that all ahash implementations have been converted to the new
ahash type, we can remove old_ahash_alg and its associated support.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto/ahash.c | 27 ---
crypto: shash - Fix alignment in unaligned operations
When we encounter an unaligned pointer we are supposed to copy
it to a temporary aligned location. However the temporary buffer
isn't aligned properly. This patch fixes that.
Signed-off-by: Herbert Xu herb...@gondor.apana.org.au
---
crypto: ahash - Add unaligned handling and default operations
This patch exports the finup operation where available and adds
a default finup operation for ahash. The operations final, finup
and digest also will now deal with unaligned result pointers by
copying it. Finally export/import
crypto: crypto4xx - Switch to new style ahash
This patch changes crypto4xx to use the new style ahash type.
In particular, we now use ahash_alg to define ahash algorithms
instead of crypto_alg.
This is achieved by introducing a union that encapsulates the
new type and the existing crypto_alg
On Wed, Jul 15, 2009 at 03:16:21PM +0800, Herbert Xu wrote:
crypto: cryptd - Switch to template create API
This patch changes cryptd to use the template-create function
instead of alloc in anticipation for the switch to new style
ahash algorithms.
Signed-off-by: Herbert Xu
If cryptd_alloc_instance() fails, the return value is uninitialized.
This patch fixes this by setting the return value.
Signed-off-by: Steffen Klassert steffen.klass...@secunet.com
---
crypto/cryptd.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/crypto/cryptd.c
On Wed, Jul 15, 2009 at 10:47:23AM +0200, Steffen Klassert wrote:
This introduces an uninitialized return value warning. err is not initialized
if cryptd_alloc_instance() fails.
Good catch!
Same here.
I'll send a patch to fix it.
Thanks.
--
Visit Openswan at http://www.openswan.org/
On Wed, Jul 15, 2009 at 10:50:09AM +0200, Steffen Klassert wrote:
If cryptd_alloc_instance() fails, the return value is uninitialized.
This patch fixes this by setting the return value.
Signed-off-by: Steffen Klassert steffen.klass...@secunet.com
Patch applied. Thanks Steffen!
--
Visit
On Wed, Jul 15, 2009 at 10:50:09AM +0200, Steffen Klassert wrote:
If cryptd_alloc_instance() fails, the return value is uninitialized.
This patch fixes this by setting the return value.
Signed-off-by: Steffen Klassert steffen.klass...@secunet.com
Just found two similar bugs in xcbc and hmac.
On Wed, Jul 15, 2009 at 03:16:05PM +0800, Herbert Xu wrote:
crypto: padlock - Switch sha to shash
This patch converts the padlock-sha implementation to shash.
In doing so the existing mechanism of storing the data until
final is no longer viable as we do not have a way of allocating
data in
On Wed, Jul 15, 2009 at 12:28:18PM +0200, Steffen Klassert wrote:
Just FYI, I'm getting the following compiler error:
Is this 32-bit or 64-bit?
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} herb...@gondor.apana.org.au
Home Page:
On Wed, Jul 15, 2009 at 06:30:25PM +0800, Herbert Xu wrote:
On Wed, Jul 15, 2009 at 12:28:18PM +0200, Steffen Klassert wrote:
Just FYI, I'm getting the following compiler error:
Is this 32-bit or 64-bit?
It's 32-bit.
One of my test systems had padlock enabled by chance.
--
To
On Wed, Jul 15, 2009 at 12:36:46PM +0200, Steffen Klassert wrote:
It's 32-bit.
One of my test systems had padlock enabled by chance.
This should fix it.
commit faae890883624e14a328863eafabf54a36698774
Author: Herbert Xu herb...@gondor.apana.org.au
Date: Wed Jul 15 18:37:48 2009 +0800
Hi:
This patch fixes a crash caused by the new ahash code and hmac.
commit a70c522520d967844c01fa01459edc698fc54544
Author: Herbert Xu herb...@gondor.apana.org.au
Date: Wed Jul 15 20:39:05 2009 +0800
crypto: ahash - Fix setkey crash
When the alignment check was made unconditional
Hi:
This one fixes failures when using shash algorithms through
ahash.
commit fa64966473830219fe74952029ddb0e981a87749
Author: Herbert Xu herb...@gondor.apana.org.au
Date: Wed Jul 15 21:16:05 2009 +0800
crypto: shash - Fix digest size offset
When an shash algorithm is exported as
Hi:
commit cbc86b9161b40f95caee0e56381b68956fc28cc4
Author: Herbert Xu herb...@gondor.apana.org.au
Date: Wed Jul 15 21:26:41 2009 +0800
crypto: shash - Fix async finup handling of null digest
When shash_ahash_finup encounters a null request, we end up not
calling the
* Herbert Xu | 2009-07-15 08:48:47 [+0800]:
Yes, that should be enough. You don't even ipsec-tools, just
a manual SA setup with ip xfrm should be good enough.
I did not get that far:
|alg: hash: Chunking test 1 failed for sha1-padlock
|: e9 95 22 0c 1b d1 0f 5f f1 fa ee 74 7d 27 cd b2
On Thu, Jul 16, 2009 at 10:16:01AM +0800, Herbert Xu wrote:
Can you please pull my tree again? There were quite a few bugs
that I fixed last night.
Oh and please make sure you have this patch applied too:
commit e9b25f16cda88b33fe15b30c009912e6c471edda
Author: Herbert Xu
42 matches
Mail list logo