On Mon, Feb 01, 2010 at 11:32:27AM +0100, Max Vozeler wrote: > > I'm wondering if I'm heading in the right direction since > this is stretching my understanding of the API: > > Would it look something like ccm, in that Not quite. > alloc does > - crypto_grab_skcipher(spawn, "cbc(aes)" > - crypto_skcipher_spawn_alg() > > then my alg.cra_init does > - crypto_spawn_skcipher ? The skcipher interface is synchronous only. It's OK for CCM and GCM as we don't currently have an async CTR implementation. For CBC however you really need the ablkcipher interface so that all hardware implementations are available, notably the Intel AES implementation is only available through the async interface. The authenc/chainiv/seqiv drivers should serve as an example as to how the ablkcipher interface can be used. The other place where it differs from ccm is that ccm is an AEAD algorithm, thus presenting itself through the crypto_aead interface. You will on the other hand present an ablkcipher interface. 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