<oembed><type>rich</type><version>1.0</version><author_name>npub1tha7g3nyfapxq5s9zmrs42pcur22pjzh0f2jpy4vwm4q6u0y7h9s76fx6z</author_name><author_url>https://nostr.ae/npub1tha7g3nyfapxq5s9zmrs42pcur22pjzh0f2jpy4vwm4q6u0y7h9s76fx6z</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2014-07-15&#xA;📝 Original message:I have a python implementation that seems to pass this test vector:&#xA;&#xA;https://github.com/wozz/electrum/blob/bip38_import/lib/bip38.py#L299&#xA;&#xA;&#xA;&#xA;On Jul 15, 2014, at 9:19 AM, Andreas Schildbach &lt;andreas at schildbach.de&gt; wrote:&#xA;&#xA;&gt; I think generally control-characters (such as \u0000) should be&#xA;&gt; disallowed in passphrases. (Even the use of whitespaces is very&#xA;&gt; questionable.)&#xA;&gt; &#xA;&gt; I&#39;m ok with allowing pile-of-poo&#39;s. On mobile phones there is keyboards&#xA;&gt; just containing emoticons -- why not allow those? Assuming NFC works of&#xA;&gt; course.&#xA;&gt; &#xA;&gt; &#xA;&gt; On 07/15/2014 03:07 PM, Eric Winer wrote:&#xA;&gt;&gt; I don&#39;t know for sure if the test vector is correct NFC form.  But for&#xA;&gt;&gt; what it&#39;s worth, the Pile of Poo character is pretty easily accessible&#xA;&gt;&gt; on the iPhone and Android keyboards, and in this string it&#39;s already in&#xA;&gt;&gt; NFC form (f09f92a9 in the test result).  I&#39;ve certainly seen it in&#xA;&gt;&gt; usernames around the internet, and wouldn&#39;t be surprised to see it in&#xA;&gt;&gt; passphrases entered on smartphones, especially if the author of a&#xA;&gt;&gt; BIP38-compatible app includes a (possibly ill-advised) suggestion to&#xA;&gt;&gt; have your passphrase &#34;include special characters&#34;.&#xA;&gt;&gt; &#xA;&gt;&gt; I haven&#39;t seen the NULL character on any smartphone keyboards, though -&#xA;&gt;&gt; I assume the iOS and Android developers had the foresight to know how&#xA;&gt;&gt; much havoc that would wreak on systems assuming null-terminated strings.&#xA;&gt;&gt; It seems unlikely that NULL would be in a real-world passphrase entered&#xA;&gt;&gt; by a sane user.&#xA;&gt;&gt; &#xA;&gt;&gt; &#xA;&gt;&gt; On Tue, Jul 15, 2014 at 8:03 AM, Mike Hearn &lt;mike at plan99.net&#xA;&gt;&gt; &lt;mailto:mike at plan99.net&gt;&gt; wrote:&#xA;&gt;&gt; &#xA;&gt;&gt;    [+cc aaron]&#xA;&gt;&gt; &#xA;&gt;&gt;    We recently added an implementation of BIP 38 (password protected&#xA;&gt;&gt;    private keys) to bitcoinj. It came to my attention that the third&#xA;&gt;&gt;    test vector may be broken. It gives a hex version of what the NFC&#xA;&gt;&gt;    normalised version of the input string should be, but this does not&#xA;&gt;&gt;    match the results of the Java unicode normaliser, and in fact I&#xA;&gt;&gt;    can&#39;t even get Python to print the names of the characters past the&#xA;&gt;&gt;    embedded null. I&#39;m curious where this normalised version came from.&#xA;&gt;&gt; &#xA;&gt;&gt;    Given that &#34;pile of poo&#34; is not a character I think any sane user&#xA;&gt;&gt;    would put into a passphrase, I question the value of this test&#xA;&gt;&gt;    vector. NFC form is intended to collapse things like umlaut control&#xA;&gt;&gt;    characters onto their prior code point, but here we&#39;re feeding the&#xA;&gt;&gt;    algorithm what is basically garbage so I&#39;m not totally surprised&#xA;&gt;&gt;    that different implementations appear to disagree on the outcome.&#xA;&gt;&gt; &#xA;&gt;&gt;    Proposed action: we remove this test vector as it does not represent&#xA;&gt;&gt;    any real world usage of the spec, or if we desperately need to&#xA;&gt;&gt;    verify NFC normalisation I suggest using a different, more realistic&#xA;&gt;&gt;    test string, like Zürich, or something written in Thai.&#xA;&gt;&gt; &#xA;&gt;&gt; &#xA;&gt;&gt; &#xA;&gt;&gt;    Test 3:&#xA;&gt;&gt; &#xA;&gt;&gt;      * Passphrase ϓ␀𐐀💩 (\u03D2\u0301\u0000\U00010400\U0001F4A9; GREEK&#xA;&gt;&gt;        UPSILON WITH HOOK &lt;http://codepoints.net/U+03D2&gt;, COMBINING&#xA;&gt;&gt;        ACUTE ACCENT &lt;http://codepoints.net/U+0301&gt;, NULL&#xA;&gt;&gt;        &lt;http://codepoints.net/U+0000&gt;, DESERET CAPITAL LETTER LONG I&#xA;&gt;&gt;        &lt;http://codepoints.net/U+10400&gt;, PILE OF POO&#xA;&gt;&gt;        &lt;http://codepoints.net/U+1F4A9&gt;)&#xA;&gt;&gt;      * Encrypted key:&#xA;&gt;&gt;        6PRW5o9FLp4gJDDVqJQKJFTpMvdsSGJxMYHtHaQBF3ooa8mwD69bapcDQn&#xA;&gt;&gt;      * Bitcoin Address: 16ktGzmfrurhbhi6JGqsMWf7TyqK9HNAeF&#xA;&gt;&gt;      * Unencrypted private key (WIF):&#xA;&gt;&gt;        5Jajm8eQ22H3pGWLEVCXyvND8dQZhiQhoLJNKjYXk9roUFTMSZ4&#xA;&gt;&gt;      * /Note:/ The non-standard UTF-8 characters in this passphrase&#xA;&gt;&gt;        should be NFC normalized to result in a passphrase&#xA;&gt;&gt;        of0xcf9300f0909080f09f92a9 before further processing&#xA;&gt;&gt; &#xA;&gt;&gt; &#xA;&gt;&gt; &#xA;&gt;&gt; &#xA;&gt;&gt;    ------------------------------------------------------------------------------&#xA;&gt;&gt;    Want fast and easy access to all the code in your enterprise? Index and&#xA;&gt;&gt;    search up to 200,000 lines of code with a free copy of Black Duck&#xA;&gt;&gt;    Code Sight - the same software that powers the world&#39;s largest code&#xA;&gt;&gt;    search on Ohloh, the Black Duck Open Hub! Try it now.&#xA;&gt;&gt;    http://p.sf.net/sfu/bds&#xA;&gt;&gt;    _______________________________________________&#xA;&gt;&gt;    Bitcoin-development mailing list&#xA;&gt;&gt;    Bitcoin-development at lists.sourceforge.net&#xA;&gt;&gt;    &lt;mailto:Bitcoin-development at lists.sourceforge.net&gt;&#xA;&gt;&gt;    https://lists.sourceforge.net/lists/listinfo/bitcoin-development&#xA;&gt;&gt; &#xA;&gt;&gt; &#xA;&gt;&gt; &#xA;&gt;&gt; &#xA;&gt;&gt; ------------------------------------------------------------------------------&#xA;&gt;&gt; Want fast and easy access to all the code in your enterprise? Index and&#xA;&gt;&gt; search up to 200,000 lines of code with a free copy of Black Duck&#xA;&gt;&gt; Code Sight - the same software that powers the world&#39;s largest code&#xA;&gt;&gt; search on Ohloh, the Black Duck Open Hub! Try it now.&#xA;&gt;&gt; http://p.sf.net/sfu/bds&#xA;&gt;&gt; &#xA;&gt;&gt; &#xA;&gt;&gt; &#xA;&gt;&gt; _______________________________________________&#xA;&gt;&gt; Bitcoin-development mailing list&#xA;&gt;&gt; Bitcoin-development at lists.sourceforge.net&#xA;&gt;&gt; https://lists.sourceforge.net/lists/listinfo/bitcoin-development&#xA;&gt;&gt; &#xA;&gt; &#xA;&gt; &#xA;&gt; &#xA;&gt; ------------------------------------------------------------------------------&#xA;&gt; Want fast and easy access to all the code in your enterprise? Index and&#xA;&gt; search up to 200,000 lines of code with a free copy of Black Duck&#xA;&gt; Code Sight - the same software that powers the world&#39;s largest code&#xA;&gt; search on Ohloh, the Black Duck Open Hub! Try it now.&#xA;&gt; http://p.sf.net/sfu/bds&#xA;&gt; _______________________________________________&#xA;&gt; Bitcoin-development mailing list&#xA;&gt; Bitcoin-development at lists.sourceforge.net&#xA;&gt; https://lists.sourceforge.net/lists/listinfo/bitcoin-development</html></oembed>