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.

Low-level Bitcoin

68 pointsby jc123almost 11 years ago

3 comments

b1db77d2almost 11 years ago
A little note about the &quot;make a privkey&quot; section of the signature example; it can sometimes* make invalid privkeys that are off the end of the EC curve. Only integers between 0x1 and 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 are valid in our particular case. Super unlikely to ever get a sha256 hash that matches the invalid portion, but it&#x27;s worthwhile to point out.<p>* probably never, but worth mentioning
评论 #8163574 未加载
评论 #8162987 未加载
VMGalmost 11 years ago
Possible bug:<p>The instructions BOOLAND and BOOLOR don&#x27;t interpret the stack values the same way IF, VERIFY etc do. They decode the top stack values as integers and compare against zero, thus they have to fail when the top stack item size is greater than 4 bytes.<p>Edit: littleEndian.decode also doesn&#x27;t seem to respect the size limits<p>Edit2: .. or signed integers for that matter. So while this is a very cool basic concept, it&#x27;s not a complete implementation.<p>The reference client provides test suites<p><a href="https://github.com/bitcoin/bitcoin/blob/master/src/test/data/script_valid.json" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bitcoin&#x2F;bitcoin&#x2F;blob&#x2F;master&#x2F;src&#x2F;test&#x2F;data...</a><p><a href="https://github.com/bitcoin/bitcoin/blob/master/src/test/data/script_invalid.json" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bitcoin&#x2F;bitcoin&#x2F;blob&#x2F;master&#x2F;src&#x2F;test&#x2F;data...</a>
评论 #8162973 未加载
norswapalmost 11 years ago
This article had me wondering what will happen when people start storing copyrighted data (or worse, pedopornographic images) inside the blockchain.
评论 #8162940 未加载
评论 #8162976 未加载