/usr/share/doc/libghc-cryptonite-doc/html/Crypto-Cipher-ChaCha.html is in libghc-cryptonite-doc 0.10-1.
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 | <!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.Cipher.ChaCha</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Crypto-Cipher-ChaCha.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Crypto-Cipher-ChaCha.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.10: 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>Vincent Hanquez <vincent@snarc.org></td></tr><tr><th>Stability</th><td>stable</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.Cipher.ChaCha</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">simple interface for DRG purpose</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc empty"> </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"><a href="#v:initialize">initialize</a> :: (<a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArrayAccess">ByteArrayAccess</a> key, <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArrayAccess">ByteArrayAccess</a> nonce) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> key -> nonce -> <a href="Crypto-Cipher-ChaCha.html#t:State">State</a></li><li class="src short"><a href="#v:combine">combine</a> :: <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArray">ByteArray</a> ba => <a href="Crypto-Cipher-ChaCha.html#t:State">State</a> -> ba -> (ba, <a href="Crypto-Cipher-ChaCha.html#t:State">State</a>)</li><li class="src short"><a href="#v:generate">generate</a> :: <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArray">ByteArray</a> ba => <a href="Crypto-Cipher-ChaCha.html#t:State">State</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> (ba, <a href="Crypto-Cipher-ChaCha.html#t:State">State</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:State">State</a></li><li class="src short"><a href="#v:initializeSimple">initializeSimple</a> :: <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArray">ByteArray</a> seed => seed -> <a href="Crypto-Cipher-ChaCha.html#t:StateSimple">StateSimple</a></li><li class="src short"><a href="#v:generateSimple">generateSimple</a> :: <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArray">ByteArray</a> ba => <a href="Crypto-Cipher-ChaCha.html#t:StateSimple">StateSimple</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> (ba, <a href="Crypto-Cipher-ChaCha.html#t:StateSimple">StateSimple</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:StateSimple">StateSimple</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:initialize" class="def">initialize</a> <a href="src/Crypto-Cipher-ChaCha.html#initialize" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArrayAccess">ByteArrayAccess</a> key, <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArrayAccess">ByteArrayAccess</a> nonce)</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>number of rounds (8,12,20)</p></td></tr><tr><td class="src">-> key</td><td class="doc"><p>the key (128 or 256 bits)</p></td></tr><tr><td class="src">-> nonce</td><td class="doc"><p>the nonce (64 or 96 bits)</p></td></tr><tr><td class="src">-> <a href="Crypto-Cipher-ChaCha.html#t:State">State</a></td><td class="doc"><p>the initial ChaCha state</p></td></tr></table></div><div class="doc"><p>Initialize a new ChaCha context with the number of rounds,
the key and the nonce associated.</p></div></div><div class="top"><p class="src"><a name="v:combine" class="def">combine</a> <a href="src/Crypto-Cipher-ChaCha.html#combine" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArray">ByteArray</a> ba</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Crypto-Cipher-ChaCha.html#t:State">State</a></td><td class="doc"><p>the current ChaCha state</p></td></tr><tr><td class="src">-> ba</td><td class="doc"><p>the source to xor with the generator</p></td></tr><tr><td class="src">-> (ba, <a href="Crypto-Cipher-ChaCha.html#t:State">State</a>)</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Combine the chacha output and an arbitrary message with a xor,
and return the combined output and the new state.</p></div></div><div class="top"><p class="src"><a name="v:generate" class="def">generate</a> <a href="src/Crypto-Cipher-ChaCha.html#generate" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArray">ByteArray</a> ba</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Crypto-Cipher-ChaCha.html#t:State">State</a></td><td class="doc"><p>the current ChaCha state</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>the length of data to generate</p></td></tr><tr><td class="src">-> (ba, <a href="Crypto-Cipher-ChaCha.html#t:State">State</a>)</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Generate a number of bytes from the ChaCha output directly</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:State" class="def">State</a> <a href="src/Crypto-Cipher-ChaCha.html#State" class="link">Source</a></p><div class="doc"><p>ChaCha context</p></div><div class="subs instances"><p id="control.i:State" class="caption collapser" onclick="toggleSection('i:State')">Instances</p><div id="section.i:State" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Crypto-Cipher-ChaCha.html#t:State">State</a></span> <a href="src/Crypto-Cipher-ChaCha.html#line-30" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div><h1 id="g:1">simple interface for DRG purpose</h1><div class="top"><p class="src"><a name="v:initializeSimple" class="def">initializeSimple</a> <a href="src/Crypto-Cipher-ChaCha.html#initializeSimple" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArray">ByteArray</a> seed</td><td class="doc empty"> </td></tr><tr><td class="src">=> seed</td><td class="doc"><p>a 40 bytes long seed</p></td></tr><tr><td class="src">-> <a href="Crypto-Cipher-ChaCha.html#t:StateSimple">StateSimple</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Initialize simple ChaCha State</p></div></div><div class="top"><p class="src"><a name="v:generateSimple" class="def">generateSimple</a> :: <a href="file:///usr/share/doc/libghc-memory-doc/html/Data-ByteArray.html#t:ByteArray">ByteArray</a> ba => <a href="Crypto-Cipher-ChaCha.html#t:StateSimple">StateSimple</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -> (ba, <a href="Crypto-Cipher-ChaCha.html#t:StateSimple">StateSimple</a>) <a href="src/Crypto-Cipher-ChaCha.html#generateSimple" class="link">Source</a></p><div class="doc"><p>similar to <code><a href="Crypto-Cipher-ChaCha.html#v:generate">generate</a></code> but assume certains values</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:StateSimple" class="def">StateSimple</a> <a href="src/Crypto-Cipher-ChaCha.html#StateSimple" class="link">Source</a></p><div class="doc"><p>ChaCha context for DRG purpose (see Crypto.Random.ChaChaDRG)</p></div><div class="subs instances"><p id="control.i:StateSimple" class="caption collapser" onclick="toggleSection('i:StateSimple')">Instances</p><div id="section.i:StateSimple" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Crypto-Cipher-ChaCha.html#t:StateSimple">StateSimple</a></span> <a href="src/Crypto-Cipher-ChaCha.html#line-34" class="link">Source</a></td><td class="doc empty"> </td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>
|