-1

The most commonly cited source of randomness is CrypAPI in Windows systems. Can I generate my own entropy from different sources without using this API in python? Any such library? I want to tinker with the generation process and learn a bit about RNG.

1 Answers1

-2

Sure, you could get random noise from sites that provide it, f.e.

https://www.random.org/strings/

" The randomness comes from atmospheric noise, which for many purposes is better than the pseudo-random number algorithms typically used in computer programs."

along the lines, using BeautifulSoup to scrap pages

import urllib2
from bs4 import BeautifulSoup

# specify the url
rng_page = ‘https://www.random.org/strings/'

# query the website and return the html to the variable ‘page’
page = urllib2.urlopen(rng_page)

# parse the html using beautiful soup and store in variable `soup`
soup = BeautifulSoup(page, ‘html.parser’)

....
Severin Pappadeux
  • 18,636
  • 3
  • 38
  • 64
  • 2
    Getting entropy by scraping a web page is a terrible idea from the security perspective. Other than security, this approach will limit your script to only work when you have internet access. – Leo Jan 27 '18 at 19:52