What is a block index in blockchain.info?

On blockchain’s blockchain api documentation, located here

https://blockchain.info/api/blockchain_api

There is an api call that uses a parameter called block_index. What is this value, and how does it differ from block_height? From playing around with changing the block_index value in the following api call:

https://blockchain.info/block-index/$block_index?format=json

It seems like (imo quite arbitrarily, which adds to my confusion) that block_index 14849 corresponds to the genesis block. Finally, on the api page listed at the top the first example output they show gives a block whose index is 818044, yet when I enter the following api call into my browser’s address bar:

https://blockchain.info/block-index/818044?format=json

I get “Block Not Found”. Is this just a bug in blockchain.info that the example output they provide doesn’t actually work, or am I using block_index incorrectly?

How to generate a bulk wallet offline with python, java or c++?

I want to generate, say 100000 key pairs (address/private key). It should be done offline, without using websites/javascript , with a program on the command line. Of course, the software should use the best way to generate randomness. There is such function on https://www.bitaddress.org , but it’s javascript and is not easy to be used by scripts on the command line. Do you know of such software?

Bitcoins being sent to another addres during a transaction

I realized a few days back, that if I send some bitcoins to someone, then it shows in blockchain an extra amount sent to my own wallet. So if I send 0.5 BTC from wallet A to B then blockchain shows

A--> B 0.5
A-->A  1  (basically sending it to my wallet as well.)

Today I noticed a different wallet address during a transaction. So it was like

A--> B 0.2
A--> C 0.5

Checking address C on blockchain, it gets sent back to A in some time. But since this morning, the bitcoins haven’t come back to A. If I open my wallet on multibit, it shows the correct balance. However on blockchain, it’s 0.5 less. The funds from C have not been sent back to A, but it shows on multibit the right balance in A.

How can I get the uncompressed public key from the compressed public key in openssl?

Given a private key, I can get the uncompressed or compressed version of the public key like so.

EC_KEY* pKey = EC_KEY_new_by_curve_name(NID_secp256k1);

std::vector<unsigned char> getPubKey(EC_KEY* pKey, bool compressed) const {
    if (compressed)
        EC_KEY_set_conv_form(pKey, POINT_CONVERSION_COMPRESSED);
    else
        EC_KEY_set_conv_form(pKey, POINT_CONVERSION_UNCOMPRESSED);

    int nSize = i2o_ECPublicKey(pKey, NULL);
    std::vector<unsigned char> pubKey(nSize, 0)
    unsigned char* pBegin = &pubKey[0];
    i2o_ECPublicKey(pKey, &pBegin)
    return pubKey;
}

But how can I get the uncompressed public key from the compressed public key without knowing the private key?