Content-Length: 10451 | pFad | http://lwn.net/Articles/718056/

crypto: hw_random - Add new Exynos RNG driver [LWN.net]
|
|
Subscribe / Log in / New account

crypto: hw_random - Add new Exynos RNG driver

From:  Krzysztof Kozlowski <krzk-AT-kernel.org>
To:  Kukjin Kim <kgene-AT-kernel.org>, Javier Martinez Canillas <javier-AT-osg.samsung.com>, Matt Mackall <mpm-AT-selenic.com>, Herbert Xu <herbert-AT-gondor.apana.org.au>, "David S. Miller" <davem-AT-davemloft.net>, linux-kernel-AT-vger.kernel.org, linux-arm-kernel-AT-lists.infradead.org, linux-samsung-soc-AT-vger.kernel.org, linux-crypto-AT-vger.kernel.org
Subject:  [PATCH 0/3] crypto: hw_random - Add new Exynos RNG driver
Date:  Fri, 24 Mar 2017 17:24:43 +0300
Message-ID:  <20170324142446.31129-1-krzk@kernel.org>
Cc:  Arnd Bergmann <arnd-AT-arndb.de>, Olof Johansson <olof-AT-lixom.net>, Krzysztof Kozlowski <krzk-AT-kernel.org>

Hi,

This is a follow up of my questions around exynos-rng [1].

The existing exynos-rng has many issues.  The most important one is that
it is a pseudo RNG device but uses hw_random interface which does not allow
proper seeding.

The RNG module on Exynos4 requires seeding.  On newer SoCs (like Exynos5420)
it can seed itself from a true RNG.  Converting the existing driver
to use TRNG would effectively drop support for Exynos4 and break
compatibility with existing users.

Instead I decided to convert it to crypto API.  In the future I hope
to add support for seeding from TRNG module.

Tested with app [2].

Patches are independent. I will take the defconfig changes (2/3 and 3/3)
through samsung-soc tree.

Best regards,
Krzysztof

[1] https://www.spinics.net/lists/arm-kernel/msg569641.html
[2] https://www.spinics.net/lists/arm-kernel/msg571184.html

Krzysztof Kozlowski (3):
  crypto: hw_random - Add new Exynos RNG driver
  ARM: exynos_defconfig: Enable Exynos RNG and user-space crypto API
  ARM: multi_v7_defconfig: Enable Exynos RNG and user-space crypto API

 MAINTAINERS                         |   8 +
 arch/arm/configs/exynos_defconfig   |   6 +
 arch/arm/configs/multi_v7_defconfig |   6 +
 drivers/char/hw_random/Kconfig      |  14 --
 drivers/char/hw_random/Makefile     |   1 -
 drivers/char/hw_random/exynos-rng.c | 231 ---------------------------
 drivers/crypto/Kconfig              |  15 ++
 drivers/crypto/Makefile             |   1 +
 drivers/crypto/exynos-rng.c         | 306 ++++++++++++++++++++++++++++++++++++
 9 files changed, 342 insertions(+), 246 deletions(-)
 delete mode 100644 drivers/char/hw_random/exynos-rng.c
 create mode 100644 drivers/crypto/exynos-rng.c

-- 
2.9.3



Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://lwn.net/Articles/718056/

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy