Skip to content

Commit

Permalink
crypto: cryptomgr - Test ciphers using ECB
Browse files Browse the repository at this point in the history
As it is we only test ciphers when combined with a mode.  That means
users that do not invoke a mode of operations may get an untested
cipher.

This patch tests all ciphers using the ECB mode so that simple cipher
users such as ansi-cprng are also protected.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
herbertx committed Aug 29, 2008
1 parent 73d3864 commit 1aa4ecd
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 50 deletions.
5 changes: 1 addition & 4 deletions crypto/algboss.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,7 @@ static int cryptomgr_test(void *data)
CRYPTO_ALG_TYPE_BLKCIPHER_MASK) && !(type & CRYPTO_ALG_GENIV))
goto skiptest;

if ((type & CRYPTO_ALG_TYPE_MASK) == CRYPTO_ALG_TYPE_CIPHER)
goto skiptest;

err = alg_test(param->driver, param->alg, 0, CRYPTO_ALG_TESTED);
err = alg_test(param->driver, param->alg, type, CRYPTO_ALG_TESTED);

skiptest:
crypto_alg_tested(param->driver, err);
Expand Down
Loading

0 comments on commit 1aa4ecd

Please sign in to comment.