Skip to contentSkip to conversation

package/rng-tools: add nistbeacon option

PATCH New Fabrice Fontaine 3 participants 3 messages Apr 4, 2020 – Apr 7, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/rng-tools: add nistbeacon option

Add an option to enable nistbeacon which is available since version 6.1 and
https://github.com/nhorman/rng-tools/commit/aefe862e187a1ef608f9826b2b4a5bbabd5e9945

---
 package/rng-tools/Config.in    | 17 +++++++++++++++++
 package/rng-tools/rng-tools.mk | 11 ++++++++---
 2 files changed, 25 insertions(+), 3 deletions(-)
package/rng-tools/Config.in +17 -0
index a86fbb0f74..25b41f40d6 100644
@@ -11,5 +11,22 @@ config BR2_PACKAGE_RNG_TOOLS
 
 	  http://sourceforge.net/projects/gkernel/
 
+if BR2_PACKAGE_RNG_TOOLS
+
+config BR2_PACKAGE_RNG_TOOLS_NISTBEACON
+	bool "NIST Entropy Beacon support"
+	select BR2_PACKAGE_JANSSON
+	select BR2_PACKAGE_LIBCURL
+	select BR2_PACKAGE_LIBXML2
+	help
+	  Enable NIST Entropy Beacon support.
+
+	  Entropy gathered from the NIST network entropy beacon. Note
+	  that this entropy source is disabled by default as it should
+	  never be used for cryptographic purposes, or any use case in
+	  which random data should be known only by a single entity.
+
+endif
+
 comment "rng-tools needs a toolchain w/ NPTL"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
package/rng-tools/rng-tools.mk +8 -3
index 8ebfc0975a..3baddb98ee 100644
@@ -12,9 +12,7 @@ RNG_TOOLS_DEPENDENCIES = libsysfs jitterentropy-library host-pkgconf openssl
 # From git
 RNG_TOOLS_AUTORECONF = YES
 
-RNG_TOOLS_CONF_OPTS = \
-	--without-nistbeacon \
-	--without-pkcs11
+RNG_TOOLS_CONF_OPTS = --without-pkcs11
 
 # Work around for uClibc or musl toolchains which lack argp_*()
 # functions.
@@ -30,6 +28,13 @@ else
 RNG_TOOLS_CONF_OPTS += --without-rtlsdr
 endif
 
+ifeq ($(BR2_PACKAGE_RNG_TOOLS_NISTBEACON),y)
+RNG_TOOLS_DEPENDENCIES += jansson libcurl libxml2
+RNG_TOOLS_CONF_OPTS += --with-nistbeacon
+else
+RNG_TOOLS_CONF_OPTS += --without-nistbeacon
+endif
+
 define RNG_TOOLS_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 755 package/rng-tools/S21rngd \
 		$(TARGET_DIR)/etc/init.d/S21rngd
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 package/rng-tools: add nistbeacon option

Fabrice, All,

On 2020-04-04 23:36 +0200, Fabrice Fontaine spake thusly:

Quoted 5 lines

Add an option to enable nistbeacon which is available since version 6.1 and
https://github.com/nhorman/rng-tools/commit/aefe862e187a1ef608f9826b2b4a5bbabd5e9945

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 68 lines
---
 package/rng-tools/Config.in    | 17 +++++++++++++++++
 package/rng-tools/rng-tools.mk | 11 ++++++++---
 2 files changed, 25 insertions(+), 3 deletions(-)
package/rng-tools/Config.in +17 -0
index a86fbb0f74..25b41f40d6 100644
@@ -11,5 +11,22 @@ config BR2_PACKAGE_RNG_TOOLS
 
 	  http://sourceforge.net/projects/gkernel/
 
+if BR2_PACKAGE_RNG_TOOLS
+
+config BR2_PACKAGE_RNG_TOOLS_NISTBEACON
+	bool "NIST Entropy Beacon support"
+	select BR2_PACKAGE_JANSSON
+	select BR2_PACKAGE_LIBCURL
+	select BR2_PACKAGE_LIBXML2
+	help
+	  Enable NIST Entropy Beacon support.
+
+	  Entropy gathered from the NIST network entropy beacon. Note
+	  that this entropy source is disabled by default as it should
+	  never be used for cryptographic purposes, or any use case in
+	  which random data should be known only by a single entity.
+
+endif
+
 comment "rng-tools needs a toolchain w/ NPTL"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
package/rng-tools/rng-tools.mk +8 -3
index 8ebfc0975a..3baddb98ee 100644
@@ -12,9 +12,7 @@ RNG_TOOLS_DEPENDENCIES = libsysfs jitterentropy-library host-pkgconf openssl
 # From git
 RNG_TOOLS_AUTORECONF = YES
 
-RNG_TOOLS_CONF_OPTS = \
-	--without-nistbeacon \
-	--without-pkcs11
+RNG_TOOLS_CONF_OPTS = --without-pkcs11
 
 # Work around for uClibc or musl toolchains which lack argp_*()
 # functions.
@@ -30,6 +28,13 @@ else
 RNG_TOOLS_CONF_OPTS += --without-rtlsdr
 endif
 
+ifeq ($(BR2_PACKAGE_RNG_TOOLS_NISTBEACON),y)
+RNG_TOOLS_DEPENDENCIES += jansson libcurl libxml2
+RNG_TOOLS_CONF_OPTS += --with-nistbeacon
+else
+RNG_TOOLS_CONF_OPTS += --without-nistbeacon
+endif
+
 define RNG_TOOLS_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 755 package/rng-tools/S21rngd \
 		$(TARGET_DIR)/etc/init.d/S21rngd
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 package/rng-tools: add nistbeacon option

In reply to Fabrice Fontaine
Quoted 24 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

Add an option to enable nistbeacon which is available since version 6.1 and
https://github.com/nhorman/rng-tools/commit/aefe862e187a1ef608f9826b2b4a5bbabd5e9945

---
 package/rng-tools/Config.in    | 17 +++++++++++++++++
 package/rng-tools/rng-tools.mk | 11 ++++++++---
 2 files changed, 25 insertions(+), 3 deletions(-)
package/rng-tools/Config.in +4 -0
index a86fbb0f74..25b41f40d6 100644
@@ -11,5 +11,22 @@ config BR2_PACKAGE_RNG_TOOLS
 
 	  http://sourceforge.net/projects/gkernel/
 
+if BR2_PACKAGE_RNG_TOOLS
+
+config BR2_PACKAGE_RNG_TOOLS_NISTBEACON
+	bool "NIST Entropy Beacon support"

package/rng-tools/Config.in config BR2_PACKAGE_RNG_TOOLS · line 27

Quoted 10 lines
package/rng-tools/Config.in +10 -0
+	select BR2_PACKAGE_JANSSON
+	select BR2_PACKAGE_LIBCURL
+	select BR2_PACKAGE_LIBXML2
+	help
+	  Enable NIST Entropy Beacon support.
+
+	  Entropy gathered from the NIST network entropy beacon. Note
+	  that this entropy source is disabled by default as it should
+	  never be used for cryptographic purposes, or any use case in
+	  which random data should be known only by a single entity.

Out of interest, what is the use case for this option?

Signature · 1 line
Bye, Peter Korsgaard