Linux cryptographic layer development
 help / color / mirror / Atom feed
* Question on __crypto_alg_lookup
@ 2012-01-27 22:23 Mark Allyn
  2012-01-27 22:51 ` Mark Allyn
  2012-02-01 21:16 ` Herbert Xu
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Allyn @ 2012-01-27 22:23 UTC (permalink / raw)
  To: linux-crypto


Folks:

In __crypto_alg_lookup, at about line 85 of api.c, there is the following:

                 if ((q->cra_flags ^ type) & mask)
                         continue;

There is no commenting on this at all.

Can someone please explain what this is for and just what is this trying
to filter?

I am trying to get dm-crypt to work with a ahash device that we have.

The dm-crypt is calling crypto_alloc_hash with "sha256" type 0, and 
mask 0x 80

My driver is setting these flags:

                 .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
                                                 CRYPTO_ALG_ASYNC,

The search seems to be failing at the above sequence in 
__crypto_alg_lookup.

Is dm-crypt supposed to work with ahash?

The Documentation/crypto does not seem to include much information
on using the ahash and ablkcipher infrastructure.

There is one document called async-tx-api.txt that seems to have no
correlation with the ahash or ablkcipher stuff. Is it still valid?

Is there another place I can look for decent documentation?

Thank you

Truly,

Mark Allyn
Portland, Oregon
www.allyn.com
971-563-7588

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question on __crypto_alg_lookup
  2012-01-27 22:23 Question on __crypto_alg_lookup Mark Allyn
@ 2012-01-27 22:51 ` Mark Allyn
  2012-02-01 21:16 ` Herbert Xu
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Allyn @ 2012-01-27 22:51 UTC (permalink / raw)
  To: linux-crypto


Here is a related questions that might help me . . .

Do any of you know of a ahash and ablkcipher driver that is known to have 
worked with dm-crypt? I would like to look at that code.

The drivers that I have look at so far seem to set the cra_flags the same 
as I have; I want to know if there is a driver that is known to have 
worked and look at it's cra_flags settings.

Thank you

Truly,

Mark Allyn
Portland, Oregon
www.allyn.com
971-563-7588

On Fri, 27 Jan 2012, Mark Allyn wrote:

>
> Folks:
>
> In __crypto_alg_lookup, at about line 85 of api.c, there is the following:
>
>                 if ((q->cra_flags ^ type) & mask)
>                         continue;
>
> There is no commenting on this at all.
>
> Can someone please explain what this is for and just what is this trying
> to filter?
>
> I am trying to get dm-crypt to work with a ahash device that we have.
>
> The dm-crypt is calling crypto_alloc_hash with "sha256" type 0, and mask 0x 
> 80
>
> My driver is setting these flags:
>
>                 .cra_flags              = CRYPTO_ALG_TYPE_AHASH |
>                                                 CRYPTO_ALG_ASYNC,
>
> The search seems to be failing at the above sequence in __crypto_alg_lookup.
>
> Is dm-crypt supposed to work with ahash?
>
> The Documentation/crypto does not seem to include much information
> on using the ahash and ablkcipher infrastructure.
>
> There is one document called async-tx-api.txt that seems to have no
> correlation with the ahash or ablkcipher stuff. Is it still valid?
>
> Is there another place I can look for decent documentation?
>
> Thank you
>
> Truly,
>
> Mark Allyn
> Portland, Oregon
> www.allyn.com
> 971-563-7588
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question on __crypto_alg_lookup
  2012-01-27 22:23 Question on __crypto_alg_lookup Mark Allyn
  2012-01-27 22:51 ` Mark Allyn
@ 2012-02-01 21:16 ` Herbert Xu
  2012-02-02  5:15   ` Mark Allyn
  1 sibling, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2012-02-01 21:16 UTC (permalink / raw)
  To: Mark Allyn; +Cc: linux-crypto

Mark Allyn <allyn@well.com> wrote:
>
> Is dm-crypt supposed to work with ahash?

Since it uses the shash interface, no.

Someone will need to convert it over to ahash first, like what
we have done for IPsec.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Question on __crypto_alg_lookup
  2012-02-01 21:16 ` Herbert Xu
@ 2012-02-02  5:15   ` Mark Allyn
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Allyn @ 2012-02-02  5:15 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto


Thanks.

Truly,

Mark Allyn
Portland, Oregon
www.allyn.com
971-563-7588

On Thu, 2 Feb 2012, Herbert Xu wrote:

> Mark Allyn <allyn@well.com> wrote:
>>
>> Is dm-crypt supposed to work with ahash?
>
> Since it uses the shash interface, no.
>
> Someone will need to convert it over to ahash first, like what
> we have done for IPsec.
>
> Cheers,
> -- 
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-02  5:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-27 22:23 Question on __crypto_alg_lookup Mark Allyn
2012-01-27 22:51 ` Mark Allyn
2012-02-01 21:16 ` Herbert Xu
2012-02-02  5:15   ` Mark Allyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox