title: Implementation of a pseudorandom generator in Python
body: <p>I'm reading a paper called <a href="http://link.springer.com/chapter/10.1007/978-3-662-46800-5_26#page-1" rel="nofollow noreferrer">More Efficient Oblivious Transfer Extensions with
  Security for Malicious Adversaries</a> by <strong>Gilad Asharov, Yehuda Lindell, Thomas Schneider</strong> and <strong>Michael Zohner</strong>. </p>
  
  <p>On page 8 they present their protocol. When presenting the tools being used, they write: </p>
  
  <p><a href="https://i.stack.imgur.com/x1xIa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x1xIa.png" alt="pseudorandom generator G"></a></p>
  
  <p>If my understanding is correct they use a pseudorandom generator called G which <strong>takes as an input an object consisting of zeros and ones of length k and produce an object of zeros and ones of length m</strong>. </p>
  
  <p>My questions is: <strong>How can I implement this in Python?</strong> </p>
  
  <p>How can I implement a pseudorandom generator which takes a seed of size k and produces an output of size m?</p>