summaryrefslogtreecommitdiffstats
path: root/Doc/library/ssl.rst
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-24 19:32:40 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-24 19:32:40 (GMT)
commit19fb53c1195653e87b9197211015c624960c7b95 (patch)
tree1824b8ebfd999edff2278672b25789b9b1a5b4c1 /Doc/library/ssl.rst
parentabf22b405fb15835ac9e1a732dee624c1a6c805a (diff)
downloadcpython-19fb53c1195653e87b9197211015c624960c7b95.zip
cpython-19fb53c1195653e87b9197211015c624960c7b95.tar.gz
cpython-19fb53c1195653e87b9197211015c624960c7b95.tar.bz2
Issue #12049: improve RAND_bytes() and RAND_pseudo_bytes() documentation
Add also a security warning in the module random pointing to ssl.RAND_bytes().
Diffstat (limited to 'Doc/library/ssl.rst')
-rw-r--r--Doc/library/ssl.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst
index a528a03..295d007 100644
--- a/Doc/library/ssl.rst
+++ b/Doc/library/ssl.rst
@@ -166,6 +166,11 @@ Random generation
Returns *num* cryptographically strong pseudo-random bytes.
+ Read the Wikipedia article, `Cryptographically secure pseudorandom number
+ generator
+ <http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator>`_,
+ to get the requirements of a cryptographically generator.
+
.. versionadded:: 3.3
.. function:: RAND_pseudo_bytes(num)
@@ -174,6 +179,11 @@ Random generation
is_cryptographic is True if the bytes generated are cryptographically
strong.
+ Generated pseudo-random byte sequences will be unique if they are of
+ sufficient length, but are not necessarily unpredictable. They can be used
+ for non-cryptographic purposes and for certain purposes in cryptographic
+ protocols, but usually not for key generation etc.
+
.. versionadded:: 3.3
.. function:: RAND_status()