crypto: tegra - use kernel entropy instead of ad-hoc
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 9 Sep 2013 07:35:54 +0000 (09:35 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 Sep 2013 11:43:53 +0000 (21:43 +1000)
commitf5b38c5f19b1dafb413c6581cd4a0d84d3b6512f
tree6ed73974a4a8cec70834be01514c8af2852dfaf4
parenta44bc80e66b4014e462cb8be9d354a7bc4723b7e
crypto: tegra - use kernel entropy instead of ad-hoc

The way I read the Tegra AES RNG is that it has a homebrew
algorithm for initializing the 128bit RNG using timespec and
the unique chip ID. This looks like reinventing the (square)
wheel, instead just grab 128bits from the kernel entropy pool
where the time and (after another patch) chip unique ID is
already mixed in.

Incidentally this also gets rid of a rather ugly
cross-dependence on the machine using an extern declaration.

Cc: Varun Wadekar <vwadekar@nvidia.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/tegra-aes.c