<div dir="ltr">Under Linux, the correct way to use the device is to have it as an input to /dev/urandom, using rngd to feed entropy in from OneRNG to your kernel.<div><br></div><div>If you want to read data directly from OneRNG, you can; it is just a serial device, and you can just open it, write the config commands, and then read the number of bytes of data that you want. You'd be advised to use OneRNG data to seed a PRNG though :-)</div><div><br></div><div>Sensibly, the Python docs say "use your OS, not us" ... <a href="https://docs.python.org/2/library/random.html">https://docs.python.org/2/library/random.html</a></div><div><br></div><div>-jim</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 7, 2017 at 9:06 PM, 7xxprometheusxx7 <span dir="ltr"><<a href="mailto:7xxprometheusxx7@gmail.com" target="_blank">7xxprometheusxx7@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>









<div marginwidth="0" marginheight="0" color="#333333" bgcolor="#ffffff" style="background:#fffffc;background-color:#fff;color:#667366;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:20px;margin:0">
    <span id="m_-6243682730477003757gs-content-email-layout-preheader" style="background:#fff;color:#fff;display:none;font-size:1px">
      
    </span>
    <div id="m_-6243682730477003757gs-content-email-layout-prebody" style="padding:0 10px 0 10px">
      
    </div>
    <table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" color="#333333" id="m_-6243682730477003757gs-content-email-layout" style="background-color:transparent;border:none;border-collapse:collapse;border-spacing:0;margin:0 0 0 0;max-width:100%;padding:0 0 0 0">
<tbody><tr>
<td align="center" valign="middle" width="100%" id="m_-6243682730477003757toparea" style="background:#567;border-bottom:6px solid #a6b3bf;height:24px;margin:0;padding:0" height="24">
          <center>
            <table cellpadding="0" cellspacing="0" width="100%" style="background-color:transparent;border-collapse:collapse;border-spacing:0;margin:0 0 0 0;max-width:100%" class="m_-6243682730477003757fluid-table"><tbody><tr>
<td valign="top" id="m_-6243682730477003757titlebar" style="margin:0;padding:0;text-align:left" align="left">
                  <table cellpadding="0" cellspacing="0" width="100%" style="background-color:transparent;border-collapse:collapse;border-spacing:0;margin:0 0 0 0;max-width:100%"><tbody><tr>
<td style="margin:0;padding:0">
                        <a id="m_-6243682730477003757titlebar-home-link" href="http://lists.onerng.info" style="border:none;color:#567;display:block;line-height:20px;max-width:600px;text-decoration:none;white-space:nowrap" target="_blank"><span class="m_-6243682730477003757logo" style="display:none"> </span>
                        <span class="m_-6243682730477003757site" style="color:#fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:20px;font-weight:bold;line-height:20px">OneRNG</span></a>
                      </td>
                    </tr></tbody></table>
</td>

              </tr></tbody></table>
</center>
        </td>

      </tr>
<tr>
<td align="center" valign="top" width="100%" id="m_-6243682730477003757gs-content-email-layout-body" style="border-collapse:separate;margin:0 0 0 0;padding:0 0 0 0;table-layout:fixed">
          <center>
            <table cellpadding="0" cellspacing="0" width="100%" class="m_-6243682730477003757fluid-table" style="background-color:transparent;border-collapse:collapse;border-spacing:0;margin:0 0 0 0;max-width:100%;padding:0 0 0 0"><tbody><tr>
<td valign="top" style="margin:0;padding:0">
                  <table cellpadding="0" cellspacing="0" width="100%" id="m_-6243682730477003757gs-content-email-layout-fluid-body" style="background-color:transparent;border-collapse:collapse;border-spacing:0;margin:0 0 0 0;max-width:100%;padding:0 0 0 0"><tbody><tr>
<td id="m_-6243682730477003757bodyblock" bgcolor="#FFFFFF" style="background:#fffffc;margin:0;padding:20px 10px 20px 10px;text-align:left" align="left">
                        <div id="m_-6243682730477003757gs-group-list-email-html">
<table id="m_-6243682730477003757gs-group-list-email-html-prologue" align="center" valign="top" border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:transparent;border-collapse:collapse;border-spacing:0;margin:0 0 0 0;max-width:100%;padding:0 0 0 0"><tbody><tr>
<td id="m_-6243682730477003757gs-group-list-email-html-prologue-photo" valign="top" width="60" height="60" style="margin:0;padding:0">
      <a href="http://lists.onerng.info/p/2SqG0RmVIws4V6yq4geiQp" title="Photo of 7xxprometheusxx7" style="color:#567;text-decoration:none" target="_blank">
        <img border="0" alt="Photo of 7xxprometheusxx7" height="auto" width="auto" style="border:0;height:auto;max-width:100%;vertical-align:middle;width:auto" valign="middle"></a>
    </td>
    <td id="m_-6243682730477003757gs-group-list-email-html-prologue-metadata" valign="top" style="margin:0;padding:0">
      <table style="background-color:transparent;border-collapse:collapse;border-spacing:0;margin:0 0 0 0;max-width:100%;padding:0 0 0 0">
