</head><bodyclass="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="logo-container"href="../../../halo2_gadgets/index.html"><imgclass="rust-logo"src="../../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a></nav><navclass="sidebar"><aclass="logo-container"href="../../../halo2_gadgets/index.html"><imgclass="rust-logo"src="../../../static.files/rust-logo-151179464ae7ed46.svg"alt="logo"></a><h2class="location"><ahref="#">Module primitives</a></h2><divclass="sidebar-elems"><section><ulclass="block"><li><ahref="#structs">Structs</a></li><li><ahref="#traits">Traits</a></li><li><ahref="#functions">Functions</a></li><li><ahref="#types">Type Aliases</a></li></ul></section></div></nav><main><divclass="width-limiter"><navclass="sub"><formclass="search-form"><span></span><inputclass="search-input"name="search"aria-label="Run search in the documentation"autocomplete="off"spellcheck="false"placeholder="Click or press ‘S’ to search, ‘?’ for more options…"type="search"><divid="help-button"title="help"tabindex="-1"><ahref="../../../help.html">?</a></div><divid="settings-menu"tabindex="-1"><ahref="../../../settings.html"title="settings"><imgwidth="22"height="22"alt="Change settings"src="../../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><sectionid="main-content"class="content"><divclass="main-heading"><h1>Module <ahref="../../index.html">halo2_gadgets</a>::<wbr><ahref="../index.html">poseidon</a>::<wbr><aclass="mod"href="#">primitives</a><buttonid="copy-path"title="Copy item path to clipboard"><imgsrc="../../../static.files/clipboard-7571035ce49a181d.svg"width="19"height="18"alt="Copy item path"></button></h1><spanclass="out-of-band"><aclass="src"href="../../../src/halo2_gadgets/poseidon/primitives.rs.html#1-405">source</a> · <buttonid="toggle-all-docs"title="collapse all docs">[<span>−</span>]</button></span></div><detailsclass="toggle top-doc"open><summaryclass="hideme"><span>Expand description</span></summary><divclass="docblock"><p>The Poseidon algebraic hash function.</p>
</div></details><h2id="structs"class="small-section-header"><ahref="#structs">Structs</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="struct"href="struct.Absorbing.html"title="struct halo2_gadgets::poseidon::primitives::Absorbing">Absorbing</a></div><divclass="desc docblock-short">The absorbing state of the <code>Sponge</code>.</div></li><li><divclass="item-name"><aclass="struct"href="struct.ConstantLength.html"title="struct halo2_gadgets::poseidon::primitives::ConstantLength">ConstantLength</a></div><divclass="desc docblock-short">A Poseidon hash function used with constant input length.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Hash.html"title="struct halo2_gadgets::poseidon::primitives::Hash">Hash</a></div><divclass="desc docblock-short">A Poseidon hash function, built around a sponge.</div></li><li><divclass="item-name"><aclass="struct"href="struct.P128Pow5T3.html"title="struct halo2_gadgets::poseidon::primitives::P128Pow5T3">P128Pow5T3</a></div><divclass="desc docblock-short">Poseidon-128 using the $x^5$ S-box, with a width of 3 field elements, and the
standard number of rounds for 128-bit security “with margin”.</div></li><li><divclass="item-name"><aclass="struct"href="struct.Squeezing.html"title="struct halo2_gadgets::poseidon::primitives::Squeezing">Squeezing</a></div><divclass="desc docblock-short">The squeezing state of the <code>Sponge</code>.</div></li></ul><h2id="traits"class="small-section-header"><ahref="#traits">Traits</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="trait"href="trait.Domain.html"title="trait halo2_gadgets::poseidon::primitives::Domain">Domain</a></div><divclass="desc docblock-short">A domain in which a Poseidon hash function is being used.</div></li><li><divclass="item-name"><aclass="trait"href="trait.Spec.html"title="trait halo2_gadgets::poseidon::primitives::Spec">Spec</a></div><divclass="desc docblock-short">A specification for a Poseidon permutation.</div></li><li><divclass="item-name"><aclass="trait"href="trait.SpongeMode.html"title="trait halo2_gadgets::poseidon::primitives::SpongeMode">SpongeMode</a></div><divclass="desc docblock-short">The state of the <code>Sponge</code>.</div></li></ul><h2id="functions"class="small-section-header"><ahref="#functions">Functions</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="fn"href="fn.generate_constants.html"title="fn halo2_gadgets::poseidon::primitives::generate_constants">generate_constants</a></div><divclass="desc docblock-short">Generates <code>(round_constants, mds, mds^-1)</code> corresponding to this specification.</div></li></ul><h2id="types"class="small-section-header"><ahref="#types">Type Aliases</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="type"href="type.Mds.html"title="type halo2_gadgets::poseidon::primitives::Mds">Mds</a></div><divclass="desc docblock-short">The type used to hold the MDS matrix and its inverse.</div></li></ul></section></div></main></body></html>