librustzcash/rustdoc/latest/equihash/index.html

20 lines
5.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Equihash is a Proof-of-Work algorithm, based on a generalization of the Birthday problem which finds colliding hash values. It was designed to be memory-hard; more specifically, the bottle-neck for parallel implementations of Equihash solvers would be memory bandwidth."><title>equihash - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-c233d2bd.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="equihash" data-themes="" data-resource-suffix="" data-rustdoc-version="1.88.0-nightly (6bc57c6bf 2025-04-22)" data-channel="nightly" data-search-js="search-f7877310.js" data-settings-js="settings-5514c975.js" ><script src="../static.files/storage-4e99c027.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-7ef8a74a.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../equihash/index.html">equihash</a><span class="version">0.2.2</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#feature-flags" title="Feature flags">Feature flags</a></li><li><a href="#references" title="References">References</a></li></ul><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>equihash</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/equihash/lib.rs.html#1-47">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Equihash is a Proof-of-Work algorithm, based on a generalization of the Birthday
problem which finds colliding hash values. It was designed to be memory-hard; more
specifically, the bottle-neck for parallel implementations of Equihash solvers would
be memory bandwidth.</p>
<p>This crate implements Equihash as specified for the Zcash consensus rules. It can
verify solutions for any valid <code>(n, k)</code> parameters, as long as the row indices are no
larger than 32 bits (that is, <code>ceiling(((n / (k + 1)) + 1) / 8) &lt;= 4</code>).</p>
<h3 id="feature-flags"><a class="doc-anchor" href="#feature-flags">§</a>Feature flags</h3>
<ul>
<li><strong><code>solver</code></strong> — Experimental tromp solver support, builds the C++ tromp solver and Rust FFI layer.</li>
</ul>
<h2 id="references"><a class="doc-anchor" href="#references">§</a>References</h2>
<ul>
<li><a href="https://zips.z.cash/protocol/protocol.pdf#equihash">Section 7.6.1: Equihash.</a> Zcash Protocol Specification, version 2020.1.10 or later.</li>
<li>Alex Biryukov and Dmitry Khovratovich.
<a href="https://www.internetsociety.org/sites/default/files/blogs-media/equihash-asymmetric-proof-of-work-based-generalized-birthday-problem.pdf"><em>Equihash: Asymmetric Proof-of-Work Based on the Generalized Birthday Problem.</em></a>
NDSS 16.</li>
</ul>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Error.html" title="struct equihash::Error">Error</a></dt><dd>An Equihash solution failed to verify.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.is_valid_solution.html" title="fn equihash::is_valid_solution">is_<wbr>valid_<wbr>solution</a></dt><dd>Checks whether <code>soln</code> is a valid solution for <code>(input, nonce)</code> with the
parameters <code>(n, k)</code>.</dd></dl></section></div></main></body></html>