/usr/share/doc/libghc-cryptonite-doc/html/Crypto-Number-F2m.html is in libghc-cryptonite-doc 0.20-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Crypto.Number.F2m</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Crypto-Number-F2m.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Crypto-Number-F2m.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">cryptonite-0.20: Cryptography Primitives sink</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>License</th><td>BSD-style</td></tr><tr><th>Maintainer</th><td>Danny Navarro <j@dannynavarro.net></td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>Good</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Crypto.Number.F2m</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module provides basic arithmetic operations over F₂m. Performance is
not optimal and it doesn't provide protection against timing
attacks. The <code>m</code> parameter is implicitly derived from the irreducible
polynomial where applicable.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:BinaryPolynomial">BinaryPolynomial</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:addF2m">addF2m</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:mulF2m">mulF2m</a> :: <a href="Crypto-Number-F2m.html#t:BinaryPolynomial">BinaryPolynomial</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:squareF2m-39-">squareF2m'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:squareF2m">squareF2m</a> :: <a href="Crypto-Number-F2m.html#t:BinaryPolynomial">BinaryPolynomial</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:modF2m">modF2m</a> :: <a href="Crypto-Number-F2m.html#t:BinaryPolynomial">BinaryPolynomial</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:invF2m">invF2m</a> :: <a href="Crypto-Number-F2m.html#t:BinaryPolynomial">BinaryPolynomial</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:divF2m">divF2m</a> :: <a href="Crypto-Number-F2m.html#t:BinaryPolynomial">BinaryPolynomial</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:BinaryPolynomial" class="def">BinaryPolynomial</a> = <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> <a href="src/Crypto-Number-F2m.html#BinaryPolynomial" class="link">Source</a> <a href="#t:BinaryPolynomial" class="selflink">#</a></p><div class="doc"><p>Binary Polynomial represented by an integer</p></div></div><div class="top"><p class="src"><a id="v:addF2m" class="def">addF2m</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> <a href="src/Crypto-Number-F2m.html#addF2m" class="link">Source</a> <a href="#v:addF2m" class="selflink">#</a></p><div class="doc"><p>Addition over F₂m. This is just a synonym of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bits.html#v:xor">xor</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:mulF2m" class="def">mulF2m</a> <a href="src/Crypto-Number-F2m.html#mulF2m" class="link">Source</a> <a href="#v:mulF2m" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Number-F2m.html#t:BinaryPolynomial">BinaryPolynomial</a></td><td class="doc"><p>Modulus</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Multiplication over F₂m.</p><p>This function is undefined for negative arguments, because their bit
representation is platform-dependent. Zero modulus is also prohibited.</p></div></div><div class="top"><p class="src"><a id="v:squareF2m-39-" class="def">squareF2m'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> <a href="src/Crypto-Number-F2m.html#squareF2m%27" class="link">Source</a> <a href="#v:squareF2m-39-" class="selflink">#</a></p><div class="doc"><p>Squaring over F₂m without reduction by modulo.</p><p>The implementation utilizes the fact that for binary polynomial S(x) we have
S(x)^2 = S(x^2). In other words, insert a zero bit between every bits of argument: 1101 -> 1010001.</p><p>This function is undefined for negative arguments, because their bit
representation is platform-dependent.</p></div></div><div class="top"><p class="src"><a id="v:squareF2m" class="def">squareF2m</a> <a href="src/Crypto-Number-F2m.html#squareF2m" class="link">Source</a> <a href="#v:squareF2m" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Number-F2m.html#t:BinaryPolynomial">BinaryPolynomial</a></td><td class="doc"><p>Modulus</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Squaring over F₂m.</p><p>This function is undefined for negative arguments, because their bit
representation is platform-dependent. Zero modulus is also prohibited.</p></div></div><div class="top"><p class="src"><a id="v:modF2m" class="def">modF2m</a> <a href="src/Crypto-Number-F2m.html#modF2m" class="link">Source</a> <a href="#v:modF2m" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Number-F2m.html#t:BinaryPolynomial">BinaryPolynomial</a></td><td class="doc"><p>Modulus</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Reduction by modulo over F₂m.</p><p>This function is undefined for negative arguments, because their bit
representation is platform-dependent. Zero modulus is also prohibited.</p></div></div><div class="top"><p class="src"><a id="v:invF2m" class="def">invF2m</a> <a href="src/Crypto-Number-F2m.html#invF2m" class="link">Source</a> <a href="#v:invF2m" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Number-F2m.html#t:BinaryPolynomial">BinaryPolynomial</a></td><td class="doc"><p>Modulus</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Modular inversion over F₂m.
If <code>n</code> doesn't have an inverse, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code> is returned.</p><p>This function is undefined for negative arguments, because their bit
representation is platform-dependent. Zero modulus is also prohibited.</p></div></div><div class="top"><p class="src"><a id="v:divF2m" class="def">divF2m</a> <a href="src/Crypto-Number-F2m.html#divF2m" class="link">Source</a> <a href="#v:divF2m" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Crypto-Number-F2m.html#t:BinaryPolynomial">BinaryPolynomial</a></td><td class="doc"><p>Modulus</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Dividend</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Divisor</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a></td><td class="doc"><p>Quotient</p></td></tr></table></div><div class="doc"><p>Division over F₂m. If the dividend doesn't have an inverse it returns
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code>.</p><p>This function is undefined for negative arguments, because their bit
representation is platform-dependent. Zero modulus is also prohibited.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|