Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 91213ddcfbe7f54821d42c2d9e091326 > files > 1598

gap-system-packages-4.4.12-5mdv2010.0.i586.rpm

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (IO) - Chapter 6: Really random sources</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
</head>
<body>


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chap8.html">8</a>  <a href="chap9.html">9</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap5.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap7.html">Next Chapter</a>&nbsp;  </div>

<p><a id="X178A8811F17BD55ABA" name="X178A8811F17BD55ABA"></a></p>
<div class="ChapSects"><a href="chap6.html#X178A8811F17BD55ABA">6. <span class="Heading">Really random sources</span></a>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap6.html#X8173135A17D187358">6.1 <span class="Heading">The functions</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap6.html#X17CB0B5BC82F8FD8F">6.1-1 RandomSource</a></span>
</div>
</div>

<h3>6. <span class="Heading">Really random sources</span></h3>

<p>This section describes so called "real random sources". It is an extension to the library mechanism of random source objects that uses the devices <code class="file">/dev/random</code> and <code class="file">/dev/urandom</code> available on <code class="file">Linux</code> systems (and maybe on other operating systems) providing random numbers that are impossible to predict. The idea is that such sources of random numbers are useful to produce unpredictable secret keys for cryptographic applications.</p>

<p><a id="X8173135A17D187358" name="X8173135A17D187358"></a></p>

<h4>6.1 <span class="Heading">The functions</span></h4>

<p><a id="X17CB0B5BC82F8FD8F" name="X17CB0B5BC82F8FD8F"></a></p>

<h5>6.1-1 RandomSource</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; RandomSource</code>( <var class="Arg">rdev</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><b>Returns: </b>a real random source object or <code class="code">fail</code></p>

<p>The first argument <var class="Arg">r</var> must be the <strong class="pkg">GAP</strong> filter <code class="code">IsRealRandomSource</code> and the second either the string <code class="file">random</code> or the string <code class="file">urandom</code>. A real random source object is created that draws its random numbers from the kernel devices <code class="file">/dev/random</code> and <code class="file">/dev/urandom</code> respectively. Whereas <code class="file">/dev/random</code> always provides random numbers of not guaranteed "quality", the device <code class="file">/dev/urandom</code> measures its entropy and produces guaranteed unpredictable numbers. However, it might block until enough "random" events (like mouse movements) have been accumulated.</p>


<div class="chlinkprevnextbot">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap5.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap7.html">Next Chapter</a>&nbsp;  </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chap8.html">8</a>  <a href="chap9.html">9</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>