Author

Topic: bitaddress.org source code modification (Read 667 times)

jr. member
Activity: 34
Merit: 1
November 19, 2016, 04:43:56 PM
#3
eventually i got it and played with an address in the format prefix.payload.ckechsum for an uncompressed WIF key and pre.pl.01.cksum for a compressed one and that the prefix 80 results in 5 and e.g. b0 in 6 (uncompress so without 01)
uff thx...

are there alts using complete other techniques than privKey->sha256-> sha256-> checksum + to privkey -> base58encode ?
staff
Activity: 3458
Merit: 6793
Just writing some code
November 18, 2016, 05:04:27 PM
#2
Those are base58 check encoding prefixes. It is just the way that the encoding works with the version byte to always produce the same prefix characters. For mainnet, uncompressed keys begin with a 5, on testnet, a 9. Compressed keys begin with a K or L on mainnet and a c on testnet.
jr. member
Activity: 34
Merit: 1
November 18, 2016, 04:36:58 PM
#1
pls help me out!

where are the bold parts coming from?
THX

    /**
    * Whether public keys should be returned compressed by default.
@@ -230,16 +230,16 @@ Bitcoin.ECKey = (function () {
    // 51 characters base58, always starts with a '5'<--why?
    ECKey.isWalletImportFormat = function (key) {
       key = key.toString();
      return (ECKey.privateKeyPrefix == 0x80) ?
                     (/^5[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{50}$/.test(key)) :
                      (/^9[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{50}$/.test(key));
    };
 
    // 52 characters base58
    ECKey.isCompressedWalletImportFormat = function (key) {
       key = key.toString();
      return (ECKey.privateKeyPrefix == 0x80) ?
                     (/^[LK][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{51}$/.test(key)) :
                      (/^c[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{51}$/.test(key));
    };
Jump to: