[前][次][番号順一覧][スレッド一覧]

ruby-changes:63761

From: Nobuyoshi <ko1@a...>
Date: Fri, 27 Nov 2020 12:48:23 +0900 (JST)
Subject: [ruby-changes:63761] eca854041f (master): [DOC] Mersenne Twister isn't cryptographically secure [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=eca854041f

From eca854041f86f2171e37ab876bf108d9e13b8188 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 27 Nov 2020 12:44:45 +0900
Subject: [DOC] Mersenne Twister isn't cryptographically secure [ci skip]


diff --git a/random.c b/random.c
index 1dd4ccd..d9a347e 100644
--- a/random.c
+++ b/random.c
@@ -1672,7 +1672,8 @@ rb_reset_random_seed(void) https://github.com/ruby/ruby/blob/trunk/random.c#L1672
  * marshaled, allowing sequences to be saved and resumed.
  *
  * PRNGs are currently implemented as a modified Mersenne Twister with a period
- * of 2**19937-1.
+ * of 2**19937-1.  As this algorithm is _not_ for cryptographical use, you must
+ * use SecureRandom for security purpose, instead of this PRNG.
  */
 
 void
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]