TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Offline auditable BTC address generator using only common *nix tools

2 pointsby ribasushialmost 6 years ago

1 comment

ribasushialmost 6 years ago
Both tweets joined together:<p><pre><code> openssl ecparam -noout -name secp256k1 -genkey \ | tee &gt;( lpr ) \ | openssl ec -pubout -conv_form compressed -outform DER \ | tail -c33 \ | rhash - -p %@{sha-256} \ | rhash - -p %@{ripemd160} \ | perl -Mbigint -MDigest::SHA=sha256 -0777 -nE &#x27; ( $k = &quot;\0$_&quot; ) =~ &#x2F;^\0*&#x2F;; $l = 1 x $+[0]; $k .= substr sha256(sha256 $k), 0, 4; $d = hex unpack &quot;H*&quot;, $k; $a = ( grep &#x2F;[^IOl]&#x2F;, 1..9,A..Z,a..z )[ ($d-&gt;bdiv(58))[1] ] . $a while $d; say $l . $a; &#x27; </code></pre> Replace `&gt;( lpr )` wih `&gt;( cat &gt;&#x2F;dev&#x2F;stderr )` to see it in action without a printer