Post
Topic
Board Development & Technical Discussion
Re: easyseed(1) secure, multilanguage BIP 39 mnemonic seed phrase generator
by
nullius
on 04/01/2018, 13:05:15 UTC
<1> It remeber me vaguely on some debate while the implementation of UTF-8 ( Ken Thompson and Rob Pike ) maybe there are some valuable lessons in computing history to remember...

That’s funny.  UTF-8 is my pet analogy for Segwit; I have been intending to post about this.  UTF-8 is a brilliant, elegant hack which expands chars [:blocks] from 1 to 4 [:million] bytes, while maintaining backward compatibility with old-style 1-byte ASCII.  It has a theoretical upper limit of a 32-bit codespace (with 6 bytes), but we really get a 21-bit codespace.

Sorry, Core:  Segwit is not as awe-inspiring as UTF-8.  UTF-8 is one of my favourite all-time most brilliant hacks ever.  But Segwit deserves to be compared.

IIRC, Pike (or was it Thompson?) sketched the original UTF-8 spec on a restaurant napkin.

<2> Regards to Bech32 I am trying to compile it on Visual Studio 2017 community edition

bech32 compilation/porting discussion is continued on its thread.  The MSVC compile should mostly but not entirely work, I think.

As for easyseed:  In addition to the POSIX getopt(3) interface and BSD-style (also available on Linux), easyseed needs random numbers.  It read(2)s off /dev/urandom.  So it would need a suitable replacement from Microsoft CryptoAPI/CNG.  A quick search reveals CryptGenRandom() or BCryptGenRandom()?  If you use Windows Vista (and others?), just make sure you don’t inadvertently get bits from Dual_EC_DRBG.