The wiki really needs updating.
Why? It says "Take the corresponding public key generated with it (
65 bytes...)" and "0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A
299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6" is obviously not 65 bytes if you treat it as an ASCII string. Hell, "18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206321725" isn't even a valid private key to start with if treated as ASCII. Wherever hex values are mentioned (not just in the Wiki, but everywhere else on the Internet), it's implied that they're, well, actual hex values, and not an ASCII string.
Sure, the hex string
represents those bytes but it is ambiguous as to whether you are meant to operate on the string or the bytes themselves. Typically when hex numbers are represented, they'll be written as 0xFFFF notation or FFFFh. If a string, it will be placed in quotes. On the Wiki, neither is the case. Given that other people have had this issue, some clarification would likely not be amiss.
What probably helped throw me off was that my first task was to generate a minikey. For that, you perform the hashing on the
string that is the minikey. Now, obviously (I believe) minikeys are a later addition to Bitcoin and shouldn't be looked to for guidance but it did put me in a certain frame of mind. I've also been working with weakly typed languages a lot recently which may have contributed to a certain way of looking at things.
I'll be sharing my code when done so hopefully that will help others.
Edit: Just going back and looking at the wiki page again, I note that the page itself uses 0x notation when referring to bytes in several places. Lack of consistency adds to confusion.