Skip to content

Commit

Permalink
Update docs to output generated at 14656d4
Browse files Browse the repository at this point in the history
  • Loading branch information
cforeman-cqc committed Jan 17, 2024
1 parent 8d8aa12 commit e170053
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 18 deletions.
14 changes: 8 additions & 6 deletions _sources/examples/example.ipynb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"source": [
"## Quick Start\n",
"\n",
":code:`pip install cryptomite`"
"``pip install cryptomite``"
]
},
{
Expand All @@ -28,8 +28,8 @@
"source": [
"## Generating an extractor\n",
"\n",
"Using ``Cryptomite``, extractors can be generated directly by giving the input length (in bits) :code:`n` and output length (in bits) :code:`m`, or for the Trevisan extractor, giving the input length :code:`n`, output length :code:`m` and maximum error, :code:`error`.\n",
"We generate all the extractors of ``Cryptomite`` below, for an example :code:`n`, :code:`m`, :code:`error`:\n"
"Using ``Cryptomite``, extractors can be generated directly by giving the input length (in bits) ``n`` and output length (in bits) ``m``, or for the Trevisan extractor, giving the input length ``n``, output length ``m`` and maximum error,``error``.\n",
"We generate all the extractors of ``Cryptomite`` below, for an example ``n``, ``m``, ``error``:\n"
]
},
{
Expand All @@ -56,8 +56,8 @@
"\n",
"Now the extractors have been generated, we show how to perform extraction. \n",
"The extractors take as input a list of input bits and a list of (weak) seed bits, and outputs a new list of bits.\n",
"Note that each extractor of ``Cryptomite`` requires a different amount of seed bits, the calculation of this is left to the user (manually or using our :code:`from_params` utility functions) and denoted :code:`seed_length` in the following example code.\n",
"In this example, we generate both the input string and the (weak) seed using :code:`randint` function from the :code:`random` Python library - which a user would replace with their desired generation methods:"
"Note that each extractor of ``Cryptomite`` requires a different amount of seed bits, the calculation of this is left to the user (manually or using our ``from_params`` utility functions) and denoted ``seed_length`` in the following example code.\n",
"In this example, we generate both the input string and the (weak) seed using ``randint`` function from the ``random`` Python library - which a user would replace with their desired generation methods:"
]
},
{
Expand All @@ -82,7 +82,9 @@
"raw_mimetype": "text/restructuredtext"
},
"source": [
"Alternatively, all ``Cryptomite`` extractors (except Trevisan) can be generated without needing to calculate the output length or required seed length yourself using the :code:`from_params` utility functions. \n",
"## Using the from_params Utility functions\n",
"\n",
"Alternatively, all ``Cryptomite`` extractors (except Trevisan) can be generated without needing to calculate the output length or required seed length yourself using the ``from_params`` utility functions. \n",
"This is performed by providing the input min-entropy, seed min-entropy, log2 of the error, input length, seed length, and whether to calculate the output length in the (quantum-proof) Markov model, for example"
]
},
Expand Down
14 changes: 9 additions & 5 deletions examples/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<li class="toctree-l3"><a class="reference internal" href="#Quick-Start">Quick Start</a></li>
<li class="toctree-l3"><a class="reference internal" href="#Generating-an-extractor">Generating an extractor</a></li>
<li class="toctree-l3"><a class="reference internal" href="#Extraction">Extraction</a></li>
<li class="toctree-l3"><a class="reference internal" href="#Using-the-from_params-Utility-functions">Using the from_params Utility functions</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -365,11 +366,11 @@ <h1>Basic Usage<a class="headerlink" href="#Basic-Usage" title="Permalink to thi
<p>In this notebook, we give a few examples of how to use <code class="docutils literal notranslate"><span class="pre">Cryptomite</span></code> and accompanying utility functions.</p>
<section id="Quick-Start">
<h2>Quick Start<a class="headerlink" href="#Quick-Start" title="Permalink to this headline"></a></h2>
<p>:code:<code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">cryptomite</span></code></p>
<p><code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">cryptomite</span></code></p>
</section>
<section id="Generating-an-extractor">
<h2>Generating an extractor<a class="headerlink" href="#Generating-an-extractor" title="Permalink to this headline"></a></h2>
<p>Using <code class="docutils literal notranslate"><span class="pre">Cryptomite</span></code>, extractors can be generated directly by giving the input length (in bits) :code:<code class="docutils literal notranslate"><span class="pre">n</span></code> and output length (in bits) :code:<code class="docutils literal notranslate"><span class="pre">m</span></code>, or for the Trevisan extractor, giving the input length :code:<code class="docutils literal notranslate"><span class="pre">n</span></code>, output length :code:<code class="docutils literal notranslate"><span class="pre">m</span></code> and maximum error, :code:<code class="docutils literal notranslate"><span class="pre">error</span></code>. We generate all the extractors of <code class="docutils literal notranslate"><span class="pre">Cryptomite</span></code> below, for an example :code:<code class="docutils literal notranslate"><span class="pre">n</span></code>, :code:<code class="docutils literal notranslate"><span class="pre">m</span></code>, :code:<code class="docutils literal notranslate"><span class="pre">error</span></code>:</p>
<p>Using <code class="docutils literal notranslate"><span class="pre">Cryptomite</span></code>, extractors can be generated directly by giving the input length (in bits) <code class="docutils literal notranslate"><span class="pre">n</span></code> and output length (in bits) <code class="docutils literal notranslate"><span class="pre">m</span></code>, or for the Trevisan extractor, giving the input length <code class="docutils literal notranslate"><span class="pre">n</span></code>, output length <code class="docutils literal notranslate"><span class="pre">m</span></code> and maximum error,<code class="docutils literal notranslate"><span class="pre">error</span></code>. We generate all the extractors of <code class="docutils literal notranslate"><span class="pre">Cryptomite</span></code> below, for an example <code class="docutils literal notranslate"><span class="pre">n</span></code>, <code class="docutils literal notranslate"><span class="pre">m</span></code>, <code class="docutils literal notranslate"><span class="pre">error</span></code>:</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
Expand All @@ -386,8 +387,8 @@ <h2>Generating an extractor<a class="headerlink" href="#Generating-an-extractor"
</section>
<section id="Extraction">
<h2>Extraction<a class="headerlink" href="#Extraction" title="Permalink to this headline"></a></h2>
<p>Now the extractors have been generated, we show how to perform extraction. The extractors take as input a list of input bits and a list of (weak) seed bits, and outputs a new list of bits. Note that each extractor of <code class="docutils literal notranslate"><span class="pre">Cryptomite</span></code> requires a different amount of seed bits, the calculation of this is left to the user (manually or using our :code:<code class="docutils literal notranslate"><span class="pre">from_params</span></code> utility functions) and denoted :code:<code class="docutils literal notranslate"><span class="pre">seed_length</span></code> in the following example code. In this example, we generate both the input string
and the (weak) seed using :code:<code class="docutils literal notranslate"><span class="pre">randint</span></code> function from the :code:<code class="docutils literal notranslate"><span class="pre">random</span></code> Python library - which a user would replace with their desired generation methods:</p>
<p>Now the extractors have been generated, we show how to perform extraction. The extractors take as input a list of input bits and a list of (weak) seed bits, and outputs a new list of bits. Note that each extractor of <code class="docutils literal notranslate"><span class="pre">Cryptomite</span></code> requires a different amount of seed bits, the calculation of this is left to the user (manually or using our <code class="docutils literal notranslate"><span class="pre">from_params</span></code> utility functions) and denoted <code class="docutils literal notranslate"><span class="pre">seed_length</span></code> in the following example code. In this example, we generate both the input string and the (weak)
seed using <code class="docutils literal notranslate"><span class="pre">randint</span></code> function from the <code class="docutils literal notranslate"><span class="pre">random</span></code> Python library - which a user would replace with their desired generation methods:</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[ ]:
</pre></div>
Expand All @@ -401,7 +402,10 @@ <h2>Extraction<a class="headerlink" href="#Extraction" title="Permalink to this
</pre></div>
</div>
</div>
<p>Alternatively, all <code class="docutils literal notranslate"><span class="pre">Cryptomite</span></code> extractors (except Trevisan) can be generated without needing to calculate the output length or required seed length yourself using the :code:<code class="docutils literal notranslate"><span class="pre">from_params</span></code> utility functions. This is performed by providing the input min-entropy, seed min-entropy, log2 of the error, input length, seed length, and whether to calculate the output length in the (quantum-proof) Markov model, for example</p>
</section>
<section id="Using-the-from_params-Utility-functions">
<h2>Using the from_params Utility functions<a class="headerlink" href="#Using-the-from_params-Utility-functions" title="Permalink to this headline"></a></h2>
<p>Alternatively, all <code class="docutils literal notranslate"><span class="pre">Cryptomite</span></code> extractors (except Trevisan) can be generated without needing to calculate the output length or required seed length yourself using the <code class="docutils literal notranslate"><span class="pre">from_params</span></code> utility functions. This is performed by providing the input min-entropy, seed min-entropy, log2 of the error, input length, seed length, and whether to calculate the output length in the (quantum-proof) Markov model, for example</p>
<div class="nbinput nblast docutils container">
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[2]:
</pre></div>
Expand Down
14 changes: 8 additions & 6 deletions examples/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"source": [
"## Quick Start\n",
"\n",
":code:`pip install cryptomite`"
"``pip install cryptomite``"
]
},
{
Expand All @@ -28,8 +28,8 @@
"source": [
"## Generating an extractor\n",
"\n",
"Using ``Cryptomite``, extractors can be generated directly by giving the input length (in bits) :code:`n` and output length (in bits) :code:`m`, or for the Trevisan extractor, giving the input length :code:`n`, output length :code:`m` and maximum error, :code:`error`.\n",
"We generate all the extractors of ``Cryptomite`` below, for an example :code:`n`, :code:`m`, :code:`error`:\n"
"Using ``Cryptomite``, extractors can be generated directly by giving the input length (in bits) ``n`` and output length (in bits) ``m``, or for the Trevisan extractor, giving the input length ``n``, output length ``m`` and maximum error,``error``.\n",
"We generate all the extractors of ``Cryptomite`` below, for an example ``n``, ``m``, ``error``:\n"
]
},
{
Expand All @@ -56,8 +56,8 @@
"\n",
"Now the extractors have been generated, we show how to perform extraction. \n",
"The extractors take as input a list of input bits and a list of (weak) seed bits, and outputs a new list of bits.\n",
"Note that each extractor of ``Cryptomite`` requires a different amount of seed bits, the calculation of this is left to the user (manually or using our :code:`from_params` utility functions) and denoted :code:`seed_length` in the following example code.\n",
"In this example, we generate both the input string and the (weak) seed using :code:`randint` function from the :code:`random` Python library - which a user would replace with their desired generation methods:"
"Note that each extractor of ``Cryptomite`` requires a different amount of seed bits, the calculation of this is left to the user (manually or using our ``from_params`` utility functions) and denoted ``seed_length`` in the following example code.\n",
"In this example, we generate both the input string and the (weak) seed using ``randint`` function from the ``random`` Python library - which a user would replace with their desired generation methods:"
]
},
{
Expand All @@ -82,7 +82,9 @@
"raw_mimetype": "text/restructuredtext"
},
"source": [
"Alternatively, all ``Cryptomite`` extractors (except Trevisan) can be generated without needing to calculate the output length or required seed length yourself using the :code:`from_params` utility functions. \n",
"## Using the from_params Utility functions\n",
"\n",
"Alternatively, all ``Cryptomite`` extractors (except Trevisan) can be generated without needing to calculate the output length or required seed length yourself using the ``from_params`` utility functions. \n",
"This is performed by providing the input min-entropy, seed min-entropy, log2 of the error, input length, seed length, and whether to calculate the output length in the (quantum-proof) Markov model, for example"
]
},
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ <h2>Licence<a class="headerlink" href="#licence" title="Permalink to this headli
<li class="toctree-l3"><a class="reference internal" href="examples/example.html#Quick-Start">Quick Start</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples/example.html#Generating-an-extractor">Generating an extractor</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples/example.html#Extraction">Extraction</a></li>
<li class="toctree-l3"><a class="reference internal" href="examples/example.html#Using-the-from_params-Utility-functions">Using the from_params Utility functions</a></li>
</ul>
</li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions notebooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
<li class="toctree-l2"><a class="reference internal" href="examples/example.html#Quick-Start">Quick Start</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/example.html#Generating-an-extractor">Generating an extractor</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/example.html#Extraction">Extraction</a></li>
<li class="toctree-l2"><a class="reference internal" href="examples/example.html#Using-the-from_params-Utility-functions">Using the from_params Utility functions</a></li>
</ul>
</li>
</ul>
Expand Down
Binary file modified objects.inv
Binary file not shown.
Loading

0 comments on commit e170053

Please sign in to comment.