File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
doc/source/reference/random Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ pseudo-randomness was good for in the first place.
56
56
or cryptographic purposes. See the :py:mod: `secrets ` module from the
57
57
standard library for such use cases.
58
58
59
+ .. _recommend-secrets-randbits :
60
+
59
61
Seeds should be large positive integers. `default_rng ` can take positive
60
62
integers of any size. We recommend using very large, unique numbers to ensure
61
63
that your seed is different from anyone else's. This is good practice to ensure
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ These properties together mean that we can safely mix together the usual
45
45
user-provided seed with simple incrementing counters to get `~BitGenerator `
46
46
states that are (to very high probability) independent of each other. We can
47
47
wrap this together into an API that is easy to use and difficult to misuse.
48
+ Note that while `~SeedSequence ` attempts to solve many of the issues related to
49
+ user-provided small seeds, we still :ref: `recommend<recommend-secrets-randbits> `
50
+ using :py:func: `secrets.randbits ` to generate seeds with 128 bits of entropy to
51
+ avoid the remaining biases introduced by human-chosen seeds.
48
52
49
53
.. code-block :: python
50
54
You can’t perform that action at this time.
0 commit comments