OK,
So we have:
01000000 <-----NewTx up to before sigScript
01
fbe470cf995c04ecaa82fc2d4ae598075e21986700b544f660ffea93a6a82fe5
01000000
76a914211f0c809a1a14f46af53ae59aa32d02aaf7272488ac <----- pkScript for PrevTx
00000000 <---- lock time for NewTx
00000001 <---- expanded hashTypeCode (little-endian)
.....
so all together, now:
0100000001fbe470cf995c04ecaa82fc2d4ae598075e21986700b544f660ffea93a6a82fe501000 00076a914211f0c809a1a14f46af53ae59aa32d02aaf7272488ac0000000000000001
and so this is what gets signed?
I tried signing it using the private key
24ed089647b7f330588c491309e527c44cbf5e04444540782d6b88f8c44b3105
and got:
304302200a4637d31ac9f9edceeeb3b1095e79e48a49b4048f9177030659f8ae560521f9021f0bf 8515fc5ea6a51c1a8d9c809f7cc62d9914a1c5152947dccd5155c3b52e7
but the signature should be:
304502205ea291ce55ecc95f346f6be2c198993dcb1a72cc4eddf520f173ed9ac85a1e03022100d 0ae6c394d014de8fecb44d034904a0c6142e6335a394aa4629d7a839aaaa2
also, what's with the extra a3 byte before the hashTypeCode?
-TT
I'm at work, and don't have my python/btc tools here, but from manual inspection that a3 appears to be part of the signature. The signature is represented as an r and s value, and in this case the s-value is actually 33 bytes, not 32. I haven't counted it all up, but I could see how that would lead you to believe there's an extra byte (if you look at the s-value, you'll notice it's actually 32-bytes, but has an extra 0x00 leading byte to remove sign ambiguity).
As for signing: don't forget that the process for generating a signature involves a random number. Every signature you generate on the exact same data will produce a completely different-looking signature. The only way to know for sure whether you did it right is if you used the same random number both times, or (more likely) execute your
verification algorithm to check if the signature is valid.