On Fri, Oct 19, 2007 at 12:03:52PM +0200, Sebastian Siewior wrote: > From: Sebastian Siewior <sebastian@xxxxxxxxxxxxx> > > The Geode AES crypto engine supports only 128 bit long key. This > patch adds fallback for other key sizes which are required by the > AES standard. > > Signed-off-by: Sebastian Siewior <sebastian@xxxxxxxxxxxxx> Thanks for working on this! > + if (type == CRYPTO_ALG_TYPE_BLKCIPHER) { > + op->fallback.blk = crypto_alloc_blkcipher(name, 0, > + CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK); > + > + } else if (type == CRYPTO_ALG_TYPE_CIPHER) { > + op->fallback.cip = crypto_alloc_cipher(name, 0, > + CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK); > + } else { > + printk(KERN_ERR "%s is neither a cipher nor a block cipher: %x\n", > + name, type); > + return -EINVAL; > + } This looks really icky though. Couldn't we just have different functions for each case (blkcipher vs. cipher)? > static struct crypto_alg geode_ecb_alg = { > .cra_name = "ecb(aes)", > - .cra_driver_name = "ecb-aes-geode-128", > - .cra_priority = 400, > - .cra_flags = CRYPTO_ALG_TYPE_BLKCIPHER, > + .cra_driver_name = "ecb-aes-geode", > + .cra_priority = 300, What's with the priority decrease? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html