Re: "crypto_hash_setkey" call from atomic context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 14, 2015 at 09:53:03AM +0100, Fabrizio Demaria wrote:
> In our MPTCP implementation we handled the setkey problem by
> pre-allocating a properly aligned key's buffer right after
> "crypto_alloc_hash", outside atomic context [1]. Would this workaround
> be enough to guarantee that "crypto_hash_setkey" can be safely called
> in atomic contexts? Is it always the case that "crypto_hash_setkey"
> calls "crypto_shash_setkey"?

First of all don't use crypto_hash_* in new code.  It is obsolete.
Instead use shash or ahash as appropirate.

The proper way to manage keys is to set them when you allocate the
tfm.  You should use a different tfm for each key.

Cheers,
-- 
Email: Herbert Xu <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



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux