Sha256: a941730df4cf5f1f2ef7795275523034704ae7df7eea6da2c36abdc00edc7e5e

Contents?: true

Size: 787 Bytes

Versions: 125

Compression:

Stored size: 787 Bytes

Contents

## Should I use random or secrets?

Python, as of version 3.6, includes two different random modules.

The module called `random` is pseudo-random, meaning it does not generate
true randomness, but follows an algorithm that simulates randomness.
Since random numbers are generated through a known algorithm, they are not truly random.

The `random` module is not correctly suited for cryptography and should not be used,
precisely because it is pseudo-random.

For this reason, in version 3.6, Python introduced the `secrets` module, which generates
cryptographically strong random numbers that provide the greater security required for cryptography.

Since this is only an exercise, `random` is fine to use, but note that **it would be
very insecure if actually used for cryptography.**

Version data entries

125 entries across 125 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.179 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.178 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.177 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.176 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.175 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.174 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.173 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.172 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.171 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.170 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.169 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.167 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.166 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.165 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.164 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.163 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.162 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.161 tracks/python/exercises/diffie-hellman/.meta/hints.md
trackler-2.2.1.160 tracks/python/exercises/diffie-hellman/.meta/hints.md