monero-docs/Monero-Base58/index.html
2017-12-22 23:22:35 +01:00

185 lines
6.4 KiB
HTML

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Piotr 'Qertoip' Włodarek">
<link rel="shortcut icon" href="../img/favicon.ico">
<title>Base58 - Monero Docs</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
<link rel="stylesheet" href="../css/highlight.css">
<script>
// Current page data
var mkdocs_page_name = "Base58";
var mkdocs_page_input_path = "Monero-Base58.md";
var mkdocs_page_url = "/Monero-Base58/";
</script>
<script src="../js/jquery-2.1.1.min.js"></script>
<script src="../js/modernizr-2.8.3.min.js"></script>
<script type="text/javascript" src="../js/highlight.pack.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search">
<a href=".." class="icon icon-home"> Monero Docs</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1">
<a class="" href="..">Unofficial Monero Documentation</a>
</li>
<li class="toctree-l1 current">
<a class="current" href="./">Base58</a>
<ul class="subnav">
<li class="toctree-l2"><a href="#base58">Base58</a></li>
<ul>
<li><a class="toctree-l3" href="#base58-in-monero">Base58 in Monero</a></li>
</ul>
</ul>
</li>
<li class="toctree-l1">
<a class="" href="../Multisignature/">Multisignature</a>
</li>
<li class="toctree-l1">
<a class="" href="../Public-Address/">Public Address</a>
</li>
<li class="toctree-l1">
<a class="" href="../Subaddress/">Subaddress</a>
</li>
<li class="toctree-l1">
<a class="" href="../Technical-Specs/">Technical Specs</a>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">Monero Docs</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="..">Docs</a> &raquo;</li>
<li>Base58</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/monerodocs/monerodocs/edit/master/docs/Monero-Base58.md"> Edit on monerodocs/monerodocs</a>
</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section">
<h1 id="base58">Base58</h1>
<p>Base58 is a binary-to-text encoding scheme. It is similar to Base64 but has been modified to avoid both non-alphanumeric characters and letters which might look ambiguous when printed. The characters excluded in relation to Base64 are: <code>IOl0+/</code></p>
<p>Base58 does not strictly specify the format. This results in some implementations being incompatible with others, for example with regard to alphabet order.</p>
<p>For details, see <a href="https://en.wikipedia.org/wiki/Base58">Wikipedia</a>.</p>
<h2 id="base58-in-monero">Base58 in Monero</h2>
<p>Monero has its own variant of Base58.</p>
<p>In Monero the Base58 encoding is performed in 8-byte blocks, except the last block which is the remaining (8 or less) bytes .</p>
<p>The 8-byte block converts to 11 or less Base58 characters. If the block converted to less then 11 characters, the output is padded with "1"s (0 in Base58). The final block is padded as well to whatever would be the maximum size of this number of bytes encoded in Base58.</p>
<p>The advantage of Monero implementation is that output is of a fixed size which is not the case with plain Base58. The disadvantage is that default libraries won't work.</p>
<p>For details, see <a href="https://github.com/monero-project/monero/blob/master/src/common/base58.cpp">reference C++ Base58</a> implementation and <a href="https://github.com/bigreddmachine/MoneroPy/blob/master/moneropy/base58.py">unofficial Python Base58</a> implementation.</p>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../Multisignature/" class="btn btn-neutral float-right" title="Multisignature">Next <span class="icon icon-circle-arrow-right"></span></a>
<a href=".." class="btn btn-neutral" title="Unofficial Monero Documentation"><span class="icon icon-circle-arrow-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
</div>
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" style="cursor: pointer">
<span class="rst-current-version" data-toggle="rst-current-version">
<span><a href=".." style="color: #fcfcfc;">&laquo; Previous</a></span>
<span style="margin-left: 15px"><a href="../Multisignature/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script>var base_url = '..';</script>
<script src="../js/theme.js"></script>
<script src="../search/require.js"></script>
<script src="../search/search.js"></script>
</body>
</html>