<tbody><tr>
<td style="margin:0;padding:0 0 0 10px">
            <a href="http://lists.onerng.info/r/topic/3ICEceUAVeIvzlnm0C1TTI" style="color:#567;text-decoration:none" target="_blank"><b>OneRNG and Python</b></a>
          </td>
        </tr>
<tr>
<td style="margin:0;padding:0 0 0 10px">
            <span class="m_-6243682730477003757muted" style="color:#8c8d8d">by </span>
            <a href="http://lists.onerng.info/p/2SqG0RmVIws4V6yq4geiQp" style="color:#567;text-decoration:none" target="_blank"><b>7xxprometheusxx7</b>
            </a>
          </td>
        </tr>
<tr>
<td style="margin:0;padding:0 0 0 10px">
            <span class="m_-6243682730477003757muted" style="color:#8c8d8d">in </span>
            <a href="http://lists.onerng.info/groups/onerng-talk" class="m_-6243682730477003757group" style="color:#567;text-decoration:none" target="_blank">
            <b>OneRNG Talk</b></a>
          </td>
        </tr>
</tbody></table>

</td>
  </tr></tbody></table>
<table id="m_-6243682730477003757gs-group-list-email-html-body" align="left" valign="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:transparent;border-collapse:collapse;border-spacing:0;margin:0 0 0 0;max-width:100%;padding:0 0 0 0">
<tbody><tr>
<td style="margin:0;padding:0"><hr style="border:0;border-bottom:1px solid #fff;border-bottom-color:#eee;border-bottom-width:1px;border-top:none;border-top-width:3px;margin:0;padding:9px 0 0 0"></td>
  </tr>
<tr>
<td id="m_-6243682730477003757gs-group-list-email-html-body-main" align="left" style="margin:0;padding:10px 0 0 0">
<span class="m_-6243682730477003757line" style="display:inline-block;max-width:580px;overflow:hidden;text-overflow:ellipsis;white-space:pre-wrap;width:100%" width="100%">I purchased this device last year and it has at in my drawer since then. I've been busy studying software development. I just dug the OneRNG out, installed the software, and verified it is working.</span><br>
 <br><span class="m_-6243682730477003757line" style="display:inline-block;max-width:580px;overflow:hidden;text-overflow:ellipsis;white-space:pre-wrap;width:100%" width="100%">Does anyone know where I can find some documentation describing how I may use this in a Python script?</span><br>
 <br><span class="m_-6243682730477003757line" style="display:inline-block;max-width:580px;overflow:hidden;text-overflow:ellipsis;white-space:pre-wrap;width:100%" width="100%">I'd like to use it to generate a random series of numbers and create a one-time pad type encryption program.</span><br>
 <br><span class="m_-6243682730477003757line" style="display:inline-block;max-width:580px;overflow:hidden;text-overflow:ellipsis;white-space:pre-wrap;width:100%" width="100%">Thanks in advance!!</span><br>
</td>
  </tr>
</tbody></table>
<table id="m_-6243682730477003757gs-group-list-email-html-links" align="center" valign="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color:transparent;border-collapse:collapse;border-spacing:0;margin:0 0 0 0;max-width:100%;padding:0 0 0 0">
<tbody><tr>
<td style="margin:0;padding:20px 0 0 0"><hr style="border:0;border-bottom:1px solid #fff;border-bottom-color:#eee;border-bottom-width:1px;border-top:none;border-top-width:3px;margin:0;padding:9px 0 0 0"></td>
  </tr>
