user35962: I know that getting the address from the blk*.dat files is discussed a lot of times. But I don't get it why? When I have the raw scriptSig I can encode it and get the bitcoin address or not?
E.g. the first block the first transation:
input scriptSig (this value is correct, as defined here: https://en.bitcoin.it/wiki/Genesis_block):
04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73

output scriptSig:
4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac

as written in here: https://en.bitcoin.it/wiki/Genesis_block
the address of the output is: 
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

now, how to get from the scriptSig 4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac to the address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?
If you try it here: http://gobittest.appspot.com/Address the output is NOT the expected address "1A1....."

user23123: First, note that the scriptSig on the genesis block was before addresses were used. The scriptSig there is called p2pk, or pay-to-pub-key. Addresses (the kind starting with a 1) are actually p2pkh, or pay-to-pub-key-hash. You can convert one to the other fairly easily and that's what's going on here.
The actual scriptSig can be parsed like so:
41 = number of bytes in hex of the element (65 bytes)
04...5f = public key
ac = OP_CHECKSIG

Plug in 04...5f into the Public ECDSA key at http://gobittest.appspot.com/Address and you'll see that the address does indeed match.

35962: <p>I know that getting the address from the <code>blk*.dat</code> files is discussed a lot of times. But I don't get it why? When I have the raw scriptSig I can encode it and get the bitcoin address or not?</p>

<p>E.g. the first block the first transation:</p>

<p>input scriptSig (this value is correct, as defined here: <a href="https://en.bitcoin.it/wiki/Genesis_block" rel="nofollow">https://en.bitcoin.it/wiki/Genesis_block</a>):</p>

<pre><code>04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73
</code></pre>

<p>output scriptSig:</p>

<pre><code>4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac
</code></pre>

<p>as written in here: <a href="https://en.bitcoin.it/wiki/Genesis_block" rel="nofollow">https://en.bitcoin.it/wiki/Genesis_block</a>
the address of the output is: </p>

<pre><code>1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
</code></pre>

<p>now, how to get from the scriptSig <code>4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac</code> to the address <code>1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa</code>?</p>

<p>If you try it here: <a href="http://gobittest.appspot.com/Address" rel="nofollow">http://gobittest.appspot.com/Address</a> the output is NOT the expected address "1A1....."</p>
 23123: <p>First, note that the scriptSig on the genesis block was before addresses were used. The scriptSig there is called p2pk, or pay-to-pub-key. Addresses (the kind starting with a 1) are actually p2pkh, or pay-to-pub-key-hash. You can convert one to the other fairly easily and that's what's going on here.</p>

<p>The actual scriptSig can be parsed like so:</p>

<pre><code>41 = number of bytes in hex of the element (65 bytes)
04...5f = public key
ac = OP_CHECKSIG
</code></pre>

<p>Plug in 04...5f into the Public ECDSA key at <a href="http://gobittest.appspot.com/Address" rel="nofollow">http://gobittest.appspot.com/Address</a> and you'll see that the address does indeed match.</p>
