Denis B <begun.de...@gmail.com> wrote:
> My algs struct now looks like this:
> 
> static struct crypto_alg pp_crypto_algs[] = {
>   {
>      .cra_name = "authenc(hmac(sha256),cbc(aes))",
>      .cra_driver_name = "pp_crypto_cbc_hmac_sha256",
>      .cra_priority = 1, /**TODO set to highest values after
> implementing encrypt decrypt functions */
>      .cra_flags = CRYPTO_ALG_TYPE_AEAD | CRYPTO_ALG_ASYNC,
>      .cra_blocksize = AES_BLOCK_SIZE,
>      .cra_ctxsize = sizeof(struct pp_crypto_aead_ctx),
>      .cra_type = &crypto_nivaead_type,
>      .cra_u = {
>            .aead = {
>                .setkey = pp_crypto_aead_setkey,
>                .setauthsize = pp_crypto_aead_setauthsize,
>                .decrypt = pp_crypto_aead_dec,
>                .encrypt = pp_crypto_aead_enc,
>                .givencrypt = NULL,
>                .givdecrypt = NULL,
>                .ivsize = AES_BLOCK_SIZE,
>                .maxauthsize = SHA256_DIGEST_SIZE,

You also need to set geniv to "eseqiv".

Cheers,
-- 
Email: Herbert Xu <herb...@gondor.apana.org.au>
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to