diff options
author | Aaron Voisine <voisine@gmail.com> | 2014-06-26 10:34:26 -0700 |
---|---|---|
committer | Aaron Voisine <voisine@gmail.com> | 2014-06-26 10:34:26 -0700 |
commit | 989916fa2f08608d9f3c449939f36b90c4a79865 (patch) | |
tree | 1d601ff9d00f0ce21780a6f211748e506b5c88c5 /bip-0038.mediawiki | |
parent | cc17c3fbb306c390877451ac3120f3ca23afc2d0 (diff) |
unicode normalization of password
Added instructions for unicode normalization of password
Diffstat (limited to 'bip-0038.mediawiki')
-rw-r--r-- | bip-0038.mediawiki | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bip-0038.mediawiki b/bip-0038.mediawiki index 67e6864..81efcd5 100644 --- a/bip-0038.mediawiki +++ b/bip-0038.mediawiki @@ -88,7 +88,7 @@ Encrypting a private key without the EC multiplication offers the advantage that Encryption steps: # Compute the Bitcoin address (ASCII), and take the first four bytes of SHA256(SHA256()) of it. Let's call this "addresshash". # Derive a key from the passphrase using scrypt -#*Parameters: ''passphrase'' is the passphrase itself encoded in UTF-8. salt is ''addresshash'' from the earlier step, n=16384, r=8, p=8, length=64 (n, r, p are provisional and subject to consensus) +#*Parameters: ''passphrase'' is the passphrase itself encoded in UTF-8 and normalized using Unicode Normalization Form C (NFC). salt is ''addresshash'' from the earlier step, n=16384, r=8, p=8, length=64 (n, r, p are provisional and subject to consensus) #*Let's split the resulting 64 bytes in half, and call them ''derivedhalf1'' and ''derivedhalf2''. # Do AES256Encrypt(bitcoinprivkey[0...15] xor derivedhalf1[0...15], derivedhalf2), call the 16-byte result ''encryptedhalf1'' # Do AES256Encrypt(bitcoinprivkey[16...31] xor derivedhalf1[16...31], derivedhalf2), call the 16-byte result ''encryptedhalf2'' @@ -119,7 +119,7 @@ Steps performed by ''owner'' to generate a single intermediate code, if lot and # Encode the lot and sequence numbers as a 4 byte quantity (big-endian): lotnumber * 4096 + sequencenumber. Call these four bytes ''lotsequence''. # Concatenate ''ownersalt'' + ''lotsequence'' and call this ''ownerentropy''. # Derive a key from the passphrase using scrypt -#* Parameters: ''passphrase'' is the passphrase itself encoded in UTF-8. salt is ''ownersalt''. n=16384, r=8, p=8, length=32. +#* Parameters: ''passphrase'' is the passphrase itself encoded in UTF-8 and normalized using Unicode Normalization Form C (NFC). salt is ''ownersalt''. n=16384, r=8, p=8, length=32. #* Call the resulting 32 bytes ''prefactor''. #* Take SHA256(SHA256(''prefactor'' + ''ownerentropy'')) and call this ''passfactor''. # Compute the elliptic curve point G * ''passfactor'', and convert the result to compressed notation (33 bytes). Call this ''passpoint''. Compressed notation is used for this purpose regardless of whether the intent is to create Bitcoin addresses with or without compressed public keys. |