1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/relic/patches/0002-add-RIOT-random-support-to-cmake-and-relic_conf.h.patch

39 lines
1.3 KiB
Diff

From ce1cd836aafefa92c3138f3e923147a42e95c886 Mon Sep 17 00:00:00 2001
From: Kaspar Schleiser <kaspar@schleiser.de>
Date: Mon, 8 Nov 2021 22:37:38 +0100
Subject: [PATCH 2/2] add RIOT random support to cmake and relic_conf.h
---
cmake/rand.cmake | 1 +
include/relic_conf.h.in | 2 ++
2 files changed, 3 insertions(+)
diff --git a/cmake/rand.cmake b/cmake/rand.cmake
index ed90c769..9f79fd6d 100644
--- a/cmake/rand.cmake
+++ b/cmake/rand.cmake
@@ -12,6 +12,7 @@ message(" SEED=LIBC Use rand()/random() functions. (insecure!)")
message(" SEED=RDRND Use Intel RdRand instruction directly.")
message(" SEED=UDEV Use non-blocking /dev/urandom. (recommended)")
message(" SEED=WCGR Use Windows' CryptGenRandom. (recommended)\n")
+message(" SEED=RIOTRND Use RIOT's random module for seeding. (recommended on RIOT)")
# Choose the pseudo-random number generator.
set(RAND "HASHD" CACHE STRING "Pseudo-random number generator")
diff --git a/include/relic_conf.h.in b/include/relic_conf.h.in
index 1245edc0..4e807621 100644
--- a/include/relic_conf.h.in
+++ b/include/relic_conf.h.in
@@ -656,6 +656,8 @@
#define UDEV 3
/** Use Windows' CryptGenRandom. */
#define WCGR 4
+/** Use RIOT's random module for seeding */
+#define RIOTRND 5
/** Chosen random generator seeder. */
#cmakedefine SEED @SEED@
--
2.33.1