<tr id="m_-6243682730477003757gs-group-list-email-html-links-view">
<td style="margin:0;padding:20px 0 0 0">
      
        <a id="m_-6243682730477003757gs-group-list-email-html-links-view-reply" href="mailto:onerng-talk@lists.onerng.info?subject=Re%3A%20OneRNG%20and%20Python" title="Reply to this email" class="m_-6243682730477003757btn" style="background-color:#567;background-image:none;background-repeat:repeat-x;border:1px solid #567;border-bottom-color:#b3b3b3;border-color:rgba(102,153,0,0.1) rgba(102,153,0,0.1) rgba(102,153,0,0.25);border-radius:4px;color:#fff;display:inline-block;font-size:16px;line-height:20px;margin-bottom:0;padding:4px 12px;text-align:center;text-decoration:none;vertical-align:middle" bgcolor="#556677" align="center" valign="middle" target="_blank">⮪ Reply</a>
         
      
      
        <a id="m_-6243682730477003757gs-group-list-email-html-links-view-new" href="mailto:onerng-talk@lists.onerng.info" title="Start a new topic by email" class="m_-6243682730477003757btn" style="background-color:#567;background-image:none;background-repeat:repeat-x;border:1px solid #567;border-bottom-color:#b3b3b3;border-color:rgba(102,153,0,0.1) rgba(102,153,0,0.1) rgba(102,153,0,0.25);border-radius:4px;color:#fff;display:inline-block;font-size:16px;line-height:20px;margin-bottom:0;padding:4px 12px;text-align:center;text-decoration:none;vertical-align:middle" bgcolor="#556677" align="center" valign="middle" target="_blank">🖂 New topic</a>
         
      
      <a id="m_-6243682730477003757gs-group-list-email-html-links-view-topic" class="m_-6243682730477003757btn" href="http://lists.onerng.info/r/topic/3ICEceUAVeIvzlnm0C1TTI" title="View this post within the topic on the web" style="background-color:#567;background-image:none;background-repeat:repeat-x;border:1px solid #567;border-bottom-color:#b3b3b3;border-color:rgba(102,153,0,0.1) rgba(102,153,0,0.1) rgba(102,153,0,0.25);border-radius:4px;color:#fff;display:inline-block;font-size:16px;line-height:20px;margin-bottom:0;padding:4px 12px;text-align:center;text-decoration:none;vertical-align:middle" bgcolor="#556677" align="center" valign="middle" target="_blank">View topic…</a>
    </td>

  </tr>
<tr id="m_-6243682730477003757gs-group-list-email-html-links-settings">
<td style="margin:0;padding:20px 0 0 0">
      <a href="mailto:onerng-talk@lists.onerng.info?subject=Unsubscribe&body=Hello%2C%0A%0APlease%20remove%20me%20from%20OneRNG%20Talk%0A%3Chttp%3A//lists.onerng.info/groups/onerng-talk%3E%0A%0AThank%20you." style="color:#567;text-decoration:none" target="_blank">Unsubscribe</a>
      <span class="m_-6243682730477003757muted" style="color:#8c8d8d"> • </span>
      <a href="mailto:onerng-talk@lists.onerng.info?subject=Digest%20on&body=Hello%2C%0A%0APlease%20switch%20me%20from%20receiving%20one%20email%20per%20post%20to%20the%20daily%0Adigest%2C%20which%20summarises%20the%20all%20the%20posts%20made%20each%20day%20in%0AOneRNG%20Talk%0A%3Chttp%3A//lists.onerng.info/groups/onerng-talk%3E%0A%0AThank%20you." style="color:#567;text-decoration:none" target="_blank">Switch to a daily digest</a>
    </td>
  </tr>
</tbody></table>

</div>
                      </td>
                    </tr></tbody></table>
</td>
              </tr></tbody></table>
</center>
        </td>

      </tr>
<tr id="m_-6243682730477003757gs-content-layout-footer" style="background:#edf0f2;border-top:6px solid #ccc;clear:both;color:#567;height:24px;margin:0 0 0 0;padding:0 0 0 0" height="24">
<td align="center" valign="top" width="100%" style="margin:0;padding:0">
          <center>
            <table cellpadding="0" cellspacing="0" width="100%" class="m_-6243682730477003757fluid-table" style="background-color:transparent;border-collapse:collapse;border-spacing:0;margin:10px 0 10px 0;max-width:100%"><tbody><tr>
<td valign="top" id="m_-6243682730477003757gs-content-layout-footer-content" style="margin:0 0 0 0;padding:0 0 0 10px;text-align:left" align="left">
                  <table cellpadding="0" cellspacing="0" width="100%" style="background-color:transparent;border-collapse:collapse;border-spacing:0;margin:10px 0 10px 0;max-width:100%"><tbody><tr>
<td style="margin:0;padding:0">
  <ul class="m_-6243682730477003757dotted-inline-list" style="margin:0;margin-left:0;padding:0">
<li style="display:inline-block;line-height:20px;list-style:none;vertical-align:top" valign="top">
    <a href="http://lists.onerng.info/policies/privacy/" style="color:inherit;text-decoration:underline" target="_blank">Privacy</a>
  </li>
  <li style="display:inline-block;line-height:20px;list-style:none;vertical-align:top" valign="top">
    <a href="http://lists.onerng.info/policies/aup/" style="color:inherit;text-decoration:underline" target="_blank">Acceptable Use</a>
  </li>
  <li style="display:inline-block;line-height:20px;list-style:none;vertical-align:top" valign="top">
    <a href="http://lists.onerng.info/policies/tos/" style="color:inherit;text-decoration:underline" target="_blank">Terms of Service</a>
  </li>
</ul>
</td>
                    </tr></tbody></table>
</td>
              </tr></tbody></table>
</center>
        </td>
      </tr>
</tbody></table>

</div>

</blockquote></div><br></div>